Error when starting SSHD

Hi,

I am trying to enable SSH connections to my FreeBSD 9.1 machine (my first BSD install).

When I type:

[CMD=""]/etc/rc.d/sshd start[/CMD]

I get the following:

Code:
Starting sshd.
/usr/sbin/sshd: Shared object has no run-time symbol table
/etc/rc.d/sshd: WARNING: failed to start sshd

Any ideas?
 
Is it a brand new system with no changes to the /etc/ssh/sshd_config file? It should work out of the box if so.

Maybe the binary got corrupted during the download. Try this and see if anything in bin or sbin get picked up as a bad checksum.
# freebsd-update IDS
 
I did what you recommended and I don't see anything in /bin or /sbin, but two in /usr/bin and /usr/sbin:

[CMD=""]
/usr/sbin/sshd
/usr/bin/split
[/CMD]

I'm not sure what steps I can take to resolve this though. What would you suggest?
 
What options did you change during install? This is not normal. If you didn't change anything, suspect hardware failure, maybe disk or memory.
 
I don't remember changing anything drastically during the install. Only selecting a few non-default options such as installing more documentation, not installing games etc.

I am trying another installation, and I'll post the steps I'm taking.

1. Welcoms screen: I select "Install"
2. Keymap Selection ("Would you like to set a non-default key mapping..."): I select "No"
3. Set Hostname: I enter "freebsd"
4. Distribution Select ("Choose optional system components to install..."): I unselect "games" and I select "src" to install source code.
5. Partitioning: I choose "Guided"
6. Partition: I choose "Entire Disk"
7. Confirmation ("This will erase the disk...proceed?"): I choose Yes
8. Partition Editor shows the following

ada0 74 GB GPT
ada0p1 64 kB freebsd-boot
ada0p2 70 GB freebsd-ufs /
ada0p3 3.7 GB freebsd-swap none

I choose "Finish".

9. Confirmation: I choose "Commit"
 
10. Archive extraction: During this process, I receive many, many of the following type of error message:

(ada0:ata0:0:0:0): WRITE_DMA. ACB: ca 00 fa d0 85 43 00 00 00 00 20 00
(ada0:ata0:0:0:0): CAM status: Command timeout
(ada0:ata0:0:0:0): Retrying command

This process continues for a long time.
 
That error is a hard drive error. I'm dealing with a similar issue with read errors on a disk that is in a ZFS pool and I plan on replacing it. If you want to get more details on the drive errors, you can install SMART and enable monitoring. This won't magically fix your problem but lets you keep an eye on it.

Code:
cd /usr/ports/sysutils/smartmontools/ && make install clean
cp /usr/local/etc/smartd.conf.sample /usr/local/etc/smartd.conf
echo 'daily_status_smart_devices="/dev/ada0"' >> /etc/periodic.conf
echo 'smartd_enable="YES"' >> /etc/rc.conf
service smartd start

Once it's installed, get full status on the drive.
# smartctl -a /dev/ada0
 
Before continuing, run a long SMART test on that disk, and don't be surprised if it fails. Or just replace it now.

mfsBSD is a very useful FreeBSD live CD/memory stick that has smartmontools already installed. So download it, make a CD or memory stick, boot from that, log in as root/mfsroot, and test the drive:

# smartctl -tlong /dev/ada0

Monitor the test while it's running with

# smartctl -a /dev/ada0 | less -S
 
Thanks for the quick responses. Since the consensus is that it's a hard disk failure, I'll just find another to swap in. No point in going through more hassle for an old disk.
 
I highly recommend what people have said about installing smartd. It has informed me of an impending hard drive failure before and meant I could take a backup before it failed. I would add one other detail though. At the bottom of the smartd.conf I added this based on the comments in that file:

Code:
/dev/ada0 -a -o on -S on -I 194 -W 4,45,55 -R 5 -m user@example.com -s (S/../.././02|L/../../6/03)

Change the email address to your own. This enables automatic offline self-testing and makes it run a short self test on a daily basis and an extended self test every week and if any issues show up it sends you an email. You can see what the other switches do in the man page.

I find that just relying on the periodic.conf check isn't good enough as all that does is check the overall status of the drive. You can have many errors on the drive but it can still show as PASSED. What I do shows up a warning at the very first hint of an error so it gives you time to deal with it rather than wait until it has got so bad it decides to FAIL the drive.
 
Back
Top