[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] Cannot ssh to jails after upgrade to FreeBSD-6.2-RELEASE



Hello,

This is a report of a problem that started yesterday and that I just solved.

After upgrading the server and jails to FreeBSD-6.2-RELEASE, I've
stumbled with a odd problem. Some jails were acessible via ssh
and some were not. When I tried to ssh to a problemtic jail, I
received this error message:

ssh_exchange_identification: Connection closed by remote host

When I debugged the problem, trying to restart the sshd and even
regenerated ssh host keys, I received this error when initializing
the jail sshd:

ld-elf.so.1: Undefined symbol "strtonum"

Rebuilding and reinstalling the world and using ldd didn't help.

I finally found the cause to be that the problematic jails had some
directories that they shouldn't have: /lib and /libexec! And with files
of their own, not sync'd with the basejail's /lib and /libexec:

/usr/jails/spock/lib/
/usr/jails/spock/libexec/

/usr/jails/sulu/lib/
/usr/jails/sulu/libexec/

The correct jail directories should be:

/usr/jails/spock/lib@ -> /basejail/lib
/usr/jails/spock/libexec@ -> /basejail/libexec

/usr/jails/sulu/lib@ -> /basejail/lib
/usr/jails/sulu/libexec@ -> /basejail/libexec

The jails without problems had these symbolic links.

I removed the /lib and /libexec dirs of the problematic jails,
created the symlinks and life is good again.

I guess this was caused by creating these jails with an older
version of ezjail, like ezjail-1.2 or ezjail-1.3.

Don't ask me how the jails were running fine until I upgraded to
6.2-RELEASE, including the services and apps like ntp, sshd,
apache, mysql, cacti, nagios etc, etc.

Regards,

Alex