LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-18-2011, 04:00 PM   #1
medik
LQ Newbie
 
Registered: Sep 2011
Distribution: Slackware
Posts: 4

Rep: Reputation: Disabled
SNMPd will not start - segmentation error


Hi Linux users! I am using Slackware 13.1 and I need a little help regarding to my problem.

In my course to install MRTG I needed snmp running. Then I thought "Ow, lets check the /etc/rc.d/ directory for clues!", I found a script called "rc.snmpd" so I wrote:

# rc.snmpd start

And got the output:

Starting snmpd: /etc/rc.d/rc.snmpd: line 8: 12807 Segmentation fault /usr/sbin/snmpd $OPTIONS -c /etc/snmp/snmpd.conf
/usr/sbin/snmpd -A -p /var/run/snmpd -a -c /etc/snmp/snmpd.conf

The first thought was maybe it was a problem with the script, so I "vim:ed" the script and found nothing remarkable. On line 8, it says:

start() {
if [ -x /usr/sbin/snmpd -a -f /etc/snmp/snmpd.conf ]; then
echo -n "Starting snmpd: "
/usr/sbin/snmpd $OPTIONS -c /etc/snmp/snmpd.conf
echo " /usr/sbin/snmpd $OPTIONS -c /etc/snmp/snmpd.conf"
fi
}

Which does not say too much about the main problem.. Then I troubleshooted by writing the script by hand and found a clue. Hey, maybe it was not the script. It is in the program! So I searched on google and found nothing remarkable on "Segmentation fault + snmpd". Then I found somewhere it may be a error on the version of snmpd installed (5.5).

So I downloaded a new version (5.7) of snmpd. Compiled and installed, and got the same error message when I trying to start the daemon by writing /etc/rc.d/. The difference though, is when I writing snmpd alone. Then I got a new error message:

snmpd: error while loading shared libraries: libnetsnmpagent.so.30: cannot open shared object file: No such file or directory

What now?
 
Old 09-18-2011, 10:21 PM   #2
kforbus
Member
 
Registered: Sep 2009
Location: Maryland
Distribution: Slackware
Posts: 68

Rep: Reputation: 29
Did you already make the snmpd.conf file in the /etc/snmp directory? If I recall correctly, it isn't there by default, but there is a sample file you can copy or rename to snmpd.conf. Once you do that, the stock snmp daemon that installs with Slackware should work fine.
 
Old 09-19-2011, 12:22 AM   #3
medik
LQ Newbie
 
Registered: Sep 2011
Distribution: Slackware
Posts: 4

Original Poster
Rep: Reputation: Disabled
# ls -l /etc/snmp/
total 20
-rw-r--r-- 1 root root 18579 Jan 18 2010 snmpd.conf

It is probably one there by default. Here is an output of the content in the snmpd.conf file http://pastebay.com/138746
 
Old 09-19-2011, 11:38 PM   #4
kforbus
Member
 
Registered: Sep 2009
Location: Maryland
Distribution: Slackware
Posts: 68

Rep: Reputation: 29
Yeah, it probably is there by default. I am probably just remembering incorrectly. Not the first time that's happened and probably won't be the last.
Nothing jumps out at me as being a problem with that config file.

Since you mentioned that you are still getting the same error you got before and now you have a missing library with 5.7, you may want to roll back your 5.7 upgrade. Probably also wouldn't hurt to re-install the net-snmp package from your Slackware installation source as it should have all the libraries needed for that version.

Good luck and hope to hear back on your progress with this.
 
Old 09-20-2011, 02:48 PM   #5
medik
LQ Newbie
 
Registered: Sep 2011
Distribution: Slackware
Posts: 4

Original Poster
Rep: Reputation: Disabled
Now I changed mirror to be on the safe side.

#slackpkg remove net-snmp
#slackpkg install net-snmp

Ok, so far so good! When I try to start snmp with
#/etc/rc.d/rc.snmpd start

I get still the errormessage
# /etc/rc.d/rc.snmpd start
Starting snmpd: /etc/rc.d/rc.snmpd: line 8: 24575 Segmentation fault /usr/sbin/snmpd $OPTIONS -c /etc/snmp/snmpd.conf
/usr/sbin/snmpd -A -p /var/run/snmpd -a -c /etc/snmp/snmpd.conf

But when I trying to start snmp using the command on line 8 by hand, it actually works (it runs in console mode, if I hit Ctrl+C it stop running)! (output omitted here http://pastebay.com/138899)

But it bugs me, why does it not work when trying to start the daemon with the rc.smnpd start command? It is the same as doing it by input into console, right?

Here is the snmpd.conf: http://pastebay.com/138746
And here is the rc.snmpd: http://pastebay.com/138902

Thank you !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
snmpd not getting to start gitecravirs Linux - Newbie 1 05-23-2009 09:04 AM
snmpd not getting to start gitecravirs Linux - Newbie 3 05-22-2009 08:39 AM
snmpd: relocation error snmpd:undefined symbol: lastAddrAge Strike2000 Slackware 0 02-11-2008 04:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration