Solved Can't start snmpd after upgrading 11.2 to 12.0

I upgraded from 11.2 to 12.0 as in manual
https://www.freebsd.org/releases/12.0R/installation.html#upgrade-binary

Recompiled all ports.

But after upgrade process was complete, snmpd won't start any more:

Code:
#/usr/local/etc/rc.d/snmpd start
Starting snmpd.
ld-elf.so.1: /usr/local/lib/libnetsnmp.so.30: Undefined symbol "EVP_MD_CTX_create"
/usr/local/etc/rc.d/snmpd: WARNING: failed to start snmpd

What I have tried: uninstalling and reinstalling net-snmpd port. Doing portupgrade again with all affected ports included:
portupgrade -frR net-snmp


No change. How to get SNMP working again?
 
So, I found someone on twitter mention the same error message:

So, recommendation is to "compile it with BASE SSL instead of ports SSL to get it to work "

Sure enough, i got in my make.conf:
Code:
DEFAULT_VERSIONS+=ssl=openssl

Replaced it with:
Code:
DEFAULT_VERSIONS+=ssl=base

But trying to compile got error message:
Code:
Dependency error: This port wants the OpenSSL library from the FreeBSD
base system. You can't build against it, while a newer
version is installed by a port.
Please deinstall the port, remove DEFAULT_VERSIONS=ssl=base or undefine WITH_OPENSSL_BASE.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net-mgmt/net-snmp
*** Error code 1

Stop.
make: stopped in /usr/ports/net-mgmt/net-snmp

I have the latest openssl port installed:
Code:
openssl-1.0.2q,1            =  up-to-date with port

So, what do i do now?

Should I deinstall openssl port and recompile all ports again?
 
Did you rebuild (aka re-install) all ports after you upgraded to 13.0 12.0 or only those few which started to cause you problems? Because that could also be a reason for all this: after upgrading to a major version you're going to have to rebuild everything.
 
I did recompile all ports, where in guide it was written to be done.

Takes all day, but of course I can do it again, to fix the openssl issues.

PS. Didn't you mean 12.0?
 
Yeah, I meant 12.0, corrected that.

Anyway, here's what I'd do...

pkg create -x openssl, this will create a (backup) package of your currently installed OpenSSL setup, which will allow you to undo the damage you're about to cause. Check that it successfully completed and then issue: # pkg delete -fx openssl, this will forcefully remove OpenSSL while leaving all the depending packages alone. Effectively you're "destroying" your system, don't restart things like Apache for example during this moment.

Now try to rebuild and see what happens. After the rebuild has completed you can re-install OpenSSL again (edit: use: # pkg add ./openssl.txz (or whatever the package is called)) and then use that to rebuild all the other ports if necessary. I would probably use something like: # portmaster -Rr openssl, this would tell ports-mgmt/portmaster to rebuild all ports that depend on OpenSSL.
 
Hello

Thank you. But by the time of your reply I had already started to implement my plan:

I did " make deinstall" to remove openssl port and " portupgrade -af" after that to recompile all ports.

It mostly went fine, only 6 ports needed manual intervention.

But I discovered it sure did break some things, for example ssh:
Code:
ld-elf.so.1: Shared object "libcrypto.so.9" not found, required by "ssh"

mencoder:
Code:
ld-elf.so.1: Shared object "libvpx.so.5" not found, required by "libavcodec.so.58"

also lot of such style messages:
Code:
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db48
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/libdb_cxx-5.3.so.0
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/libdb_stl-5.3.so.0
No such file or directory @ realpath_rec - /usr/local/lib/db5/libdb-5.3.so.0.0.0
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5

ntp was also not working, but seems it is a known bug with upgrading to 12.0:
Code:
ntpd error:  only one pidfile option allowed
ntpd - NTP daemon program - Ver. 4.2.8p12
Usage:  ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \
                [ <server1> ... <serverN> ]
Try 'ntpd --help' for more information.
/etc/rc.d/ntpd: WARNING: failed to start ntpd

But at least SNMP was working!

Anyway, after spending some hours fixing those problems I think I have finished upgrading this server successfully. All the software I mostly need is working. If I discover anything not working later, this is beyond the scope of this post.
 
Back
Top