Fwd: snmpd agent does not want to reply
HI all, I have a 5.7.3 server and 5.9.1 clients running on different computers. The problem is the client does not get any answers from the server when running with the -d option I see a send and a receive of one packet (I presume authentication) and then a set of sends but not receives and finally Timeout: No Response from synology1. So connection is possible. On the server side I see the inverse receive and send and then receives with the correct interpretation of the request (a GET) but no replies What could be wrong ? W ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd as proxy v3
Hello, I have the following scenario: I have a Host P as snmpd I have a CoreSwitch as pool of vlan. Then I have a host p and q. P has o do snmp on CoreSwitch and collect data. Then p and q do snmpd on P host. All of them must be snmpv3 . Can I implement it with snmpd? Specially V3. --Regards Mohsen ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: net-snmpd crash
Dear Munuswamy. I am now implement a net-snmp agent and have many questions and problems. But I don't know anyone who help me. So I have tried to ask that site a question by sending an e-mail to 'Net-snmp-users@lists.sourceforge.net' but the title of the mail is only displayed on that site, the mail content isn't. Could you let me know how to ask a question at the net-snmp mailing-list[Sourceforge]. I have never found a solution to clear my problem. Please help me. Your emails to tell me how to ask questions will be a lot of strength for me. Best regards. = From: Velu Munuswamy [mailto:velumunusw...@gmail.com] Sent: Thursday, July 28, 2022 8:27 PM To: net-snmp-users@lists.sourceforge.net Subject: Reg: net-snmpd crash Hi, We are getting a segmentation fault in "run_config_handler" which is in net_snmpd library code. core dump is not consistent to reproduce the issue. Using net-snmp version 5.8. Below is the backtrace. << (gdb) bt #0 0x in ?? () #1 0x7ff35d9e4286 in run_config_handler (lptr=0x7ff2d0005840, lptr@entry=0x7ff29c0009d0, token=token@entry=0x7ff2c77fb490 "sysobjectid", cptr=cptr@entry=0x7ff29c01c34c ".1.3.6.1.4.1.39762.1.5", when=when@entry=0) at read_config.c:558 #2 0x7ff35d9e4def in read_config (filename=filename@entry=0x7ff2c77fc990 "/tmp//snmpd.conf", line_handler=0x7ff29c0009d0, when=when@entry=0) at read_config.c:977 #3 0x7ff35d9e5d8c in read_config_files_in_path (path=path@entry=0x28c737d "/tmp/:/tmp/pers", ctmp=ctmp@entry=0x7ff29c000940, when=when@entry=0, perspath=perspath@entry=0x7ff29c01b550 "/tmp/pers", persfile=persfile@entry=0x0) at read_config.c:1324 #4 0x7ff35d9e6172 in read_config_files_of_type (when=when@entry=0, ctmp=ctmp@entry=0x7ff29c000940) at read_config.c:1420 #5 0x7ff35d9e6233 in read_config_files (when=when@entry=0) at read_config.c:1448 #6 0x7ff35d9e6384 in read_configs () at read_config.c:1060 #7 0x0045f05f in SnmpdTask::run (this=0x7ff2a4000ff0) at src/snmpd_task.cpp:501 #8 0x0045f3ad in snmpd_ep (arg=) at src/snmpd_task.cpp:559 #9 0x7ff34f33bea5 in start_thread () from /lib64/libpthread.so.0 #10 0x7ff34e3fdb0d in clone () from /lib64/libc.so.6 (gdb) >> Not sure what is the reason for coredump. Need help on answering these questions! Thanks in advance. Regards, Velu ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Reg: net-snmpd crash
Hi, We are getting a segmentation fault in "run_config_handler" which is in net_snmpd library code. core dump is not consistent to reproduce the issue. Using net-snmp version 5.8. Below is the backtrace. << (gdb) bt #0 0x in ?? () #1 0x7ff35d9e4286 in run_config_handler (lptr=0x7ff2d0005840, lptr@entry=0x7ff29c0009d0, token=token@entry=0x7ff2c77fb490 "sysobjectid", cptr=cptr@entry=0x7ff29c01c34c ".1.3.6.1.4.1.39762.1.5", when=when@entry=0) at read_config.c:558 #2 0x7ff35d9e4def in read_config (filename=filename@entry=0x7ff2c77fc990 "/tmp//snmpd.conf", line_handler=0x7ff29c0009d0, when=when@entry=0) at read_config.c:977 #3 0x7ff35d9e5d8c in read_config_files_in_path (path=path@entry=0x28c737d "/tmp/:/tmp/pers", ctmp=ctmp@entry=0x7ff29c000940, when=when@entry=0, perspath=perspath@entry=0x7ff29c01b550 "/tmp/pers", persfile=persfile@entry=0x0) at read_config.c:1324 #4 0x7ff35d9e6172 in read_config_files_of_type (when=when@entry=0, ctmp=ctmp@entry=0x7ff29c000940) at read_config.c:1420 #5 0x7ff35d9e6233 in read_config_files (when=when@entry=0) at read_config.c:1448 #6 0x7ff35d9e6384 in read_configs () at read_config.c:1060 #7 0x0045f05f in SnmpdTask::run (this=0x7ff2a4000ff0) at src/snmpd_task.cpp:501 #8 0x0045f3ad in snmpd_ep (arg=) at src/snmpd_task.cpp:559 #9 0x7ff34f33bea5 in start_thread () from /lib64/libpthread.so.0 #10 0x7ff34e3fdb0d in clone () from /lib64/libc.so.6 (gdb) >> Not sure what is the reason for coredump. Need help on answering these questions! Thanks in advance. Regards, Velu ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd fails to send V3 Traps: Failed to find engine data
Hello, I am running snmpd on a Windows PC and am trying to get SNMP V3 traps/informs to work. No issues with V2c Traps/Informs. net-snmp-5.8 I created the V3 users and it is retrievable from the usmUserTable. Name/OID: usmUserSecurityName.7.128.0.41.136.120.120.136.10.76.72.97.121.101.115.84.101.115.116; Value (OctetString): LHayesTest Name/OID: usmUserCloneFrom.7.128.0.41.136.120.120.136.10.76.72.97.121.101.115.84.101.115.116; Value (OID): .0.0 Name/OID: usmUserAuthProtocol.7.128.0.41.136.120.120.136.10.76.72.97.121.101.115.84.101.115.116; Value (OID): usmHMACMD5AuthProtocol Name/OID: usmUserAuthKeyChange.7.128.0.41.136.120.120.136.10.76.72.97.121.101.115.84.101.115.116; Value (OctetString): Name/OID: usmUserOwnAuthKeyChange.7.128.0.41.136.120.120.136.10.76.72.97.121.101.115.84.101.115.116; Value (OctetString): Name/OID: usmUserPrivProtocol.7.128.0.41.136.120.120.136.10.76.72.97.121.101.115.84.101.115.116; Value (OID): usmDESPrivProtocol Name/OID: usmUserPrivKeyChange.7.128.0.41.136.120.120.136.10.76.72.97.121.101.115.84.101.115.116; Value (OctetString): Name/OID: usmUserOwnPrivKeyChange.7.128.0.41.136.120.120.136.10.76.72.97.121.101.115.84.101.115.116; Value (OctetString): Name/OID: usmUserPublic.7.128.0.41.136.120.120.136.10.76.72.97.121.101.115.84.101.115.116; Value (OctetString): Name/OID: usmUserStorageType.7.128.0.41.136.120.120.136.10.76.72.97.121.101.115.84.101.115.116; Value (Integer): readOnly (5) Name/OID: usmUserStatus.7.128.0.41.136.120.120.136.10.76.72.97.121.101.115.84.101.115.116; Value (Integer): active (1) When I generate a condition that should trigger an Inform I see the following in the log of snmpd. usm: USM processing has begun (offset 113) usm: getting user LHayesTest usm: match on user LHayesTest usm: Failed to find engine data. usm: Signing failed. snmpd: send_trap: USM authentication failure (incorrect password or key) My engineBoots always has a value of 1 in the persist file snmpd.conf. Not sure if this is somehow causing an issue, but worth noting as I have read engineBoots of 1 might affect V3. The process I use to manage the daemon: 1) write trap/inform directives in a snmpd.local.conf 2) kill snmpd, remove all usmUser directives 3) add createUser directives 4) start snmpd again. So can anyone help with why I am seeing the 'Failed to find engine data' which I think is the cause of the inform not being sent out? Or other suggestions. Thanks in advance Larry Hayes ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd not responding?
I’m on the local machine. SNMPD is running (ps -ef | grep snmpd). I see the ports open (netstat -a -n | grep 161). I’m doing “snmpwalk -v2c -c $STRING localhost SNMPv2-MIB::sysDescr.0” and getting a timeout response. How to fix this? Mike ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Ref. snmpd question
Mauricio Giovagnini via Net-snmp-users writes: > 1. First of all make install will copy the binary to > /usr/local/sbin/snmpd even if doing a $ sudo make install > So the simple process was to copy it to the location expected > $ sudo cp /usr/local/sbin/snmpd /usr/sbin/ The use of /usr/local is pretty standard for open source packages to default to as an installation path. If you run ./configure --help |& grep -i prefix You'll find that you can set the installation paths you wish to use, including where to look for config files. -- Wes Hardaker USC/ISI ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Ref. snmpd question
Well, I finally find the answer. I will post here so others can benefit from it if they have a similar issue 1. First of all make install will copy the binary to /usr/local/sbin/snmpd even if doing a $ sudo make install So the simple process was to copy it to the location expected $ sudo cp /usr/local/sbin/snmpd /usr/sbin/ 2. Then I executed to know where the process will look for the snmpd.conf file $ /usr/sbin/snmpd -L -p 3009 -Dread_config I found that it will look by default at /usr/local/etc/snmp/snmpd.conf Doing a restart of the service did the job at least for me to start understanding how this works Regards El miércoles, 22 de diciembre de 2021 21:40:35 ART, Mauricio Giovagnini via Net-snmp-users escribió: Hi all, I am just starting with the project willing to do a custom snmp agent. To do it my first step was to be able to build the default one and then start "playing" with other stuff but first I wanted to be sure that the default stuff was working. Let me explain what I did and then which is the problem I have I am working on an Ubuntu 20.04 64bit 1. The first thing I tried is to install the default stuff from Ubuntu, so I did an $ sudo apt install snmpd Then I edited the /etc/snmp/snmpd.conf file to open the agent at 161 , by adding agentaddress udp:161,udp6:[::1]:161 I restarted the snmpd daemon using $ sudo systemctl restart snmpd And there I have the 161 port open and I can snmpwalk from localhost and from other computers in the lan. So this approach is working I also played adding users with permissions and I walked the default mib using snmp v1, v2c and v3 perfectly. 2. Now let me show what didn't worked 2.a) I removed the snmpd file by doing $ sudo apt uninstall snmpd to have a clean system 2.b) I downloaded net-snmp-5.9.1 code 2.c) I executed $ ./configure --with-systemd (I did it also without this parameter but was worst I think) 2.d) I then did a $make && sudo make install 2.e) I think I did a $ sudo systemctl unmask snmpd ( I do not recall exactly because I did this too many times without sucess) 2.f) Typying $ snmpd --version shows NET-SNMP version: 5.9.1 Web: http://www.net-snmp.org/ Email: net-snmp-cod...@lists.sourceforge.net 2.g) Doing a $ sudo systemctl status snmpd ● snmpd.service - LSB: SNMP agents Loaded: loaded (/etc/init.d/snmpd; generated) Active: active (exited) since Wed 2021-12-22 20:26:45 -03; 35min ago Docs: man:systemd-sysv-generator(8) Process: 1496658 ExecStart=/etc/init.d/snmpd start (code=exited, status=0/SUCCESS) dic 22 20:26:45 pc-devlinux systemd[1]: Starting LSB: SNMP agents... dic 22 20:26:45 pc-devlinux systemd[1]: Started LSB: SNMP agents. With a green dot in the left. But no 161 port open 2.g) Doing a $ sudo systemctl stop snmpd or $ sudo systemctl restart snmpd do not solved the problem So here are my questions: So the thing is that I am confused. 3) Shouldn't it read it should read the file which is at /etc/snmp/snmpd.conf ? I did not touched the /var/lib/snmp/snmpd.conf which has a lot of text saying do not change this file I also tried to execute the file as /usr/local/sbin/snmpd -c /etc/snmp/snmpd.conf but without luck 4) Is there something too obvious I am missing? It's been to many hours with this and may be someone can bring some light to me Thanks in advance ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Ref. snmpd question
Hi all, I am just starting with the project willing to do a custom snmp agent. To do it my first step was to be able to build the default one and then start "playing" with other stuff but first I wanted to be sure that the default stuff was working. Let me explain what I did and then which is the problem I have I am working on an Ubuntu 20.04 64bit 1. The first thing I tried is to install the default stuff from Ubuntu, so I did an $ sudo apt install snmpd Then I edited the /etc/snmp/snmpd.conf file to open the agent at 161 , by adding agentaddress udp:161,udp6:[::1]:161 I restarted the snmpd daemon using $ sudo systemctl restart snmpd And there I have the 161 port open and I can snmpwalk from localhost and from other computers in the lan. So this approach is working I also played adding users with permissions and I walked the default mib using snmp v1, v2c and v3 perfectly. 2. Now let me show what didn't worked 2.a) I removed the snmpd file by doing $ sudo apt uninstall snmpd to have a clean system 2.b) I downloaded net-snmp-5.9.1 code 2.c) I executed $ ./configure --with-systemd (I did it also without this parameter but was worst I think) 2.d) I then did a $make && sudo make install 2.e) I think I did a $ sudo systemctl unmask snmpd ( I do not recall exactly because I did this too many times without sucess) 2.f) Typying $ snmpd --version shows NET-SNMP version: 5.9.1 Web: http://www.net-snmp.org/ Email: net-snmp-cod...@lists.sourceforge.net 2.g) Doing a $ sudo systemctl status snmpd ● snmpd.service - LSB: SNMP agents Loaded: loaded (/etc/init.d/snmpd; generated) Active: active (exited) since Wed 2021-12-22 20:26:45 -03; 35min ago Docs: man:systemd-sysv-generator(8) Process: 1496658 ExecStart=/etc/init.d/snmpd start (code=exited, status=0/SUCCESS) dic 22 20:26:45 pc-devlinux systemd[1]: Starting LSB: SNMP agents... dic 22 20:26:45 pc-devlinux systemd[1]: Started LSB: SNMP agents. With a green dot in the left. But no 161 port open 2.g) Doing a $ sudo systemctl stop snmpd or $ sudo systemctl restart snmpd do not solved the problem So here are my questions: So the thing is that I am confused. 3) Shouldn't it read it should read the file which is at /etc/snmp/snmpd.conf ? I did not touched the /var/lib/snmp/snmpd.conf which has a lot of text saying do not change this file I also tried to execute the file as /usr/local/sbin/snmpd -c /etc/snmp/snmpd.conf but without luck 4) Is there something too obvious I am missing? It's been to many hours with this and may be someone can bring some light to me Thanks in advance ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: createUser not updated after snmpd stop and start in 5.8
I also create V3 users with the procedure you indicate. When you stop snmpd, it writes the persistence file. So you cannot edit that file while snmpd is running. The procedure that works for me: 1) Stop snmpd 2) Wait for PID of snmpd to go away, if you have a large number of V3 users, it lengthens the time for the snmpd to write the persistence file. 3) Start snmpd On Sun, Sep 12, 2021 at 9:02 AM Saleem wrote: > Hi > I am using net-snmp v 5.8 version in a custom Linux setup. I have > configured a V3 user by following the below steps. > > 1. Update the createUser directive in persistent snmpd conf file > (var/net-snmp/snmpd.conf in my system) > createUser testsnmpv3user SHA TestAuth123p AES128 Testpriv123p > 2. stop the snmpd process with #kill > 3.start snmpd > > After starting snmpd, the createUser entry is removed from > /vare/net-snmp/snmpd.con file and also the corresponding usmUser entry with > localized keysis not created. > I see snmpd is not recognizing the added createUsert line in the > persistent file. > snmpwalk is falling with "USM unknown security name (no such user exists)" > > However if I change the order of 1 and 2 above by stopping snmpd first and > then updating the createUser line, then I see the usmUser line is updated > successfully. > snmpwalk and sending traps is working fine. > Not sure whether we need some sleep in between snmpd restart. > > What is the correct step to follow when creating a V3 user? > Is there some delay need to be given between snmpd stop/start ? > > Thanks in advance, > Salim Malik > ___ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users > ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
createUser not updated after snmpd stop and start in 5.8
Hi I am using net-snmp v 5.8 version in a custom Linux setup. I have configured a V3 user by following the below steps. 1. Update the createUser directive in persistent snmpd conf file (var/net-snmp/snmpd.conf in my system) createUser testsnmpv3user SHA TestAuth123p AES128 Testpriv123p 2. stop the snmpd process with #kill 3.start snmpd After starting snmpd, the createUser entry is removed from /vare/net-snmp/snmpd.con file and also the corresponding usmUser entry with localized keysis not created. I see snmpd is not recognizing the added createUsert line in the persistent file. snmpwalk is falling with "USM unknown security name (no such user exists)" However if I change the order of 1 and 2 above by stopping snmpd first and then updating the createUser line, then I see the usmUser line is updated successfully. snmpwalk and sending traps is working fine. Not sure whether we need some sleep in between snmpd restart. What is the correct step to follow when creating a V3 user? Is there some delay need to be given between snmpd stop/start ? Thanks in advance, Salim Malik ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: SNMPd cores
Kindly help for the below core dumps. Thank you Krishna Vivek From: Krishna Vivek Vitta via Net-snmp-users Sent: 22 April 2021 09:01 To: net-snmp-users@lists.sourceforge.net Subject: RE: SNMPd cores [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments unless you have verified the sender and know the content is safe. Hi experts Any inputs that can be suggested. Thank you Krishna Vivek From: Krishna Vivek Vitta via Net-snmp-users mailto:net-snmp-users@lists.sourceforge.net>> Sent: 19 April 2021 20:22 To: Subject: SNMPd cores [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments unless you have verified the sender and know the content is safe. Hi Team We are seeing below snmpd cores. Please provide your input of what can cause these and measures to mitigate. #0 0x000800d99f5c in md5_block_asm_data_order () from /lib/libcrypto.so.6 #1 0x0003 in ?? () #2 0x01c6c1c0 in ?? () #3 0x00071b07 in ?? () #4 0x000801c42f20 in ?? () #5 0x000800d99e06 in MD5_Update () from /lib/libcrypto.so.6 #6 0x0008009564d6 in sc_hash_type () from /lib/libnetsnmp.so.35 #7 0x00080095639d in sc_hash () from /lib/libnetsnmp.so.35 #8 0x000800953817 in hash_engineID () from /lib/libnetsnmp.so.35 #9 0x000800953720 in search_enginetime_list () from /lib/libnetsnmp.so.35 #10 0x000800952f06 in get_enginetime () from /lib/libnetsnmp.so.35 #11 0x0008009748dc in usm_rgenerate_out_msg () from /lib/libnetsnmp.so.35 #12 0x00080097437a in usm_secmod_rgenerate_out_msg () from /lib/libnetsnmp.so.35 #13 0x000800921cb7 in snmpv3_packet_realloc_rbuild () from /lib/libnetsnmp.so.35 #14 0x00080091fb7d in snmp_close_sessions () from /lib/libnetsnmp.so.35 #15 0x0008009225f5 in snmpv3_packet_build () from /lib/libnetsnmp.so.35 #16 0x000800923898 in snmp_build () from /lib/libnetsnmp.so.35 #17 0x00080092ab53 in netsnmp_build_packet () from /lib/libnetsnmp.so.35 #18 0x00080092b255 in _build_initial_pdu_packet () from /lib/libnetsnmp.so.35 #19 0x000800689b14 in netsnmp_wrap_up_request () from /lib/libnetsnmpagent.so.35 #20 0x00080068e098 in netsnmp_handle_request () from /lib/libnetsnmpagent.so.35 #21 0x00080068a849 in handle_snmp_packet () from /lib/libnetsnmpagent.so.35 #22 0x00080092cfbe in snmp_create_sess_pdu () from /lib/libnetsnmp.so.35 #23 0x00080092d158 in snmp_create_sess_pdu () from /lib/libnetsnmp.so.35 #24 0x00080092dda4 in _sess_read () from /lib/libnetsnmp.so.35 #25 0x00080092ebbd in snmp_sess_read2 () from /lib/libnetsnmp.so.35 #26 0x00080092d318 in snmp_read2 () from /lib/libnetsnmp.so.35 #27 0x00404a5a in receive () #28 0x004043b2 in main () #0 0x0008015bafe6 in memmove () from /lib/libc.so.7 #1 0x0008008f9c0c in snmp_clone_var () from /lib/libnetsnmp.so.35 #2 0x0008008fa1f2 in snmp_reset_var_buffers () from /lib/libnetsnmp.so.35 #3 0x0008008fa311 in snmp_reset_var_buffers () from /lib/libnetsnmp.so.35 #4 0x0008008fa367 in snmp_reset_var_buffers () from /lib/libnetsnmp.so.35 #5 0x0008008fa3ca in snmp_clone_pdu () from /lib/libnetsnmp.so.35 #6 0x00080068442e in send_trap_to_sess () from /lib/libnetsnmpagent.so.35 #7 0x0008006835a4 in netsnmp_send_traps () from /lib/libnetsnmpagent.so.35 #8 0x00080068365f in send_enterprise_trap_vars () from /lib/libnetsnmpagent.so.35 #9 0x0008006846b6 in send_trap_vars () from /lib/libnetsnmpagent.so.35 #10 0x00080068477e in send_easy_trap () from /lib/libnetsnmpagent.so.35 #11 0x00404603 in receive () #12 0x004043b2 in main () #0 0x000801546c05 in _malloc_prefork () from /lib/libc.so.7 #1 0x00080154c44a in free () from /lib/libc.so.7 #2 0x00080092c00e in snmp_free_var () from /lib/libnetsnmp.so.35 #3 0x00080092c032 in snmp_free_varbind () from /lib/libnetsnmp.so.35 #4 0x00080092c0a9 in snmp_free_pdu () from /lib/libnetsnmp.so.35 #5 0x00080068349e in netsnmp_send_traps () from /lib/libnetsnmpagent.so.35 #6 0x00080068365f in send_enterprise_trap_vars () from /lib/libnetsnmpagent.so.35 #7 0x0008006846d6 in send_trap_vars () from /lib/libnetsnmpagent.so.35 #8 0x00080068477e in send_easy_trap () from /lib/libnetsnmpagent.so.35 #9 0x00080068a706 in handle_snmp_packet () from /lib/libnetsnmpagent.so.35 #10 0x00080097926d in usm_handle_report () from /lib/libnetsnmp.so.35 #11 0x000800928c14 in snmpv3_get_report_type () from /lib/libnetsnmp.so.35 #12 0x000800929258 in snmp_parse () from /lib/libnetsnmp.so.35 #13 0x00080092c876 in snmp_create_sess_pdu () from /lib/libnetsnmp.so.35 #14 0x00080092d125 in snmp_create_sess_pdu () from /lib/libnetsnmp.so.35 #15 0x00080092dda4 in _sess_read () from /lib/libnetsnmp.so.35 #16 0x00080092ebbd in snmp_sess_read2 () from /lib/libnetsnmp.so.35 #17 0x00080092d318 in snmp_read2 () from /lib/libnetsnmp.so.35 #18 0x00404a5a in r
RE: SNMPd cores
Hi experts Any inputs that can be suggested. Thank you Krishna Vivek From: Krishna Vivek Vitta via Net-snmp-users Sent: 19 April 2021 20:22 To: Subject: SNMPd cores [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments unless you have verified the sender and know the content is safe. Hi Team We are seeing below snmpd cores. Please provide your input of what can cause these and measures to mitigate. #0 0x000800d99f5c in md5_block_asm_data_order () from /lib/libcrypto.so.6 #1 0x0003 in ?? () #2 0x01c6c1c0 in ?? () #3 0x00071b07 in ?? () #4 0x000801c42f20 in ?? () #5 0x000800d99e06 in MD5_Update () from /lib/libcrypto.so.6 #6 0x0008009564d6 in sc_hash_type () from /lib/libnetsnmp.so.35 #7 0x00080095639d in sc_hash () from /lib/libnetsnmp.so.35 #8 0x000800953817 in hash_engineID () from /lib/libnetsnmp.so.35 #9 0x000800953720 in search_enginetime_list () from /lib/libnetsnmp.so.35 #10 0x000800952f06 in get_enginetime () from /lib/libnetsnmp.so.35 #11 0x0008009748dc in usm_rgenerate_out_msg () from /lib/libnetsnmp.so.35 #12 0x00080097437a in usm_secmod_rgenerate_out_msg () from /lib/libnetsnmp.so.35 #13 0x000800921cb7 in snmpv3_packet_realloc_rbuild () from /lib/libnetsnmp.so.35 #14 0x00080091fb7d in snmp_close_sessions () from /lib/libnetsnmp.so.35 #15 0x0008009225f5 in snmpv3_packet_build () from /lib/libnetsnmp.so.35 #16 0x000800923898 in snmp_build () from /lib/libnetsnmp.so.35 #17 0x00080092ab53 in netsnmp_build_packet () from /lib/libnetsnmp.so.35 #18 0x00080092b255 in _build_initial_pdu_packet () from /lib/libnetsnmp.so.35 #19 0x000800689b14 in netsnmp_wrap_up_request () from /lib/libnetsnmpagent.so.35 #20 0x00080068e098 in netsnmp_handle_request () from /lib/libnetsnmpagent.so.35 #21 0x00080068a849 in handle_snmp_packet () from /lib/libnetsnmpagent.so.35 #22 0x00080092cfbe in snmp_create_sess_pdu () from /lib/libnetsnmp.so.35 #23 0x00080092d158 in snmp_create_sess_pdu () from /lib/libnetsnmp.so.35 #24 0x00080092dda4 in _sess_read () from /lib/libnetsnmp.so.35 #25 0x00080092ebbd in snmp_sess_read2 () from /lib/libnetsnmp.so.35 #26 0x00080092d318 in snmp_read2 () from /lib/libnetsnmp.so.35 #27 0x00404a5a in receive () #28 0x004043b2 in main () #0 0x0008015bafe6 in memmove () from /lib/libc.so.7 #1 0x0008008f9c0c in snmp_clone_var () from /lib/libnetsnmp.so.35 #2 0x0008008fa1f2 in snmp_reset_var_buffers () from /lib/libnetsnmp.so.35 #3 0x0008008fa311 in snmp_reset_var_buffers () from /lib/libnetsnmp.so.35 #4 0x0008008fa367 in snmp_reset_var_buffers () from /lib/libnetsnmp.so.35 #5 0x0008008fa3ca in snmp_clone_pdu () from /lib/libnetsnmp.so.35 #6 0x00080068442e in send_trap_to_sess () from /lib/libnetsnmpagent.so.35 #7 0x0008006835a4 in netsnmp_send_traps () from /lib/libnetsnmpagent.so.35 #8 0x00080068365f in send_enterprise_trap_vars () from /lib/libnetsnmpagent.so.35 #9 0x0008006846b6 in send_trap_vars () from /lib/libnetsnmpagent.so.35 #10 0x00080068477e in send_easy_trap () from /lib/libnetsnmpagent.so.35 #11 0x00404603 in receive () #12 0x004043b2 in main () #0 0x000801546c05 in _malloc_prefork () from /lib/libc.so.7 #1 0x00080154c44a in free () from /lib/libc.so.7 #2 0x00080092c00e in snmp_free_var () from /lib/libnetsnmp.so.35 #3 0x00080092c032 in snmp_free_varbind () from /lib/libnetsnmp.so.35 #4 0x00080092c0a9 in snmp_free_pdu () from /lib/libnetsnmp.so.35 #5 0x00080068349e in netsnmp_send_traps () from /lib/libnetsnmpagent.so.35 #6 0x00080068365f in send_enterprise_trap_vars () from /lib/libnetsnmpagent.so.35 #7 0x0008006846d6 in send_trap_vars () from /lib/libnetsnmpagent.so.35 #8 0x00080068477e in send_easy_trap () from /lib/libnetsnmpagent.so.35 #9 0x00080068a706 in handle_snmp_packet () from /lib/libnetsnmpagent.so.35 #10 0x00080097926d in usm_handle_report () from /lib/libnetsnmp.so.35 #11 0x000800928c14 in snmpv3_get_report_type () from /lib/libnetsnmp.so.35 #12 0x000800929258 in snmp_parse () from /lib/libnetsnmp.so.35 #13 0x00080092c876 in snmp_create_sess_pdu () from /lib/libnetsnmp.so.35 #14 0x00080092d125 in snmp_create_sess_pdu () from /lib/libnetsnmp.so.35 #15 0x00080092dda4 in _sess_read () from /lib/libnetsnmp.so.35 #16 0x00080092ebbd in snmp_sess_read2 () from /lib/libnetsnmp.so.35 #17 0x00080092d318 in snmp_read2 () from /lib/libnetsnmp.so.35 #18 0x00404a5a in receive () #19 0x004043b2 in main () Following is the snmpd.conf sysContact pl...@de.ibm.com<mailto:pl...@de.ibm.com> sysLocation FR-PAR,PAR7-1R126,D02,38-39 sysName FR-PAR-EXT-LBA-01 # snmpd Configuration File # # Copy this file to /mpsconfig, and make changes to /mpsconfig/snmpd.conf # Changes in /etc/snmpd.conf will be lost following a reboot. # # The following are examp
SNMPd cores
Hi Team We are seeing below snmpd cores. Please provide your input of what can cause these and measures to mitigate. #0 0x000800d99f5c in md5_block_asm_data_order () from /lib/libcrypto.so.6 #1 0x0003 in ?? () #2 0x01c6c1c0 in ?? () #3 0x00071b07 in ?? () #4 0x000801c42f20 in ?? () #5 0x000800d99e06 in MD5_Update () from /lib/libcrypto.so.6 #6 0x0008009564d6 in sc_hash_type () from /lib/libnetsnmp.so.35 #7 0x00080095639d in sc_hash () from /lib/libnetsnmp.so.35 #8 0x000800953817 in hash_engineID () from /lib/libnetsnmp.so.35 #9 0x000800953720 in search_enginetime_list () from /lib/libnetsnmp.so.35 #10 0x000800952f06 in get_enginetime () from /lib/libnetsnmp.so.35 #11 0x0008009748dc in usm_rgenerate_out_msg () from /lib/libnetsnmp.so.35 #12 0x00080097437a in usm_secmod_rgenerate_out_msg () from /lib/libnetsnmp.so.35 #13 0x000800921cb7 in snmpv3_packet_realloc_rbuild () from /lib/libnetsnmp.so.35 #14 0x00080091fb7d in snmp_close_sessions () from /lib/libnetsnmp.so.35 #15 0x0008009225f5 in snmpv3_packet_build () from /lib/libnetsnmp.so.35 #16 0x000800923898 in snmp_build () from /lib/libnetsnmp.so.35 #17 0x00080092ab53 in netsnmp_build_packet () from /lib/libnetsnmp.so.35 #18 0x00080092b255 in _build_initial_pdu_packet () from /lib/libnetsnmp.so.35 #19 0x000800689b14 in netsnmp_wrap_up_request () from /lib/libnetsnmpagent.so.35 #20 0x00080068e098 in netsnmp_handle_request () from /lib/libnetsnmpagent.so.35 #21 0x00080068a849 in handle_snmp_packet () from /lib/libnetsnmpagent.so.35 #22 0x00080092cfbe in snmp_create_sess_pdu () from /lib/libnetsnmp.so.35 #23 0x00080092d158 in snmp_create_sess_pdu () from /lib/libnetsnmp.so.35 #24 0x00080092dda4 in _sess_read () from /lib/libnetsnmp.so.35 #25 0x00080092ebbd in snmp_sess_read2 () from /lib/libnetsnmp.so.35 #26 0x00080092d318 in snmp_read2 () from /lib/libnetsnmp.so.35 #27 0x00404a5a in receive () #28 0x004043b2 in main () #0 0x0008015bafe6 in memmove () from /lib/libc.so.7 #1 0x0008008f9c0c in snmp_clone_var () from /lib/libnetsnmp.so.35 #2 0x0008008fa1f2 in snmp_reset_var_buffers () from /lib/libnetsnmp.so.35 #3 0x0008008fa311 in snmp_reset_var_buffers () from /lib/libnetsnmp.so.35 #4 0x0008008fa367 in snmp_reset_var_buffers () from /lib/libnetsnmp.so.35 #5 0x0008008fa3ca in snmp_clone_pdu () from /lib/libnetsnmp.so.35 #6 0x00080068442e in send_trap_to_sess () from /lib/libnetsnmpagent.so.35 #7 0x0008006835a4 in netsnmp_send_traps () from /lib/libnetsnmpagent.so.35 #8 0x00080068365f in send_enterprise_trap_vars () from /lib/libnetsnmpagent.so.35 #9 0x0008006846b6 in send_trap_vars () from /lib/libnetsnmpagent.so.35 #10 0x00080068477e in send_easy_trap () from /lib/libnetsnmpagent.so.35 #11 0x00404603 in receive () #12 0x004043b2 in main () #0 0x000801546c05 in _malloc_prefork () from /lib/libc.so.7 #1 0x00080154c44a in free () from /lib/libc.so.7 #2 0x00080092c00e in snmp_free_var () from /lib/libnetsnmp.so.35 #3 0x00080092c032 in snmp_free_varbind () from /lib/libnetsnmp.so.35 #4 0x00080092c0a9 in snmp_free_pdu () from /lib/libnetsnmp.so.35 #5 0x00080068349e in netsnmp_send_traps () from /lib/libnetsnmpagent.so.35 #6 0x00080068365f in send_enterprise_trap_vars () from /lib/libnetsnmpagent.so.35 #7 0x0008006846d6 in send_trap_vars () from /lib/libnetsnmpagent.so.35 #8 0x00080068477e in send_easy_trap () from /lib/libnetsnmpagent.so.35 #9 0x00080068a706 in handle_snmp_packet () from /lib/libnetsnmpagent.so.35 #10 0x00080097926d in usm_handle_report () from /lib/libnetsnmp.so.35 #11 0x000800928c14 in snmpv3_get_report_type () from /lib/libnetsnmp.so.35 #12 0x000800929258 in snmp_parse () from /lib/libnetsnmp.so.35 #13 0x00080092c876 in snmp_create_sess_pdu () from /lib/libnetsnmp.so.35 #14 0x00080092d125 in snmp_create_sess_pdu () from /lib/libnetsnmp.so.35 #15 0x00080092dda4 in _sess_read () from /lib/libnetsnmp.so.35 #16 0x00080092ebbd in snmp_sess_read2 () from /lib/libnetsnmp.so.35 #17 0x00080092d318 in snmp_read2 () from /lib/libnetsnmp.so.35 #18 0x00404a5a in receive () #19 0x004043b2 in main () Following is the snmpd.conf sysContact pl...@de.ibm.com sysLocation FR-PAR,PAR7-1R126,D02,38-39 sysName FR-PAR-EXT-LBA-01 # snmpd Configuration File # # Copy this file to /mpsconfig, and make changes to /mpsconfig/snmpd.conf # Changes in /etc/snmpd.conf will be lost following a reboot. # # The following are example for snmpd.conf. # #SNMP Trap Destination example #trap2sink 1.2.3.4:162 public sysobjectid 1.3.6.1.4.1.5951.6 [snmp] logTimestamp 1 exactEngineID 0x80001f888082c995074288e055 view TIVOLI included 1.3.6.1 rouser itnmusr authPriv -V TIVOLI rouser visionuser authPriv -V TIVOLI rouser eudediscosnmp authPriv -V TIVOLI trapsess -v 3 -u itnmusr -l
snmpd core with "double free or corruption (fasttop)" in 5.8
Hi Experts, we upgraded the net-snmp recently in our project to the 5.8 version. One of our Linux box got a snmpd core with below backtrace pointing to agentx_master_handler() call. Generating backtrace for core.snmpd.6.4.3e.7403 Using /usr/sbin/snmpd to generate backtrace for core.snmpd.6.4.3e.7403 [New LWP 7403] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/usr/sbin/snmpd -f -Lsd -M+/sw/unicorn/snmp/mibs -Dtrap -Dusm -Dinit_mibs -I-sy'. Program terminated with signal 6, Aborted. #0 0x7f348df14f57 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:63 #0 0x7f348df14f57 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:63 resultvar = 0 pid = 7403 selftid = 7403 #1 0x7f348df16418 in __GI_abort () at abort.c:90 save_stage = 2 act = {__sigaction_handler = {sa_handler = 0x7ffd80c6b47a, sa_sigaction = 0x7ffd80c6b47a}, sa_mask = {__val = {6, 139863697671872, 2, 140726763959438, 2, 139863697662956, 1, 139863697671868, 3, 140726763959412, 12, 139863697671872, 2, 140726763960224, 20, 140726763961984}}, sa_flags = 100, sa_restorer = 0x7} sigs = {__val = {32, 0 }} #2 0x7f348df52e3b in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7f348e0468a0 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:197 ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7ffd80c6be90, reg_save_area = 0x7ffd80c6bda0}} ap_copy = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7ffd80c6be90, reg_save_area = 0x7ffd80c6bda0}} fd = 2 on_2 = list = nlist = cp = written = #3 0x7f348df589be in malloc_printerr (ptr=, str=0x7f348e046a00 "double free or corruption (fasttop)", action=3, ar_ptr=) at malloc.c:4855 buf = "01007c40" cp = #4 malloc_printerr (action=3, str=0x7f348e046a00 "double free or corruption (fasttop)", ptr=, ar_ptr=) at malloc.c:4836 No locals. #5 0x7f348fedb269 in agentx_master_handler () from /usr/lib64/libnetsnmpagent.so.35 No symbol table info available. #6 0x7f348fec5dcf in netsnmp_call_handlers () from /usr/lib64/libnetsnmpagent.so.35 No symbol table info available. #7 0x7f348fed6a95 in handle_var_requests () from /usr/lib64/libnetsnmpagent.so.35 No symbol table info available. #8 0x7f348fed7baf in handle_pdu () from /usr/lib64/libnetsnmpagent.so.35 No symbol table info available. #9 0x7f348fed7dc8 in netsnmp_handle_request () from /usr/lib64/libnetsnmpagent.so.35 No symbol table info available. #10 0x7f348fed887a in handle_snmp_packet () from /usr/lib64/libnetsnmpagent.so.35 No symbol table info available. #11 0x7f348f6e7517 in ?? () from /usr/lib64/libnetsnmp.so.35 No symbol table info available. #12 0x7f348f6e88f0 in _sess_read () from /usr/lib64/libnetsnmp.so.35 No symbol table info available. #13 0x7f348f6e8f09 in snmp_sess_read2 () from /usr/lib64/libnetsnmp.so.35 No symbol table info available. #14 0x7f348f6e8fbb in snmp_read2 () from /usr/lib64/libnetsnmp.so.35 No symbol table info available. #15 0x7f348f6bdd1a in snmp_synch_response_cb () from /usr/lib64/libnetsnmp.so.35 No symbol table info available. #16 0x7f348f6be19b in ?? () from /usr/lib64/libnetsnmp.so.35 No symbol table info available. #17 0x7f348fa82495 in mteTrigger_run () from /usr/lib64/libnetsnmpmibs.so.35 No symbol table info available. #18 0x7f348f70b997 in run_alarms () from /usr/lib64/libnetsnmp.so.35 No symbol table info available. #19 0x0040448a in ?? () No symbol table info available. #20 0x00403b1b in ?? () No symbol table info available. #21 0x7f348df01865 in __libc_start_main (main=0x402900, argc=20, ubp_av=0x7ffd80c6cb68, init=, fini=, rtld_fini=, stack_end=0x7ffd80c6cb58) at libc-start.c:274 result = unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -7221113138933426041, 4210716, 140726763965280, 0, 0, 7219958867996153991, 7322967600052148359}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x4048e0, 0x7ffd80c6cb68}, data = {prev = 0x0, cleanup = 0x0, canceltype = 4212960}}} not_first_call = #22 0x00404045 in ?? () No symbol table info available. There are also lot of "snmpd: send_trap: Timeout" messages I could see a similar bug in net-snmp but not sure it is same https://sourceforge.net/p/net-snmp/mailman/message/36702965/ Your help is highly appreciated Thanks and Regards, Salim C ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: snmpd crashes when wlan0 interface acquire IP address
Hi John, I found out the root cause of the issue: it is already addressed by a patch in the latest net-snmp version (i.e. I was using net-snmp 5.8) https://sourceforge.net/p/net-snmp/bugs/2914/ Thanks & Regards -Himanshu On Sun, Jul 12, 2020 at 5:33 AM John Bize wrote: > Sorry Himanshu, > > I checked out the v5.8 tag, but my line numbers just don't line up with > yours. It does look like you may have found a double or corrupt memory > free. > > The devs have repeatedly asked that people not contact them directly, but > I've been waiting a week for a response to one of my inquiries, and 4 days > for the other. They might be on holiday. Good luck. > > John > On 10-Jul-2020 6:51 PM, Himanshu Sharma wrote: > > Hi John, > > Thanks for the courtesy . > I am using Subagent. > Here is a thread of discussion on the same > https://sourceforge.net/p/net-snmp/mailman/message/37018116/. > Actually ,If I shut down Subagent before bringing up WiFi ,snmpd doesn't > crash.Looks like a crash was due to some communication problem between > snmpd & Subagent. > However, when I start my Subagent post WiFi is brought up ,it is not > behaving properly. , > i.e. snmpwalk on some of the OID's keep on iterating forever and the > Subagent process crashes after some time..I am not sure maybe it can be due > to some other issue..I will check. > hrDeviceStatus.1 (INTEGER) 0 > hrDeviceStatus.2 (INTEGER) 0 > hrDeviceStatus.3 (INTEGER) 0 > hrDeviceStatus.4 (INTEGER) 0 > hrDeviceStatus.5 (INTEGER) 0 > hrDeviceStatus.6 (INTEGER) 0 > hrDeviceStatus.7 (INTEGER) 0 ... > .... > > *Now, Some updates on previous case (i.e. **snmpd crashes when wlan0 > interface acquires IP address).* > > *As we know snmpd crashes , these are my new findings :* > > *I see this function.* > > *netsnmp_free_delegated_cache(netsnmp_delegated_cache *dcache)* > net-snmp-5.8/agent/agent_handler.c +928 > called from > netsnmp_free_delegated_cache(cache); > *net-snmp-5.8/agent/mibgroup/agentx/master.c +223* > > > This function was part of some patch implementation I think. > PATCH 1633670: fixed snmpd crashing when an AgentX subagent > disconnect in the middle of processing of a request. > > This, I can say for sure from snmpd log when crash happens -> "*Unknown > operation 6 in agentx_got_response."* > > * Got gdb backtrace is like this:* > > #0 0xb6dbc166 in __GI___libc_free (mem=mem@entry=0x1fd0598) at > malloc.c:2956 > #1 0xb6ee660a in netsnmp_free_delegated_cache (dcache=dcache@entry=0x1fd0598) > at agent_handler.c:934 > #2 0xb6eedde6 in agentx_got_response (operation=6, session=0x1fcd950, > reqid=, pdu=0x1fd42e8, magic=0x1fd0598) at > mibgroup/agentx/master.c:223 > #3 0xb6e6dba8 in snmp_resend_request (slp=slp@entry=0x1fcd138, > rp=rp@entry=0x1fd4728, incr_retries=1) at snmp_api.c:6750 > #4 0xb6e6e90c in snmp_sess_timeout (sessp=sessp@entry=0x1fcd138) at > snmp_api.c:6829 > #5 0xb6e6e95c in snmp_timeout () at snmp_api.c:6663 > #6 0x00012b36 in receive () at snmpd.c:1347 > #7 0x000126a4 in main (argc=, argv=) at > snmpd.c:1125 > > -Himanshu > > On Fri, Jul 10, 2020, 06:58 John Bize wrote: > >> *The agentx_got_response method handles responses from an agentx >> sub-agent. Are you running a sub-agent? If so, shut that down before >> bringing up the wifi and see what happens. If not, comment out the "master >> agentx" line in snmp.conf and see what happens.* >> >> >> *It would be nice if one of the devs could jump in. I have two >> unanswered posts in the last week or so. * >> On 09-Jul-2020 4:20 PM, Himanshu Sharma wrote: >> >> Hi John, >> >> Before the crash occurs ,I can see the following error message from the >> snmpd log. >> *Unknown operation 6 in agentx_got_response.* >> *Have you seen anything like this before?* >> >> This comes from the file : >> net-snmp-5.8/agent/mibgroup/agentx/master.c >> >> >> >> *snmp_log(LOG_ERR, "Unknown operation %d in agentx_got_response\n", >>operation); netsnmp_free_delegated_cache(cache); >> return 0;* >> >> Regards >> Himanshu >> >> On Thu, Jul 9, 2020 at 5:31 AM John Bize wrote: >> >>> Himanshu, >>> >>> I haven't looked at that part of the code, but I wouldn't expect snmpd >>> to dynamically handle changing interfaces. The only thing I could suggest >>> is to stop the service while initializing the wifi, and restarting it when >>> wifi is up. When it starts, it should find all interfaces, unless you've >>> change
Re: snmpd crashes when wlan0 interface acquire IP address
Sorry Himanshu, I checked out the v5.8 tag, but my line numbers just don't line up with yours. It does look like you may have found a double or corrupt memory free. The devs have repeatedly asked that people not contact them directly, but I've been waiting a week for a response to one of my inquiries, and 4 days for the other. They might be on holiday. Good luck. John On 10-Jul-2020 6:51 PM, Himanshu Sharma wrote: > Hi John, > > Thanks for the courtesy . > I am using Subagent. > Here is a thread of discussion on the > same https://sourceforge.net/p/net-snmp/mailman/message/37018116/. > Actually ,If I shut down Subagent before bringing up WiFi ,snmpd > doesn't crash.Looks like a crash was due to some communication problem > between snmpd & Subagent. > However, when I start my Subagent post WiFi is brought up ,it is not > behaving properly. , > i.e. snmpwalk on some of the OID's keep on iterating forever and the > Subagent process crashes after some time..I am not sure maybe it can > be due to some other issue..I will check. > hrDeviceStatus.1 (INTEGER) 0 > hrDeviceStatus.2 (INTEGER) 0 > hrDeviceStatus.3 (INTEGER) 0 > hrDeviceStatus.4 (INTEGER) 0 > hrDeviceStatus.5 (INTEGER) 0 > hrDeviceStatus.6 (INTEGER) 0 > hrDeviceStatus.7 (INTEGER) 0 ... > > > *Now, Some updates on previous case (i.e. **snmpd crashes when wlan0 > interface acquires IP address).* > * > * > *As we know snmpd crashes , these are my new findings :* > * > * > *I see this function.* > * > * > *netsnmp_free_delegated_cache(netsnmp_delegated_cache *dcache)* > net-snmp-5.8/agent/agent_handler.c +928 > called from > netsnmp_free_delegated_cache(cache); > *net-snmp-5.8/agent/mibgroup/agentx/master.c +223* > * > * > This function was part of some patch implementation I think. > PATCH 1633670: fixed snmpd crashing when an AgentX subagent > disconnect in the middle of processing of a request. > > This, I can say for sure from snmpd log when crash happens -> > "*Unknown operation 6 in agentx_got_response."* > * > * > * Got gdb backtrace is like this:* > > #0 0xb6dbc166 in __GI___libc_free (mem=mem@entry=0x1fd0598) at > malloc.c:2956 > #1 0xb6ee660a in netsnmp_free_delegated_cache > (dcache=dcache@entry=0x1fd0598) at agent_handler.c:934 > #2 0xb6eedde6 in agentx_got_response (operation=6, session=0x1fcd950, > reqid=, pdu=0x1fd42e8, magic=0x1fd0598) at > mibgroup/agentx/master.c:223 > #3 0xb6e6dba8 in snmp_resend_request (slp=slp@entry=0x1fcd138, > rp=rp@entry=0x1fd4728, incr_retries=1) at snmp_api.c:6750 > #4 0xb6e6e90c in snmp_sess_timeout (sessp=sessp@entry=0x1fcd138) at > snmp_api.c:6829 > #5 0xb6e6e95c in snmp_timeout () at snmp_api.c:6663 > #6 0x00012b36 in receive () at snmpd.c:1347 > #7 0x000126a4 in main (argc=, argv=) at > snmpd.c:1125 > > -Himanshu > > On Fri, Jul 10, 2020, 06:58 John Bize <mailto:jb...@godswind.org>> wrote: > > /The agentx_got_response method handles responses from an agentx > sub-agent. Are you running a sub-agent? If so, shut that down > before bringing up the wifi and see what happens. If not, comment > out the "master agentx" line in snmp.conf and see what happens./ > > /It would be nice if one of the devs could jump in. I have two > unanswered posts in the last week or so. > / > > On 09-Jul-2020 4:20 PM, Himanshu Sharma wrote: >> Hi John, >> >> Before the crash occurs ,I can see the following error message >> from the snmpd log. >> *Unknown operation 6 in agentx_got_response.* >> *Have you seen anything like this before?* >> >> This comes from the file : >> net-snmp-5.8/agent/mibgroup/agentx/master.c >> /snmp_log(LOG_ERR, "Unknown operation %d in agentx_got_response\n", >> operation); >> netsnmp_free_delegated_cache(cache); >> return 0;/ >> / >> / >> Regards >> Himanshu >> >> On Thu, Jul 9, 2020 at 5:31 AM John Bize > <mailto:jb...@godswind.org>> wrote: >> >> Himanshu, >> >> I haven't looked at that part of the code, but I wouldn't >> expect snmpd to dynamically handle changing interfaces. The >> only thing I could suggest is to stop the service while >> initializing the wifi, and restarting it when wifi is up. >> When it starts, it should find all interfaces, unless you've >> changed that in the configuration. >> >> John >> >> On 08-Jul-2020 5:53
Re: snmpd crashes when wlan0 interface acquire IP address
Hi John, Thanks for the courtesy . I am using Subagent. Here is a thread of discussion on the same https://sourceforge.net/p/net-snmp/mailman/message/37018116/. Actually ,If I shut down Subagent before bringing up WiFi ,snmpd doesn't crash.Looks like a crash was due to some communication problem between snmpd & Subagent. However, when I start my Subagent post WiFi is brought up ,it is not behaving properly. , i.e. snmpwalk on some of the OID's keep on iterating forever and the Subagent process crashes after some time..I am not sure maybe it can be due to some other issue..I will check. hrDeviceStatus.1 (INTEGER) 0 hrDeviceStatus.2 (INTEGER) 0 hrDeviceStatus.3 (INTEGER) 0 hrDeviceStatus.4 (INTEGER) 0 hrDeviceStatus.5 (INTEGER) 0 hrDeviceStatus.6 (INTEGER) 0 hrDeviceStatus.7 (INTEGER) 0 ... *Now, Some updates on previous case (i.e. **snmpd crashes when wlan0 interface acquires IP address).* *As we know snmpd crashes , these are my new findings :* *I see this function.* *netsnmp_free_delegated_cache(netsnmp_delegated_cache *dcache)* net-snmp-5.8/agent/agent_handler.c +928 called from netsnmp_free_delegated_cache(cache); *net-snmp-5.8/agent/mibgroup/agentx/master.c +223* This function was part of some patch implementation I think. PATCH 1633670: fixed snmpd crashing when an AgentX subagent disconnect in the middle of processing of a request. This, I can say for sure from snmpd log when crash happens -> "*Unknown operation 6 in agentx_got_response."* * Got gdb backtrace is like this:* #0 0xb6dbc166 in __GI___libc_free (mem=mem@entry=0x1fd0598) at malloc.c:2956 #1 0xb6ee660a in netsnmp_free_delegated_cache (dcache=dcache@entry=0x1fd0598) at agent_handler.c:934 #2 0xb6eedde6 in agentx_got_response (operation=6, session=0x1fcd950, reqid=, pdu=0x1fd42e8, magic=0x1fd0598) at mibgroup/agentx/master.c:223 #3 0xb6e6dba8 in snmp_resend_request (slp=slp@entry=0x1fcd138, rp=rp@entry=0x1fd4728, incr_retries=1) at snmp_api.c:6750 #4 0xb6e6e90c in snmp_sess_timeout (sessp=sessp@entry=0x1fcd138) at snmp_api.c:6829 #5 0xb6e6e95c in snmp_timeout () at snmp_api.c:6663 #6 0x00012b36 in receive () at snmpd.c:1347 #7 0x000126a4 in main (argc=, argv=) at snmpd.c:1125 -Himanshu On Fri, Jul 10, 2020, 06:58 John Bize wrote: > *The agentx_got_response method handles responses from an agentx > sub-agent. Are you running a sub-agent? If so, shut that down before > bringing up the wifi and see what happens. If not, comment out the "master > agentx" line in snmp.conf and see what happens.* > > > *It would be nice if one of the devs could jump in. I have two unanswered > posts in the last week or so. * > On 09-Jul-2020 4:20 PM, Himanshu Sharma wrote: > > Hi John, > > Before the crash occurs ,I can see the following error message from the > snmpd log. > *Unknown operation 6 in agentx_got_response.* > *Have you seen anything like this before?* > > This comes from the file : > net-snmp-5.8/agent/mibgroup/agentx/master.c > > > > *snmp_log(LOG_ERR, "Unknown operation %d in agentx_got_response\n", >operation); netsnmp_free_delegated_cache(cache); > return 0;* > > Regards > Himanshu > > On Thu, Jul 9, 2020 at 5:31 AM John Bize wrote: > >> Himanshu, >> >> I haven't looked at that part of the code, but I wouldn't expect snmpd to >> dynamically handle changing interfaces. The only thing I could suggest is >> to stop the service while initializing the wifi, and restarting it when >> wifi is up. When it starts, it should find all interfaces, unless you've >> changed that in the configuration. >> >> John >> On 08-Jul-2020 5:53 PM, Himanshu Sharma wrote: >> >> Hi John, >> >> My system has two interfaces one for Ethernet eth0 and the other for wifi >> wlan0..but the problem is when system bootup (Ethernet)eth0 Acquires ip >> address using dhcp..I can successful do snmp operation using the ip address >> of the ethernet..Problem is the moment I connect wifi(wlan0) to a wifi >> router ..the wlan0 interface acquires ip address, and snmpd crashes. >> >> -Himanshu >> >> >> On Thu, Jul 9, 2020, 02:50 Himanshu Sharma >> wrote: >> >>> Hi John, >>> >>> Thanks for prompt reply. >>> I am using net-snmp version 5.8. >>> I want SNMP to serve on both ethernet and wifi.When my system bootup >>> Ethernet eth0 in my case will acquire ip address using dhcp immediately..At >>> this moment my snmpd is already up. >>> Now, at some point later..I will connect my system to wifi router(wlan0) >>> and interface acquires IP address ,but snmpd crashes immediately and >>> backtrace change everytime.. >>> Is this
Re: snmpd crashes when wlan0 interface acquire IP address
/The agentx_got_response method handles responses from an agentx sub-agent. Are you running a sub-agent? If so, shut that down before bringing up the wifi and see what happens. If not, comment out the "master agentx" line in snmp.conf and see what happens./ /It would be nice if one of the devs could jump in. I have two unanswered posts in the last week or so. / On 09-Jul-2020 4:20 PM, Himanshu Sharma wrote: > Hi John, > > Before the crash occurs ,I can see the following error message from > the snmpd log. > *Unknown operation 6 in agentx_got_response.* > *Have you seen anything like this before?* > > This comes from the file : > net-snmp-5.8/agent/mibgroup/agentx/master.c > /snmp_log(LOG_ERR, "Unknown operation %d in agentx_got_response\n", > operation); > netsnmp_free_delegated_cache(cache); > return 0;/ > / > / > Regards > Himanshu > > On Thu, Jul 9, 2020 at 5:31 AM John Bize <mailto:jb...@godswind.org>> wrote: > > Himanshu, > > I haven't looked at that part of the code, but I wouldn't expect > snmpd to dynamically handle changing interfaces. The only thing I > could suggest is to stop the service while initializing the wifi, > and restarting it when wifi is up. When it starts, it should find > all interfaces, unless you've changed that in the configuration. > > John > > On 08-Jul-2020 5:53 PM, Himanshu Sharma wrote: >> Hi John, >> >> My system has two interfaces one for Ethernet eth0 and the other >> for wifi wlan0..but the problem is when system bootup >> (Ethernet)eth0 Acquires ip address using dhcp..I can successful >> do snmp operation using the ip address of the ethernet..Problem >> is the moment I connect wifi(wlan0) to a wifi router ..the wlan0 >> interface acquires ip address, and snmpd crashes. >> >> -Himanshu >> >> >> On Thu, Jul 9, 2020, 02:50 Himanshu Sharma >> > <mailto:himanshusharma1...@gmail.com>> wrote: >> >> Hi John, >> >> Thanks for prompt reply. >> I am using net-snmp version 5.8. >> I want SNMP to serve on both ethernet and wifi.When my system >> bootup Ethernet eth0 in my case will acquire ip address using >> dhcp immediately..At this moment my snmpd is already up. >> Now, at some point later..I will connect my system to wifi >> router(wlan0) and interface acquires IP address ,but snmpd >> crashes immediately and backtrace change everytime.. >> Is this a valid scenario? I thought snmpd can support mutiple >> interfaces at them same time.. >> >> Thank & Regards >> Himanshu. >> >> -Himanshu >> >> On Thu, Jul 9, 2020, 02:35 John Bize > <mailto:jb...@godswind.org>> wrote: >> >> Himanshu, >> >> I don't know what type of system you are using, but I'm >> guessing that without predictive interface names it might >> be very old. >> >> I don't know what you are trying to accomplish. Do you >> want to serve SNMP on both the WiFi and Ethernet >> interfaces? If so, you may need to hold off starting >> snmpd until the interfaces are up and your WiFi is >> connected. I wouldn't excpect snmpd to dynamically >> handle changing interfaces. If you only want to serve it >> on the Ethernet interface ans it is statically >> configured, then specify that IP with the "agentAddress" >> configuration directive. >> >> I am using DHCP on one interface of a dual-interface >> system. It is Debian Linux 10. To prevent the snmpd >> from starting until after the interfaces are up and >> configured, my snmpd Unit file (snmpd.service) looks like >> this: >> >> [Unit] >> Description=Simple Network Management Protocol (SNMP) >> Daemon. >> After=network.target >> # Wait for network interfaces to be all the way up >> (incl. DHCP) >> After=systemd-networkd-wait-online.service >> Wants=systemd-networkd-wait-online.service >> ConditionPathExists=/etc/snmp/snmpd.conf >> >> >> [Service] >>
Re: snmpd crashes when wlan0 interface acquire IP address
Hi John, Before the crash occurs ,I can see the following error message from the snmpd log. *Unknown operation 6 in agentx_got_response.* *Have you seen anything like this before?* This comes from the file : net-snmp-5.8/agent/mibgroup/agentx/master.c *snmp_log(LOG_ERR, "Unknown operation %d in agentx_got_response\n", operation);netsnmp_free_delegated_cache(cache); return 0;* Regards Himanshu On Thu, Jul 9, 2020 at 5:31 AM John Bize wrote: > Himanshu, > > I haven't looked at that part of the code, but I wouldn't expect snmpd to > dynamically handle changing interfaces. The only thing I could suggest is > to stop the service while initializing the wifi, and restarting it when > wifi is up. When it starts, it should find all interfaces, unless you've > changed that in the configuration. > > John > On 08-Jul-2020 5:53 PM, Himanshu Sharma wrote: > > Hi John, > > My system has two interfaces one for Ethernet eth0 and the other for wifi > wlan0..but the problem is when system bootup (Ethernet)eth0 Acquires ip > address using dhcp..I can successful do snmp operation using the ip address > of the ethernet..Problem is the moment I connect wifi(wlan0) to a wifi > router ..the wlan0 interface acquires ip address, and snmpd crashes. > > -Himanshu > > > On Thu, Jul 9, 2020, 02:50 Himanshu Sharma > wrote: > >> Hi John, >> >> Thanks for prompt reply. >> I am using net-snmp version 5.8. >> I want SNMP to serve on both ethernet and wifi.When my system bootup >> Ethernet eth0 in my case will acquire ip address using dhcp immediately..At >> this moment my snmpd is already up. >> Now, at some point later..I will connect my system to wifi router(wlan0) >> and interface acquires IP address ,but snmpd crashes immediately and >> backtrace change everytime.. >> Is this a valid scenario? I thought snmpd can support mutiple interfaces >> at them same time.. >> >> Thank & Regards >> Himanshu. >> >> -Himanshu >> >> On Thu, Jul 9, 2020, 02:35 John Bize wrote: >> >>> Himanshu, >>> >>> I don't know what type of system you are using, but I'm guessing that >>> without predictive interface names it might be very old. >>> >>> I don't know what you are trying to accomplish. Do you want to serve >>> SNMP on both the WiFi and Ethernet interfaces? If so, you may need to hold >>> off starting snmpd until the interfaces are up and your WiFi is connected. >>> I wouldn't excpect snmpd to dynamically handle changing interfaces. If you >>> only want to serve it on the Ethernet interface ans it is statically >>> configured, then specify that IP with the "agentAddress" configuration >>> directive. >>> >>> I am using DHCP on one interface of a dual-interface system. It is >>> Debian Linux 10. To prevent the snmpd from starting until after the >>> interfaces are up and configured, my snmpd Unit file (snmpd.service) looks >>> like this: >>> >>> [Unit] >>> Description=Simple Network Management Protocol (SNMP) Daemon. >>> After=network.target >>> # Wait for network interfaces to be all the way up (incl. DHCP) >>> After=systemd-networkd-wait-online.service >>> Wants=systemd-networkd-wait-online.service >>> ConditionPathExists=/etc/snmp/snmpd.conf >>> >>> >>> [Service] >>> >>> Environment="MIBSDIR=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp" >>> Environment="MIBS=" >>> Type=simple >>> ExecStart=/usr/sbin/snmpd -a -Lsd -Lf /var/log/snmpd.log -u Debian-snmp >>> -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid >>> ExecReload=/bin/kill -HUP $MAINPID >>> >>> [Install] >>> WantedBy=multi-user.target >>> >>> If none of this helps, please add more information about your system, >>> snmpd version, and what you are trying to do. >>> >>> John >>> >>> >>> On 08-Jul-2020 4:42 PM, Himanshu Sharma wrote: >>> >>> +Bill and Larry >>> >>> -Himanshu >>> >>> On Thu, Jul 9, 2020 at 2:02 AM Himanshu Sharma < >>> himanshusharma1...@gmail.com> wrote: >>> >>>> Hi All, >>>> >>>> I am facing a very weird issue. >>>> I have 2 interfaces on my system. >>>> *The moment the wlan0 acqui
Re: snmpd crashes when wlan0 interface acquire IP address
Himanshu, I haven't looked at that part of the code, but I wouldn't expect snmpd to dynamically handle changing interfaces. The only thing I could suggest is to stop the service while initializing the wifi, and restarting it when wifi is up. When it starts, it should find all interfaces, unless you've changed that in the configuration. John On 08-Jul-2020 5:53 PM, Himanshu Sharma wrote: > Hi John, > > My system has two interfaces one for Ethernet eth0 and the other for > wifi wlan0..but the problem is when system bootup (Ethernet)eth0 > Acquires ip address using dhcp..I can successful do snmp operation > using the ip address of the ethernet..Problem is the moment I connect > wifi(wlan0) to a wifi router ..the wlan0 interface acquires ip > address, and snmpd crashes. > > -Himanshu > > > On Thu, Jul 9, 2020, 02:50 Himanshu Sharma > mailto:himanshusharma1...@gmail.com>> > wrote: > > Hi John, > > Thanks for prompt reply. > I am using net-snmp version 5.8. > I want SNMP to serve on both ethernet and wifi.When my system > bootup Ethernet eth0 in my case will acquire ip address using dhcp > immediately..At this moment my snmpd is already up. > Now, at some point later..I will connect my system to wifi > router(wlan0) and interface acquires IP address ,but snmpd crashes > immediately and backtrace change everytime.. > Is this a valid scenario? I thought snmpd can support mutiple > interfaces at them same time.. > > Thank & Regards > Himanshu. > > -Himanshu > > On Thu, Jul 9, 2020, 02:35 John Bize <mailto:jb...@godswind.org>> wrote: > > Himanshu, > > I don't know what type of system you are using, but I'm > guessing that without predictive interface names it might be > very old. > > I don't know what you are trying to accomplish. Do you want > to serve SNMP on both the WiFi and Ethernet interfaces? If > so, you may need to hold off starting snmpd until the > interfaces are up and your WiFi is connected. I wouldn't > excpect snmpd to dynamically handle changing interfaces. If > you only want to serve it on the Ethernet interface ans it is > statically configured, then specify that IP with the > "agentAddress" configuration directive. > > I am using DHCP on one interface of a dual-interface system. > It is Debian Linux 10. To prevent the snmpd from starting > until after the interfaces are up and configured, my snmpd > Unit file (snmpd.service) looks like this: > > [Unit] > Description=Simple Network Management Protocol (SNMP) Daemon. > After=network.target > # Wait for network interfaces to be all the way up (incl. > DHCP) > After=systemd-networkd-wait-online.service > Wants=systemd-networkd-wait-online.service > ConditionPathExists=/etc/snmp/snmpd.conf > > > [Service] > > Environment="MIBSDIR=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp" > Environment="MIBS=" > Type=simple > ExecStart=/usr/sbin/snmpd -a -Lsd -Lf /var/log/snmpd.log > -u Debian-snmp -g Debian-snmp -I > -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid > ExecReload=/bin/kill -HUP $MAINPID > > [Install] > WantedBy=multi-user.target > > If none of this helps, please add more information about your > system, snmpd version, and what you are trying to do. > > John > > > On 08-Jul-2020 4:42 PM, Himanshu Sharma wrote: >> +Bill and Larry >> >> -Himanshu >> >> On Thu, Jul 9, 2020 at 2:02 AM Himanshu Sharma >> > <mailto:himanshusharma1...@gmail.com>> wrote: >> >> Hi All, >> >> I am facing a very weird issue. >> I have 2 interfaces on my system. >> *The moment the wlan0 acquires the ip address snmpd crashes.* >> If there is only one interface let say *eth0*.,snmpd >> works fine. >> One more problem is *coredump* analysis of crash using >> gdb, shows different backtrace everytime. >> I am attaching the back trace for reference..Also the >> ifconfig of my local syste
Re: snmpd crashes when wlan0 interface acquire IP address
Hi John, My system has two interfaces one for Ethernet eth0 and the other for wifi wlan0..but the problem is when system bootup (Ethernet)eth0 Acquires ip address using dhcp..I can successful do snmp operation using the ip address of the ethernet..Problem is the moment I connect wifi(wlan0) to a wifi router ..the wlan0 interface acquires ip address, and snmpd crashes. -Himanshu On Thu, Jul 9, 2020, 02:50 Himanshu Sharma wrote: > Hi John, > > Thanks for prompt reply. > I am using net-snmp version 5.8. > I want SNMP to serve on both ethernet and wifi.When my system bootup > Ethernet eth0 in my case will acquire ip address using dhcp immediately..At > this moment my snmpd is already up. > Now, at some point later..I will connect my system to wifi router(wlan0) > and interface acquires IP address ,but snmpd crashes immediately and > backtrace change everytime.. > Is this a valid scenario? I thought snmpd can support mutiple interfaces > at them same time.. > > Thank & Regards > Himanshu. > > -Himanshu > > On Thu, Jul 9, 2020, 02:35 John Bize wrote: > >> Himanshu, >> >> I don't know what type of system you are using, but I'm guessing that >> without predictive interface names it might be very old. >> >> I don't know what you are trying to accomplish. Do you want to serve >> SNMP on both the WiFi and Ethernet interfaces? If so, you may need to hold >> off starting snmpd until the interfaces are up and your WiFi is connected. >> I wouldn't excpect snmpd to dynamically handle changing interfaces. If you >> only want to serve it on the Ethernet interface ans it is statically >> configured, then specify that IP with the "agentAddress" configuration >> directive. >> >> I am using DHCP on one interface of a dual-interface system. It is >> Debian Linux 10. To prevent the snmpd from starting until after the >> interfaces are up and configured, my snmpd Unit file (snmpd.service) looks >> like this: >> >> [Unit] >> Description=Simple Network Management Protocol (SNMP) Daemon. >> After=network.target >> # Wait for network interfaces to be all the way up (incl. DHCP) >> After=systemd-networkd-wait-online.service >> Wants=systemd-networkd-wait-online.service >> ConditionPathExists=/etc/snmp/snmpd.conf >> >> >> [Service] >> >> Environment="MIBSDIR=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp" >> Environment="MIBS=" >> Type=simple >> ExecStart=/usr/sbin/snmpd -a -Lsd -Lf /var/log/snmpd.log -u Debian-snmp >> -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid >> ExecReload=/bin/kill -HUP $MAINPID >> >> [Install] >> WantedBy=multi-user.target >> >> If none of this helps, please add more information about your system, >> snmpd version, and what you are trying to do. >> >> John >> >> >> On 08-Jul-2020 4:42 PM, Himanshu Sharma wrote: >> >> +Bill and Larry >> >> -Himanshu >> >> On Thu, Jul 9, 2020 at 2:02 AM Himanshu Sharma < >> himanshusharma1...@gmail.com> wrote: >> >>> Hi All, >>> >>> I am facing a very weird issue. >>> I have 2 interfaces on my system. >>> *The moment the wlan0 acquires the ip address snmpd crashes.* >>> If there is only one interface let say *eth0*.,snmpd works fine. >>> One more problem is *coredump* analysis of crash using gdb, shows >>> different backtrace everytime. >>> I am attaching the back trace for reference..Also the ifconfig of my >>> local system. >>> It would be great if anyone can help me.. I am not able to find any >>> solution 😞 >>> >>> -Himanshu >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *#0 __libc_do_syscall () at >>> ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47 #1 0xb6d6d1b2 in >>> __libc_signal_restore_set (set=0xbeb7b320) at >>> ../sysdeps/unix/sysv/linux/nptl-signals.h:79 #2 __GI_raise >>> (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:48 #3 0xb6d6de3a >>> in __GI_abort () at abort.c:89 #4 0xb6d947da in __libc_message >>> (do_abort=do_abort@entry=2, fmt=) at >>> ../sysdeps/posix/libc_fatal.c:175 #5 0xb6d98b28 in malloc_printerr >>> (action=
Re: snmpd crashes when wlan0 interface acquire IP address
Hi John, Thanks for prompt reply. I am using net-snmp version 5.8. I want SNMP to serve on both ethernet and wifi.When my system bootup Ethernet eth0 in my case will acquire ip address using dhcp immediately..At this moment my snmpd is already up. Now, at some point later..I will connect my system to wifi router(wlan0) and interface acquires IP address ,but snmpd crashes immediately and backtrace change everytime.. Is this a valid scenario? I thought snmpd can support mutiple interfaces at them same time.. Thank & Regards Himanshu. -Himanshu On Thu, Jul 9, 2020, 02:35 John Bize wrote: > Himanshu, > > I don't know what type of system you are using, but I'm guessing that > without predictive interface names it might be very old. > > I don't know what you are trying to accomplish. Do you want to serve SNMP > on both the WiFi and Ethernet interfaces? If so, you may need to hold off > starting snmpd until the interfaces are up and your WiFi is connected. I > wouldn't excpect snmpd to dynamically handle changing interfaces. If you > only want to serve it on the Ethernet interface ans it is statically > configured, then specify that IP with the "agentAddress" configuration > directive. > > I am using DHCP on one interface of a dual-interface system. It is > Debian Linux 10. To prevent the snmpd from starting until after the > interfaces are up and configured, my snmpd Unit file (snmpd.service) looks > like this: > > [Unit] > Description=Simple Network Management Protocol (SNMP) Daemon. > After=network.target > # Wait for network interfaces to be all the way up (incl. DHCP) > After=systemd-networkd-wait-online.service > Wants=systemd-networkd-wait-online.service > ConditionPathExists=/etc/snmp/snmpd.conf > > > [Service] > > Environment="MIBSDIR=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp" > Environment="MIBS=" > Type=simple > ExecStart=/usr/sbin/snmpd -a -Lsd -Lf /var/log/snmpd.log -u Debian-snmp -g > Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid > ExecReload=/bin/kill -HUP $MAINPID > > [Install] > WantedBy=multi-user.target > > If none of this helps, please add more information about your system, > snmpd version, and what you are trying to do. > > John > > > On 08-Jul-2020 4:42 PM, Himanshu Sharma wrote: > > +Bill and Larry > > -Himanshu > > On Thu, Jul 9, 2020 at 2:02 AM Himanshu Sharma < > himanshusharma1...@gmail.com> wrote: > >> Hi All, >> >> I am facing a very weird issue. >> I have 2 interfaces on my system. >> *The moment the wlan0 acquires the ip address snmpd crashes.* >> If there is only one interface let say *eth0*.,snmpd works fine. >> One more problem is *coredump* analysis of crash using gdb, shows >> different backtrace everytime. >> I am attaching the back trace for reference..Also the ifconfig of my >> local system. >> It would be great if anyone can help me.. I am not able to find any >> solution 😞 >> >> -Himanshu >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> *#0 __libc_do_syscall () at >> ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47 #1 0xb6d6d1b2 in >> __libc_signal_restore_set (set=0xbeb7b320) at >> ../sysdeps/unix/sysv/linux/nptl-signals.h:79 #2 __GI_raise >> (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:48 #3 0xb6d6de3a >> in __GI_abort () at abort.c:89 #4 0xb6d947da in __libc_message >> (do_abort=do_abort@entry=2, fmt=) at >> ../sysdeps/posix/libc_fatal.c:175 #5 0xb6d98b28 in malloc_printerr >> (action=, str=0xb6e14de4 "corrupted double-linked list", >> ptr=, ar_ptr=) at malloc.c:5087 #6 >> 0xb6d9b0d4 in _int_malloc (av=av@entry=0xb6e317a4 , >> bytes=bytes@entry=12) at malloc.c:3743 #7 0xb6d9c556 in __libc_calloc >> (n=, elem_size=) at malloc.c:3246 #8 >> 0xb6ecbcb8 in init_agent_snmp_session (session=0x1dceac0, pdu=> out>) at snmp_agent.c:1587 #9 0xb6ecd368 in handle_snmp_packet >> (session=, pdu=, magic=0x0, reqid=> out>, op=) at snmp_agent.c:2227 #10 0xb6e503e4 in >> _sess_process_packet_handle_pdu (isp=0x1dcea78, isp=0x1dcea78, >> transport=0x1dce888, pdu=0x1dd68e0, sp=0x1dceac0, sessp=) at >> snmp_api.c:5807 #11 _sess_process_packet (sessp=sessp@entry=0x1dcea60, >> sp=sp@entry=0x1dceac0, isp=0x1dcea78, transport=transport@entry=0x1dce888, >> opaque=opaque@entry=0x1dd4b18, olength=olength@e
Re: snmpd crashes when wlan0 interface acquire IP address
Himanshu, I don't know what type of system you are using, but I'm guessing that without predictive interface names it might be very old. I don't know what you are trying to accomplish. Do you want to serve SNMP on both the WiFi and Ethernet interfaces? If so, you may need to hold off starting snmpd until the interfaces are up and your WiFi is connected. I wouldn't excpect snmpd to dynamically handle changing interfaces. If you only want to serve it on the Ethernet interface ans it is statically configured, then specify that IP with the "agentAddress" configuration directive. I am using DHCP on one interface of a dual-interface system. It is Debian Linux 10. To prevent the snmpd from starting until after the interfaces are up and configured, my snmpd Unit file (snmpd.service) looks like this: [Unit] Description=Simple Network Management Protocol (SNMP) Daemon. After=network.target # Wait for network interfaces to be all the way up (incl. DHCP) After=systemd-networkd-wait-online.service Wants=systemd-networkd-wait-online.service ConditionPathExists=/etc/snmp/snmpd.conf [Service] Environment="MIBSDIR=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp" Environment="MIBS=" Type=simple ExecStart=/usr/sbin/snmpd -a -Lsd -Lf /var/log/snmpd.log -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target If none of this helps, please add more information about your system, snmpd version, and what you are trying to do. John On 08-Jul-2020 4:42 PM, Himanshu Sharma wrote: > +Bill and Larry > > -Himanshu > > On Thu, Jul 9, 2020 at 2:02 AM Himanshu Sharma > mailto:himanshusharma1...@gmail.com>> > wrote: > > Hi All, > > I am facing a very weird issue. > I have 2 interfaces on my system. > *The moment the wlan0 acquires the ip address snmpd crashes.* > If there is only one interface let say *eth0*.,snmpd works fine. > One more problem is *coredump* analysis of crash using gdb, shows > different backtrace everytime. > I am attaching the back trace for reference..Also the ifconfig of > my local system. > It would be great if anyone can help me.. I am not able to find > any solution 😞 > > -Himanshu > > > *#0 __libc_do_syscall () at > ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47 > #1 0xb6d6d1b2 in __libc_signal_restore_set (set=0xbeb7b320) at > ../sysdeps/unix/sysv/linux/nptl-signals.h:79 > #2 __GI_raise (sig=sig@entry=6) at > ../sysdeps/unix/sysv/linux/raise.c:48 > #3 0xb6d6de3a in __GI_abort () at abort.c:89 > #4 0xb6d947da in __libc_message (do_abort=do_abort@entry=2, > fmt=) at ../sysdeps/posix/libc_fatal.c:175 > #5 0xb6d98b28 in malloc_printerr (action=, > str=0xb6e14de4 "corrupted double-linked list", ptr= out>, ar_ptr=) at malloc.c:5087 > #6 0xb6d9b0d4 in _int_malloc (av=av@entry=0xb6e317a4 > , bytes=bytes@entry=12) at malloc.c:3743 > #7 0xb6d9c556 in __libc_calloc (n=, > elem_size=) at malloc.c:3246 > #8 0xb6ecbcb8 in init_agent_snmp_session (session=0x1dceac0, > pdu=) at snmp_agent.c:1587 > #9 0xb6ecd368 in handle_snmp_packet (session=, > pdu=, magic=0x0, reqid=, > op=) at snmp_agent.c:2227 > #10 0xb6e503e4 in _sess_process_packet_handle_pdu (isp=0x1dcea78, > isp=0x1dcea78, transport=0x1dce888, pdu=0x1dd68e0, sp=0x1dceac0, > sessp=) at snmp_api.c:5807 > #11 _sess_process_packet (sessp=sessp@entry=0x1dcea60, > sp=sp@entry=0x1dceac0, isp=0x1dcea78, > transport=transport@entry=0x1dce888, > opaque=opaque@entry=0x1dd4b18, olength=olength@entry=60, > packetptr=0x1de5060 "0M\002\001", length=79) at snmp_api.c:5863 > #12 0xb6e50a3a in _sess_read (sessp=sessp@entry=0x1dcea60, > fdset=fdset@entry=0xbeb7b9a0) at snmp_api.c:6124 > #13 0xb6e50b14 in snmp_sess_read2 (sessp=sessp@entry=0x1dcea60, > fdset=fdset@entry=0xbeb7b9a0) at snmp_api.c:6397 > #14 0xb6e50b44 in snmp_read2 (fdset=fdset@entry=0xbeb7b9a0) at > snmp_api.c:5912 > #15 0x00012c0c in receive () at snmpd.c:1342 > #16 0x000126a4 in main (argc=, argv= out>) at snmpd.c:1125 > * > > * > #1 0xb6d6d1b2 in __libc_signal_restore_set (set=0xbeb7b320) at > ../sysdeps/unix/sysv/linux/nptl-signals.h:79 > #2 __GI_raise (sig=sig@entry=6) at > ../sysdeps/unix/sysv/linux/raise.c:48 > #3 0xb6d6de3a in __GI_abort () at abort.c:89 > #4 0xb
Re: snmpd crashes when wlan0 interface acquire IP address
+Bill and Larry -Himanshu On Thu, Jul 9, 2020 at 2:02 AM Himanshu Sharma wrote: > Hi All, > > I am facing a very weird issue. > I have 2 interfaces on my system. > *The moment the wlan0 acquires the ip address snmpd crashes.* > If there is only one interface let say *eth0*.,snmpd works fine. > One more problem is *coredump* analysis of crash using gdb, shows > different backtrace everytime. > I am attaching the back trace for reference..Also the ifconfig of my local > system. > It would be great if anyone can help me.. I am not able to find any > solution 😞 > > -Himanshu > > > > > > > > > > > > > > > > > > > > > *#0 __libc_do_syscall () at > ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47#1 0xb6d6d1b2 in > __libc_signal_restore_set (set=0xbeb7b320) at > ../sysdeps/unix/sysv/linux/nptl-signals.h:79#2 __GI_raise > (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:48#3 0xb6d6de3a in > __GI_abort () at abort.c:89#4 0xb6d947da in __libc_message > (do_abort=do_abort@entry=2, fmt=) at > ../sysdeps/posix/libc_fatal.c:175#5 0xb6d98b28 in malloc_printerr > (action=, str=0xb6e14de4 "corrupted double-linked list", > ptr=, ar_ptr=) at malloc.c:5087#6 0xb6d9b0d4 > in _int_malloc (av=av@entry=0xb6e317a4 , bytes=bytes@entry=12) > at malloc.c:3743#7 0xb6d9c556 in __libc_calloc (n=, > elem_size=) at malloc.c:3246#8 0xb6ecbcb8 in > init_agent_snmp_session (session=0x1dceac0, pdu=) at > snmp_agent.c:1587#9 0xb6ecd368 in handle_snmp_packet (session= out>, pdu=, magic=0x0, reqid=, op= out>) at snmp_agent.c:2227#10 0xb6e503e4 in _sess_process_packet_handle_pdu > (isp=0x1dcea78, isp=0x1dcea78, transport=0x1dce888, pdu=0x1dd68e0, > sp=0x1dceac0, sessp=) at snmp_api.c:5807#11 > _sess_process_packet (sessp=sessp@entry=0x1dcea60, sp=sp@entry=0x1dceac0, > isp=0x1dcea78, transport=transport@entry=0x1dce888, > opaque=opaque@entry=0x1dd4b18, olength=olength@entry=60, > packetptr=0x1de5060 "0M\002\001", length=79) at snmp_api.c:5863#12 > 0xb6e50a3a in _sess_read (sessp=sessp@entry=0x1dcea60, > fdset=fdset@entry=0xbeb7b9a0) at snmp_api.c:6124#13 0xb6e50b14 in > snmp_sess_read2 (sessp=sessp@entry=0x1dcea60, fdset=fdset@entry=0xbeb7b9a0) > at snmp_api.c:6397#14 0xb6e50b44 in snmp_read2 > (fdset=fdset@entry=0xbeb7b9a0) at snmp_api.c:5912#15 0x00012c0c in receive > () at snmpd.c:1342#16 0x000126a4 in main (argc=, > argv=) at snmpd.c:1125* > > > > > > > > > > > > > > > > > *#1 0xb6d6d1b2 in __libc_signal_restore_set (set=0xbeb7b320) at > ../sysdeps/unix/sysv/linux/nptl-signals.h:79#2 __GI_raise > (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:48#3 0xb6d6de3a in > __GI_abort () at abort.c:89#4 0xb6d947da in __libc_message > (do_abort=do_abort@entry=2, fmt=) at > ../sysdeps/posix/libc_fatal.c:175#5 0xb6d98b28 in malloc_printerr > (action=, str=0xb6e14de4 "corrupted double-linked list", > ptr=, ar_ptr=) at malloc.c:5087#6 0xb6d9b0d4 > in _int_malloc (av=av@entry=0xb6e317a4 , bytes=bytes@entry=12) > at malloc.c:3743#7 0xb6d9c556 in __libc_calloc (n=, > elem_size=) at malloc.c:3246#8 0xb6ecbcb8 in > init_agent_snmp_session (session=0x1dceac0, pdu=) at > snmp_agent.c:1587#9 0xb6ecd368 in handle_snmp_packet (session= out>, pdu=, magic=0x0, reqid=, op= out>) at snmp_agent.c:2227#10 0xb6e503e4 in _sess_process_packet_handle_pdu > (isp=0x1dcea78, isp=0x1dcea78, transport=0x1dce888, pdu=0x1dd68e0, > sp=0x1dceac0, sessp=) at snmp_api.c:5807#11 > _sess_process_packet (sessp=sessp@entry=0x1dcea60, sp=sp@entry=0x1dceac0, > isp=0x1dcea78, transport=transport@entry=0x1dce888, > opaque=opaque@entry=0x1dd4b18, olength=olength@entry=60, > packetptr=0x1de5060 "0M\002\001", length=79) at snmp_api.c:5863#12 > 0xb6e50a3a in _sess_read (sessp=sessp@entry=0x1dcea60, > fdset=fdset@entry=0xbeb7b9a0) at snmp_api.c:6124#13 0xb6e50b14 in > snmp_sess_read2 (sessp=sessp@entry=0x1dcea60, fdset=fdset@entry=0xbeb7b9a0) > at snmp_api.c:6397#14 0xb6e50b44 in snmp_read2 (fdset=0xbeb7b9a0) at > snmp_api.c:5912* > > > > > > > > > > > > > > > > > > > > > > > > > *#1 0xb6dc21b2 in __libc_signal_restore_set (set=0xbec483a8) at > ../sysdeps/unix/sysv/linux/nptl-signals.h:79#2 __GI_raise > (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:48#3 0xb6dc2e3a in > __GI_abort () at abort.c:89#4 0xb6ded850 in __malloc_assert > (assertion=, file=, line=3068686472, > line@entry=3738, function=0xb6e6ab44 <__func__.15585> "_int_malloc") at > malloc.c:296#5 0xb6df02c6 in _int_malloc (av=0x2, av@entry=0xb6e867a4 > , bytes=bytes@entry=24) at malloc.c:3738#6 0xb6df1556 in > __libc_ca
snmpd crashes when wlan0 interface acquire IP address
Hi All, I am facing a very weird issue. I have 2 interfaces on my system. *The moment the wlan0 acquires the ip address snmpd crashes.* If there is only one interface let say *eth0*.,snmpd works fine. One more problem is *coredump* analysis of crash using gdb, shows different backtrace everytime. I am attaching the back trace for reference..Also the ifconfig of my local system. It would be great if anyone can help me.. I am not able to find any solution 😞 -Himanshu *#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47#1 0xb6d6d1b2 in __libc_signal_restore_set (set=0xbeb7b320) at ../sysdeps/unix/sysv/linux/nptl-signals.h:79#2 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:48#3 0xb6d6de3a in __GI_abort () at abort.c:89#4 0xb6d947da in __libc_message (do_abort=do_abort@entry=2, fmt=) at ../sysdeps/posix/libc_fatal.c:175#5 0xb6d98b28 in malloc_printerr (action=, str=0xb6e14de4 "corrupted double-linked list", ptr=, ar_ptr=) at malloc.c:5087#6 0xb6d9b0d4 in _int_malloc (av=av@entry=0xb6e317a4 , bytes=bytes@entry=12) at malloc.c:3743#7 0xb6d9c556 in __libc_calloc (n=, elem_size=) at malloc.c:3246#8 0xb6ecbcb8 in init_agent_snmp_session (session=0x1dceac0, pdu=) at snmp_agent.c:1587#9 0xb6ecd368 in handle_snmp_packet (session=, pdu=, magic=0x0, reqid=, op=) at snmp_agent.c:2227#10 0xb6e503e4 in _sess_process_packet_handle_pdu (isp=0x1dcea78, isp=0x1dcea78, transport=0x1dce888, pdu=0x1dd68e0, sp=0x1dceac0, sessp=) at snmp_api.c:5807#11 _sess_process_packet (sessp=sessp@entry=0x1dcea60, sp=sp@entry=0x1dceac0, isp=0x1dcea78, transport=transport@entry=0x1dce888, opaque=opaque@entry=0x1dd4b18, olength=olength@entry=60, packetptr=0x1de5060 "0M\002\001", length=79) at snmp_api.c:5863#12 0xb6e50a3a in _sess_read (sessp=sessp@entry=0x1dcea60, fdset=fdset@entry=0xbeb7b9a0) at snmp_api.c:6124#13 0xb6e50b14 in snmp_sess_read2 (sessp=sessp@entry=0x1dcea60, fdset=fdset@entry=0xbeb7b9a0) at snmp_api.c:6397#14 0xb6e50b44 in snmp_read2 (fdset=fdset@entry=0xbeb7b9a0) at snmp_api.c:5912#15 0x00012c0c in receive () at snmpd.c:1342#16 0x000126a4 in main (argc=, argv=) at snmpd.c:1125* *#1 0xb6d6d1b2 in __libc_signal_restore_set (set=0xbeb7b320) at ../sysdeps/unix/sysv/linux/nptl-signals.h:79#2 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:48#3 0xb6d6de3a in __GI_abort () at abort.c:89#4 0xb6d947da in __libc_message (do_abort=do_abort@entry=2, fmt=) at ../sysdeps/posix/libc_fatal.c:175#5 0xb6d98b28 in malloc_printerr (action=, str=0xb6e14de4 "corrupted double-linked list", ptr=, ar_ptr=) at malloc.c:5087#6 0xb6d9b0d4 in _int_malloc (av=av@entry=0xb6e317a4 , bytes=bytes@entry=12) at malloc.c:3743#7 0xb6d9c556 in __libc_calloc (n=, elem_size=) at malloc.c:3246#8 0xb6ecbcb8 in init_agent_snmp_session (session=0x1dceac0, pdu=) at snmp_agent.c:1587#9 0xb6ecd368 in handle_snmp_packet (session=, pdu=, magic=0x0, reqid=, op=) at snmp_agent.c:2227#10 0xb6e503e4 in _sess_process_packet_handle_pdu (isp=0x1dcea78, isp=0x1dcea78, transport=0x1dce888, pdu=0x1dd68e0, sp=0x1dceac0, sessp=) at snmp_api.c:5807#11 _sess_process_packet (sessp=sessp@entry=0x1dcea60, sp=sp@entry=0x1dceac0, isp=0x1dcea78, transport=transport@entry=0x1dce888, opaque=opaque@entry=0x1dd4b18, olength=olength@entry=60, packetptr=0x1de5060 "0M\002\001", length=79) at snmp_api.c:5863#12 0xb6e50a3a in _sess_read (sessp=sessp@entry=0x1dcea60, fdset=fdset@entry=0xbeb7b9a0) at snmp_api.c:6124#13 0xb6e50b14 in snmp_sess_read2 (sessp=sessp@entry=0x1dcea60, fdset=fdset@entry=0xbeb7b9a0) at snmp_api.c:6397#14 0xb6e50b44 in snmp_read2 (fdset=0xbeb7b9a0) at snmp_api.c:5912* *#1 0xb6dc21b2 in __libc_signal_restore_set (set=0xbec483a8) at ../sysdeps/unix/sysv/linux/nptl-signals.h:79#2 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:48#3 0xb6dc2e3a in __GI_abort () at abort.c:89#4 0xb6ded850 in __malloc_assert (assertion=, file=, line=3068686472, line@entry=3738, function=0xb6e6ab44 <__func__.15585> "_int_malloc") at malloc.c:296#5 0xb6df02c6 in _int_malloc (av=0x2, av@entry=0xb6e867a4 , bytes=bytes@entry=24) at malloc.c:3738#6 0xb6df1556 in __libc_calloc (n=, elem_size=) at malloc.c:3246#7 0xb6f1b5d2 in netsnmp_create_delegated_cache (handler=handler@entry=0xecf440, reginfo=reginfo@entry=0xecf6f8, reqinfo=reqinfo@entry=0xed57f8, requests=requests@entry=0xed6e60, localinfo=localinfo@entry=0xeba978) at agent_handler.c:881#8 0xb6f232d4 in agentx_master_handler (handler=0xecf440, reginfo=0xecf6f8, reqinfo=0xed57f8, requests=0xed6e60) at mibgroup/agentx/master.c:610#9 0xb6f1b16c in netsnmp_call_handler (requests=0xed6e60, reqinfo=0xed57f8, reginfo=0xecf6f8, next_handler=0xecf440) at agent_handler.c:546#10 netsnmp_call_handlers (reginfo=0xecf6f8, reqinfo=0xed57f8, requests=0xed6e60) at agent_handler.c:631#11 0xb6f21bb4 in handle_var_requests (asp=asp@entry=0xed57a
Is there a list of snmpd -DTOKEN allowed values somewhere?
Hi I'm trying to narrow down a problem with SNMPD while -Dall gives too much information to my taste, I was hoping to find a list of recognized tokens. Does such a list exist? Thank you Frank ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Snmpd not answering if an unknown context is used in query from client
Hello everybody, I'm using NET-SNMP 5.7.3 with SSL support enabled and I can properly configure the daemon to run SNMPV3 with authNoPriv users. At run time my subagent will register OIDs with a configurable context name. Everything is working perfectly. However I can see a minor but unexpected behavior when querying the daemon from a client with a context unknown to the daemon: the daemon is not answering at all and I must wait for the client side timeout to expire. Is this behavior expected from your side? I was instead waiting for a reply like "SNMP_NOSUCHOBJECT" or similar... Thanks ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Behavior of snmptrapd and snmpd when using certificates (TSM, DTLS)
Hi Bart, this is a good start, but we also need to add code for the newer version of TLS if we should apply to the RFC's. For the moment I don't have any time to work on it. The DTLS/TLS stuff also have some major bugs/design issues that needs to be fixed. Regards Anders Wallin On Sat, Nov 30, 2019 at 6:24 AM Bart Van Assche wrote: > Hi Anders and Larry, > > How about making it possible to tell Net-SNMP to use a more recent version > of TLS, e.g. as follows: > > diff --git a/include/net-snmp/library/default_store.h > b/include/net-snmp/library/default_store.h > index 16747aa5600e..9f80c77e439c 100644 > --- a/include/net-snmp/library/default_store.h > +++ b/include/net-snmp/library/default_store.h > @@ -183,6 +183,7 @@ extern "C" { > #define NETSNMP_DS_LIB_SSH_PUBKEY 33 > #define NETSNMP_DS_LIB_SSH_PRIVKEY 34 > #define NETSNMP_DS_LIB_OUTPUT_PRECISION 35 > +#define NETSNMP_DS_LIB_TLS_VERSION 36 > #define NETSNMP_DS_LIB_MAX_STR_ID 48 /* match NETSNMP_DS_MAX_SUBIDS */ > > /* > diff --git a/man/snmpd.conf.5.def b/man/snmpd.conf.5.def > index 9dae9909ba7e..4053680601b2 100644 > --- a/man/snmpd.conf.5.def > +++ b/man/snmpd.conf.5.def > @@ -190,6 +190,8 @@ certificate file. > This string will select the algorithms to use when negotiating > security during (D)TLS session establishment. See the openssl manual > page ciphers(1) for details on the format. Examples strings include: > +.IP "[snmp] tlsVersion" > +[ ... ] > .RS > .nf > diff --git a/snmplib/transports/snmpTLSBaseDomain.c > b/snmplib/transports/snmpTLSBaseDomain.c > index 223c3a0aaed7..9e1b4496f193 100644 > --- a/snmplib/transports/snmpTLSBaseDomain.c > +++ b/snmplib/transports/snmpTLSBaseDomain.c > @@ -784,6 +784,10 @@ netsnmp_tlsbase_ctor(void) { > NETSNMP_DS_LIBRARY_ID, > NETSNMP_DS_LIB_TLS_ALGORITMS); > > + netsnmp_ds_register_config(ASN_OCTET_STR, "snmp", "tlsVersion", > +NETSNMP_DS_LIBRARY_ID, > +NETSNMP_DS_LIB_TLS_VERSION); > + > /* > * for the client > */ > diff --git a/snmplib/transports/snmpTLSTCPDomain.c > b/snmplib/transports/snmpTLSTCPDomain.c > index 857e433ddf2e..76f62361e500 100644 > --- a/snmplib/transports/snmpTLSTCPDomain.c > +++ b/snmplib/transports/snmpTLSTCPDomain.c > @@ -723,7 +723,16 @@ netsnmp_tlstcp_open_client(netsnmp_transport *t) > } > > #ifdef SSL_CTX_set_max_proto_version > -SSL_CTX_set_max_proto_version(tlsdata->ssl_context, TLS1_VERSION); > +{ > +const char *tls_version; > + > +tls_version = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, > +NETSNMP_DS_LIB_TLS_VERSION); > +if (tls_version && strcmp(tls_version, "any") == 0) > +; > +else > +SSL_CTX_set_max_proto_version(tlsdata->ssl_context, > TLS1_VERSION); > +} > #endif > > /* RFC5953 Section 5.3.1: Establishing a Session as a Client > Bart. > > On 2019-11-27 13:22, Anders Wallin wrote: > > Hi Larry, > > I see the same problem! > > You should think more then twice before using TLS/DTLS. > The code is full of bugs and design issues (like sending traps before > checking hostnames etc) and it's using deprecated version of TLS. > > Regards > Anders Wallin > > > On Wed, Nov 27, 2019 at 9:33 PM Larry Hayes wrote: > >> It is even worse with TLS. >> >> When the snmptrapd is restarted without restarting the snmpd: >> >> kill the snmptrapd: >> >> From the snmpd logs: snmpd detects the connection close. >> >> Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: tlstcp: >> Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: remote side closed connection >> Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: tlstcp: >> Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: Shutting down SSL connection >> Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: tlsbase: >> Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: Freeing TLS Base data for a >> session >> >> Start the snmptrapd up again >> >> When snmpd tries to send a trap: >> >> Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: trap: >> Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: send_trap -1 -1 >> Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: MYMib-MIB::myMib >> Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: >> Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: trap: >> Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: sending trap type=167, >> version=139482016 >> Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: snmpd: send_trap: Generic >> error (Unknown error -146129760) >> >> >> Both DTLS and TLS i
Re: Determine snmpd status
On Sun, Dec 22, 2019 at 2:56 PM Raz Moshe wrote: > Hello, > > Assuming I have no community string configured (and so cannot use > 'snmpwalk' and other similar binaries), when I turn the snmp daemon on, is > there a way to determine it has done initialization and ready for queries? > > I found that checking if the log file exists gives a good indication (if > it was created already, snmpd is ready), but then there's a problem when I > turn snmpd on, off and then on again. Since the log file isn't deleted when > snmpd is turned off, it's gonna be there in the second time even before I > turn snmpd on. > > A short sleep() after turning snmpd on can do the trick, but obviously > that's a bad practice. > > Anything else I can do to get a good indication? > See if it's actually running? $ pidof snmpd && echo running See if there's anything listening on the standard port? $ nmap localhost -p161 | grep -q open && echo running That said, what use is the daemon running "for queries" if there's no users configured that can actually perform queries? ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Determine snmpd status
Hello, Assuming I have no community string configured (and so cannot use 'snmpwalk' and other similar binaries), when I turn the snmp daemon on, is there a way to determine it has done initialization and ready for queries? I found that checking if the log file exists gives a good indication (if it was created already, snmpd is ready), but then there's a problem when I turn snmpd on, off and then on again. Since the log file isn't deleted when snmpd is turned off, it's gonna be there in the second time even before I turn snmpd on. A short sleep() after turning snmpd on can do the trick, but obviously that's a bad practice. Anything else I can do to get a good indication? Thanks. ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Behavior of snmptrapd and snmpd when using certificates (TSM, DTLS)
Hi Anders and Larry, How about making it possible to tell Net-SNMP to use a more recent version of TLS, e.g. as follows: diff --git a/include/net-snmp/library/default_store.h b/include/net-snmp/library/default_store.h index 16747aa5600e..9f80c77e439c 100644 --- a/include/net-snmp/library/default_store.h +++ b/include/net-snmp/library/default_store.h @@ -183,6 +183,7 @@ extern "C" { #define NETSNMP_DS_LIB_SSH_PUBKEY 33 #define NETSNMP_DS_LIB_SSH_PRIVKEY 34 #define NETSNMP_DS_LIB_OUTPUT_PRECISION 35 +#define NETSNMP_DS_LIB_TLS_VERSION 36 #define NETSNMP_DS_LIB_MAX_STR_ID 48 /* match NETSNMP_DS_MAX_SUBIDS */ /* diff --git a/man/snmpd.conf.5.def b/man/snmpd.conf.5.def index 9dae9909ba7e..4053680601b2 100644 --- a/man/snmpd.conf.5.def +++ b/man/snmpd.conf.5.def @@ -190,6 +190,8 @@ certificate file. This string will select the algorithms to use when negotiating security during (D)TLS session establishment. See the openssl manual page ciphers(1) for details on the format. Examples strings include: +.IP "[snmp] tlsVersion" +[ ... ] .RS .nf diff --git a/snmplib/transports/snmpTLSBaseDomain.c b/snmplib/transports/snmpTLSBaseDomain.c index 223c3a0aaed7..9e1b4496f193 100644 --- a/snmplib/transports/snmpTLSBaseDomain.c +++ b/snmplib/transports/snmpTLSBaseDomain.c @@ -784,6 +784,10 @@ netsnmp_tlsbase_ctor(void) { NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_TLS_ALGORITMS); + netsnmp_ds_register_config(ASN_OCTET_STR, "snmp", "tlsVersion", + NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_TLS_VERSION); + /* * for the client */ diff --git a/snmplib/transports/snmpTLSTCPDomain.c b/snmplib/transports/snmpTLSTCPDomain.c index 857e433ddf2e..76f62361e500 100644 --- a/snmplib/transports/snmpTLSTCPDomain.c +++ b/snmplib/transports/snmpTLSTCPDomain.c @@ -723,7 +723,16 @@ netsnmp_tlstcp_open_client(netsnmp_transport *t) } #ifdef SSL_CTX_set_max_proto_version - SSL_CTX_set_max_proto_version(tlsdata->ssl_context, TLS1_VERSION); + { + const char *tls_version; + + tls_version = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_TLS_VERSION); + if (tls_version && strcmp(tls_version, "any") == 0) + ; + else + SSL_CTX_set_max_proto_version(tlsdata->ssl_context, TLS1_VERSION); + } #endif /* RFC5953 Section 5.3.1: Establishing a Session as a Client Bart. On 2019-11-27 13:22, Anders Wallin wrote: Hi Larry, I see the same problem! You should think more then twice before using TLS/DTLS. The code is full of bugs and design issues (like sending traps before checking hostnames etc) and it's using deprecated version of TLS. Regards Anders Wallin On Wed, Nov 27, 2019 at 9:33 PM Larry Hayes <lhay...@gmail.com> wrote: It is even worse with TLS. When the snmptrapd is restarted without restarting the snmpd: kill the snmptrapd: From the snmpd logs: snmpd detects the connection close. Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: tlstcp: Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: remote side closed connection Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: tlstcp: Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: Shutting down SSL connection Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: tlsbase: Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: Freeing TLS Base data for a session Start the snmptrapd up
Re: Behavior of snmptrapd and snmpd when using certificates (TSM, DTLS)
Hi Larry, I see the same problem! You should think more then twice before using TLS/DTLS. The code is full of bugs and design issues (like sending traps before checking hostnames etc) and it's using deprecated version of TLS. Regards Anders Wallin On Wed, Nov 27, 2019 at 9:33 PM Larry Hayes wrote: > It is even worse with TLS. > > When the snmptrapd is restarted without restarting the snmpd: > > kill the snmptrapd: > > From the snmpd logs: snmpd detects the connection close. > > Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: tlstcp: > Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: remote side closed connection > Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: tlstcp: > Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: Shutting down SSL connection > Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: tlsbase: > Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: Freeing TLS Base data for a > session > > Start the snmptrapd up again > > When snmpd tries to send a trap: > > Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: trap: > Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: send_trap -1 -1 > Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: MYMib-MIB::myMib > Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: > Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: trap: > Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: sending trap type=167, > version=139482016 > Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: snmpd: send_trap: Generic error > (Unknown error -146129760) > > > Both DTLS and TLS issue seems to center around the fact that snmpd does > not properly handle the case where the trap receiver's connection goes away. > > Anyone else seeing this behavior? > > On Wed, Nov 20, 2019 at 10:24 AM Larry Hayes wrote: > >> Hello, >> >> I am using net-snmp v5.8 r0. >> >> I think I have successfully configured an snmpd server to generate V3 >> Traps/Informs using TSM with certificates and have an snmptrapd receive >> those V3 Traps/Informs. >> As I can see the Trap/Infom data dumped to the window snmptrapd is >> running. >> >> My issue is, when I restart snmptrapd, it can no longer receive V3 >> Traps/Informs using TSM without restarting the snmpd also. >> >> snmptrapd can receive V2 Traps/Infoms without restarting snmpd. >> >> Is this the normal/desired behavior with DTLS? >> (I have not tried TLS yet) >> >> >> sudo snmptrapd >> -Dtsm,tls,ssh,openssl,cert,dtlsudp,9:openssl:fingerprint,9:openssl:cert:san >> -f -Losd dtlsudp:10162 udp:162 >> >> >> 2019-11-20 10:11:50 apcon-ubuntu.apconnet.apcon.com [UDP: >> [10.20.19.57]:33656->[10.20.19.57]:162]: >> DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (10093) 0:01:40.93 >> SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.10830.5.0.62 >> SNMPv2-SMI::enterprises.10830.2.15.0 = STRING: "cli-ssh" >> SNMPv2-SMI::enterprises.10830.2.16.0 = STRING: "admin/10.20.19.37" >> SNMPv2-SMI::enterprises.10830.2.17.0 = STRING: "10.20.19.57" >> 2019-11-20 10:11:50 apcon-ubuntu.apconnet.apcon.com [UDP: >> [10.20.19.57]:60888->[10.20.19.57]:162]: >> DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (10093) 0:01:40.93 >> SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.10830.5.0.62 >> SNMPv2-SMI::enterprises.10830.2.15.0 = STRING: "cli-ssh" >> SNMPv2-SMI::enterprises.10830.2.16.0 = STRING: "admin/10.20.19.37" >> SNMPv2-SMI::enterprises.10830.2.17.0 = STRING: "10.20.19.57" >> dtlsudp: received 229 raw bytes on way to dtls >> dtlsudp: starting a new connection >> cert:find:params: looking for identity(1) in DEFAULT(0x0), hint (nil) >> cert:find:params: looking for identity(1) in MULTIPLE(0x200), hint >> 0x1249450 >> cert:find:params: looking for identity(1) in FINGERPRINT(0x2), hint >> 0x1249450 >> cert:find:params: hint = >> 04:BF:CF:1A:9C:5D:7A:9D:87:7E:1D:D8:A3:77:1A:DD:D7:76:77:0B >> cert:find:found: using cert manager.crt / >> 04bfcf1a9c5d7a9d877e1dd8a3771addd776770b for identity(1) >> (uses=identity+remote_peer (3)) >> cert:find:found: using cert manager.crt / >> 04bfcf1a9c5d7a9d877e1dd8a3771addd776770b for identity(1) >> (uses=identity+remote_peer (3)) >> >> >> snmpd >> -Dtls,ssh,openssl,cert,dtlsudp,9:openssl:fingerprint,9:openssl:cert:san -f >> -Lsd udp:0.0.0.0:161 dtlsudp:10161 >> >> Config: >> trapsess -v 2c 10.20.19.57:162 -c public >> trapsess -v 2c -Ci -r 0 10.20.19.57:162 -c public >> trapsess -v 3 -Ci -r 0 -T their_identity=manager.crt dtlsudp: >> 10.20.19.57:10162 >> >> snmpd: logging >> Nov 20 10:19:21 apcon-ubuntu snmpd[5857]: dtlsudp: >> Nov 20 10:19:21 apcon-ubuntu snmpd[5857]: sending 193 bytes >> >> >> >> ___ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users > ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Behavior of snmptrapd and snmpd when using certificates (TSM, DTLS)
It is even worse with TLS. When the snmptrapd is restarted without restarting the snmpd: kill the snmptrapd: >From the snmpd logs: snmpd detects the connection close. Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: tlstcp: Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: remote side closed connection Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: tlstcp: Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: Shutting down SSL connection Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: tlsbase: Nov 27 14:23:51 apcon-ubuntu snmpd[22569]: Freeing TLS Base data for a session Start the snmptrapd up again When snmpd tries to send a trap: Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: trap: Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: send_trap -1 -1 Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: MYMib-MIB::myMib Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: trap: Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: sending trap type=167, version=139482016 Nov 27 14:24:08 apcon-ubuntu snmpd[22569]: snmpd: send_trap: Generic error (Unknown error -146129760) Both DTLS and TLS issue seems to center around the fact that snmpd does not properly handle the case where the trap receiver's connection goes away. Anyone else seeing this behavior? On Wed, Nov 20, 2019 at 10:24 AM Larry Hayes wrote: > Hello, > > I am using net-snmp v5.8 r0. > > I think I have successfully configured an snmpd server to generate V3 > Traps/Informs using TSM with certificates and have an snmptrapd receive > those V3 Traps/Informs. > As I can see the Trap/Infom data dumped to the window snmptrapd is running. > > My issue is, when I restart snmptrapd, it can no longer receive V3 > Traps/Informs using TSM without restarting the snmpd also. > > snmptrapd can receive V2 Traps/Infoms without restarting snmpd. > > Is this the normal/desired behavior with DTLS? > (I have not tried TLS yet) > > > sudo snmptrapd > -Dtsm,tls,ssh,openssl,cert,dtlsudp,9:openssl:fingerprint,9:openssl:cert:san > -f -Losd dtlsudp:10162 udp:162 > > > 2019-11-20 10:11:50 apcon-ubuntu.apconnet.apcon.com [UDP: > [10.20.19.57]:33656->[10.20.19.57]:162]: > DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (10093) 0:01:40.93 > SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.10830.5.0.62 > SNMPv2-SMI::enterprises.10830.2.15.0 = STRING: "cli-ssh" > SNMPv2-SMI::enterprises.10830.2.16.0 = STRING: "admin/10.20.19.37" > SNMPv2-SMI::enterprises.10830.2.17.0 = STRING: "10.20.19.57" > 2019-11-20 10:11:50 apcon-ubuntu.apconnet.apcon.com [UDP: > [10.20.19.57]:60888->[10.20.19.57]:162]: > DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (10093) 0:01:40.93 > SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.10830.5.0.62 > SNMPv2-SMI::enterprises.10830.2.15.0 = STRING: "cli-ssh" > SNMPv2-SMI::enterprises.10830.2.16.0 = STRING: "admin/10.20.19.37" > SNMPv2-SMI::enterprises.10830.2.17.0 = STRING: "10.20.19.57" > dtlsudp: received 229 raw bytes on way to dtls > dtlsudp: starting a new connection > cert:find:params: looking for identity(1) in DEFAULT(0x0), hint (nil) > cert:find:params: looking for identity(1) in MULTIPLE(0x200), hint > 0x1249450 > cert:find:params: looking for identity(1) in FINGERPRINT(0x2), hint > 0x1249450 > cert:find:params: hint = > 04:BF:CF:1A:9C:5D:7A:9D:87:7E:1D:D8:A3:77:1A:DD:D7:76:77:0B > cert:find:found: using cert manager.crt / > 04bfcf1a9c5d7a9d877e1dd8a3771addd776770b for identity(1) > (uses=identity+remote_peer (3)) > cert:find:found: using cert manager.crt / > 04bfcf1a9c5d7a9d877e1dd8a3771addd776770b for identity(1) > (uses=identity+remote_peer (3)) > > > snmpd > -Dtls,ssh,openssl,cert,dtlsudp,9:openssl:fingerprint,9:openssl:cert:san -f > -Lsd udp:0.0.0.0:161 dtlsudp:10161 > > Config: > trapsess -v 2c 10.20.19.57:162 -c public > trapsess -v 2c -Ci -r 0 10.20.19.57:162 -c public > trapsess -v 3 -Ci -r 0 -T their_identity=manager.crt dtlsudp: > 10.20.19.57:10162 > > snmpd: logging > Nov 20 10:19:21 apcon-ubuntu snmpd[5857]: dtlsudp: > Nov 20 10:19:21 apcon-ubuntu snmpd[5857]: sending 193 bytes > > > > ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Behavior of snmptrapd and snmpd when using certificates (TSM, DTLS)
Hello, I am using net-snmp v5.8 r0. I think I have successfully configured an snmpd server to generate V3 Traps/Informs using TSM with certificates and have an snmptrapd receive those V3 Traps/Informs. As I can see the Trap/Infom data dumped to the window snmptrapd is running. My issue is, when I restart snmptrapd, it can no longer receive V3 Traps/Informs using TSM without restarting the snmpd also. snmptrapd can receive V2 Traps/Infoms without restarting snmpd. Is this the normal/desired behavior with DTLS? (I have not tried TLS yet) sudo snmptrapd -Dtsm,tls,ssh,openssl,cert,dtlsudp,9:openssl:fingerprint,9:openssl:cert:san -f -Losd dtlsudp:10162 udp:162 2019-11-20 10:11:50 apcon-ubuntu.apconnet.apcon.com [UDP: [10.20.19.57]:33656->[10.20.19.57]:162]: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (10093) 0:01:40.93 SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.10830.5.0.62 SNMPv2-SMI::enterprises.10830.2.15.0 = STRING: "cli-ssh" SNMPv2-SMI::enterprises.10830.2.16.0 = STRING: "admin/10.20.19.37" SNMPv2-SMI::enterprises.10830.2.17.0 = STRING: "10.20.19.57" 2019-11-20 10:11:50 apcon-ubuntu.apconnet.apcon.com [UDP: [10.20.19.57]:60888->[10.20.19.57]:162]: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (10093) 0:01:40.93 SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.10830.5.0.62 SNMPv2-SMI::enterprises.10830.2.15.0 = STRING: "cli-ssh" SNMPv2-SMI::enterprises.10830.2.16.0 = STRING: "admin/10.20.19.37" SNMPv2-SMI::enterprises.10830.2.17.0 = STRING: "10.20.19.57" dtlsudp: received 229 raw bytes on way to dtls dtlsudp: starting a new connection cert:find:params: looking for identity(1) in DEFAULT(0x0), hint (nil) cert:find:params: looking for identity(1) in MULTIPLE(0x200), hint 0x1249450 cert:find:params: looking for identity(1) in FINGERPRINT(0x2), hint 0x1249450 cert:find:params: hint = 04:BF:CF:1A:9C:5D:7A:9D:87:7E:1D:D8:A3:77:1A:DD:D7:76:77:0B cert:find:found: using cert manager.crt / 04bfcf1a9c5d7a9d877e1dd8a3771addd776770b for identity(1) (uses=identity+remote_peer (3)) cert:find:found: using cert manager.crt / 04bfcf1a9c5d7a9d877e1dd8a3771addd776770b for identity(1) (uses=identity+remote_peer (3)) snmpd -Dtls,ssh,openssl,cert,dtlsudp,9:openssl:fingerprint,9:openssl:cert:san -f -Lsd udp:0.0.0.0:161 dtlsudp:10161 Config: trapsess -v 2c 10.20.19.57:162 -c public trapsess -v 2c -Ci -r 0 10.20.19.57:162 -c public trapsess -v 3 -Ci -r 0 -T their_identity=manager.crt dtlsudp: 10.20.19.57:10162 snmpd: logging Nov 20 10:19:21 apcon-ubuntu snmpd[5857]: dtlsudp: Nov 20 10:19:21 apcon-ubuntu snmpd[5857]: sending 193 bytes ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: How to add SNMP-TSM-MIB to snmpd
I got it working. I was correct in that it was a build/configuration issue. I had to add this to the configuration options at build time: '--with-mib-modules=tsm-mib' After that the snmpd started to respond with data: larryh@apcon-ubuntu:~/.../tls$ snmpget -m +SNMP-TSM-MIB -v 3 -u v3admin -a md5 -A hello1234 -l authNoPriv 127.0.0.1 1.3.6.1.2.1.190.1.2.1.0 SNMP-TSM-MIB::snmpTsmConfigurationUsePrefix.0 = INTEGER: false(2) On Fri, Nov 15, 2019 at 10:16 AM Larry Hayes wrote: > Thanks for the suggestion, I am assuming you meant that the snmpget needed > a -v 3 to do version 3 snmp. > That did not work and I tried with USM and TSM models: > > bash-4.3# snmpget -v 3 -u v3admin -a md5 -A hello1234 -l authNoPriv > 127.0.0.1 1.3.6.1.2.1.190.1.2.1.0 > SNMP-TSM-MIB::snmpTsmConfigurationUsePrefix.0 = No Such Object available > on this agent at this OID > > bash-4.3# snmpget -v 3 --defSecurityModel=tsm -T > our_identity=04:BF:CF:1A:9C:5D:7A:9D:87:7E:1D:D8:A3:77:1A:DD:D7:76:77:0B -T > their_identity=07:96:45:D7:46:E4:EE:11:66:68:36:77:A5:F9:24:D6:8A:1A:71:D9 > dtlsudp:127.0.0.1:10161 1.3.6.1.2.1.190.1.2.1.0 > SNMP-TSM-MIB::snmpTsmConfigurationUsePrefix.0 = No Such Object available > on this agent at this OID > > I see in the snmpd output at start up time: > Nov 15 10:05:33 apcon-ubuntu snmpd[14186]: A SNMP version other than 3 was > requested with (D)TLS; using 3 anyways > > I feel this is either a build/configuration issue with snmpd that I am not > addressing. > Like I said, I added to the mib in the build configuration option and have > installed it. > Just seems like I am missing something to tell snmpd that it is > responsible for this MIB. > > > > On Thu, Nov 14, 2019 at 2:41 PM Anders Wallin wrote: > >> Hi Larry, >> >> you need to use "-v 3", there is no TLS support in "2c" >> >> Regards >> Anders Wallin >> >> >> On Thu, Nov 14, 2019 at 9:18 PM Larry Hayes wrote: >> >>> I am using 5.8.r0 net-snmp. >>> >>> I have build the net-snmp library and snmpd with the flags for TSM: >>> >>> >>> *--with-security-modules=tsm --with-transports=TLSTCP,DTLSUDP* >>> >>> >>> >>> *and--with-mibs=SNMP-TSM-MIB:* >>> >>> I can get the snmpd daemon running with self signed cert access working. >>> Installed the TSM Mib in the /etc/snmp/mibs directory >>> >>> Added this the snmpd.conf file: >>> >>> [snmp] mibs +SNMP-TSM-MIB >>> >>> translate works: >>> bash-4.3# ./snmptranslate -m +SNMP-TSM-MIB -IR -On >>> snmpTsmConfigurationUsePrefix >>> .1.3.6.1.2.1.190.1.2.1 >>> bash-4.3# >>> >>> I was trying to do a get on the snmpTsmConfigruationUsePrefix. >>> It failing: >>> bash-4.3# ./snmpget -d -v 2c -c public 127.0.0.1 .1.3.6.1.2.1.190.1.2.1 >>> >>> Sending 45 bytes to UDP: [127.0.0.1]:161->[0.0.0.0]:0 >>> : 30 2B 02 01 01 04 06 70 75 62 6C 69 63 A0 1E 02 >>> 0+.public... >>> 0016: 04 40 7C FC 31 02 01 00 02 01 00 30 10 30 0E 06 >>> .@|.1..0.0.. >>> 0032: 0A 2B 06 01 02 01 81 3E 01 02 01 05 00 .+.....>. >>> >>> >>> Received 45 byte packet from UDP: [127.0.0.1]:161->[0.0.0.0]:60013 >>> : 30 2B 02 01 01 04 06 70 75 62 6C 69 63 A2 1E 02 >>> 0+.public... >>> 0016: 04 40 7C FC 31 02 01 00 02 01 00 30 10 30 0E 06 >>> .@|.1..0.0.. >>> 0032: 0A 2B 06 01 02 01 81 3E 01 02 01 80 00 .+.>. >>> >>> SNMP-TSM-MIB::snmpTsmConfigurationUsePrefix = No Such Object available >>> on this agent at this OID >>> bash-4.3# >>> >>> >>> I was expecting the snmpd to respond to the gets for the TSM Mib. >>> Is there something else that I need to do to get the snmpd to respond to >>> this MIB? >>> >>> Thanks for any help >>> ___ >>> Net-snmp-users mailing list >>> Net-snmp-users@lists.sourceforge.net >>> Please see the following page to unsubscribe or change other options: >>> https://lists.sourceforge.net/lists/listinfo/net-snmp-users >>> >> ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: How to add SNMP-TSM-MIB to snmpd
Thanks for the suggestion, I am assuming you meant that the snmpget needed a -v 3 to do version 3 snmp. That did not work and I tried with USM and TSM models: bash-4.3# snmpget -v 3 -u v3admin -a md5 -A hello1234 -l authNoPriv 127.0.0.1 1.3.6.1.2.1.190.1.2.1.0 SNMP-TSM-MIB::snmpTsmConfigurationUsePrefix.0 = No Such Object available on this agent at this OID bash-4.3# snmpget -v 3 --defSecurityModel=tsm -T our_identity=04:BF:CF:1A:9C:5D:7A:9D:87:7E:1D:D8:A3:77:1A:DD:D7:76:77:0B -T their_identity=07:96:45:D7:46:E4:EE:11:66:68:36:77:A5:F9:24:D6:8A:1A:71:D9 dtlsudp:127.0.0.1:10161 1.3.6.1.2.1.190.1.2.1.0 SNMP-TSM-MIB::snmpTsmConfigurationUsePrefix.0 = No Such Object available on this agent at this OID I see in the snmpd output at start up time: Nov 15 10:05:33 apcon-ubuntu snmpd[14186]: A SNMP version other than 3 was requested with (D)TLS; using 3 anyways I feel this is either a build/configuration issue with snmpd that I am not addressing. Like I said, I added to the mib in the build configuration option and have installed it. Just seems like I am missing something to tell snmpd that it is responsible for this MIB. On Thu, Nov 14, 2019 at 2:41 PM Anders Wallin wrote: > Hi Larry, > > you need to use "-v 3", there is no TLS support in "2c" > > Regards > Anders Wallin > > > On Thu, Nov 14, 2019 at 9:18 PM Larry Hayes wrote: > >> I am using 5.8.r0 net-snmp. >> >> I have build the net-snmp library and snmpd with the flags for TSM: >> >> >> *--with-security-modules=tsm --with-transports=TLSTCP,DTLSUDP* >> >> >> >> *and--with-mibs=SNMP-TSM-MIB:* >> >> I can get the snmpd daemon running with self signed cert access working. >> Installed the TSM Mib in the /etc/snmp/mibs directory >> >> Added this the snmpd.conf file: >> >> [snmp] mibs +SNMP-TSM-MIB >> >> translate works: >> bash-4.3# ./snmptranslate -m +SNMP-TSM-MIB -IR -On >> snmpTsmConfigurationUsePrefix >> .1.3.6.1.2.1.190.1.2.1 >> bash-4.3# >> >> I was trying to do a get on the snmpTsmConfigruationUsePrefix. >> It failing: >> bash-4.3# ./snmpget -d -v 2c -c public 127.0.0.1 .1.3.6.1.2.1.190.1.2.1 >> >> Sending 45 bytes to UDP: [127.0.0.1]:161->[0.0.0.0]:0 >> : 30 2B 02 01 01 04 06 70 75 62 6C 69 63 A0 1E 02 >> 0+.public... >> 0016: 04 40 7C FC 31 02 01 00 02 01 00 30 10 30 0E 06 >> .@|.1..0.0.. >> 0032: 0A 2B 06 01 02 01 81 3E 01 02 01 05 00 .+.>. >> >> >> Received 45 byte packet from UDP: [127.0.0.1]:161->[0.0.0.0]:60013 >> : 30 2B 02 01 01 04 06 70 75 62 6C 69 63 A2 1E 02 >> 0+.public... >> 0016: 04 40 7C FC 31 02 01 00 02 01 00 30 10 30 0E 06 >> .@|.1..0.0.. >> 0032: 0A 2B 06 01 02 01 81 3E 01 02 01 80 00 .+.>. >> >> SNMP-TSM-MIB::snmpTsmConfigurationUsePrefix = No Such Object available on >> this agent at this OID >> bash-4.3# >> >> >> I was expecting the snmpd to respond to the gets for the TSM Mib. >> Is there something else that I need to do to get the snmpd to respond to >> this MIB? >> >> Thanks for any help >> ___ >> Net-snmp-users mailing list >> Net-snmp-users@lists.sourceforge.net >> Please see the following page to unsubscribe or change other options: >> https://lists.sourceforge.net/lists/listinfo/net-snmp-users >> > ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: How to add SNMP-TSM-MIB to snmpd
Hi Larry, you need to use "-v 3", there is no TLS support in "2c" Regards Anders Wallin On Thu, Nov 14, 2019 at 9:18 PM Larry Hayes wrote: > I am using 5.8.r0 net-snmp. > > I have build the net-snmp library and snmpd with the flags for TSM: > > > *--with-security-modules=tsm --with-transports=TLSTCP,DTLSUDP* > > > > *and--with-mibs=SNMP-TSM-MIB:* > > I can get the snmpd daemon running with self signed cert access working. > Installed the TSM Mib in the /etc/snmp/mibs directory > > Added this the snmpd.conf file: > > [snmp] mibs +SNMP-TSM-MIB > > translate works: > bash-4.3# ./snmptranslate -m +SNMP-TSM-MIB -IR -On > snmpTsmConfigurationUsePrefix > .1.3.6.1.2.1.190.1.2.1 > bash-4.3# > > I was trying to do a get on the snmpTsmConfigruationUsePrefix. > It failing: > bash-4.3# ./snmpget -d -v 2c -c public 127.0.0.1 .1.3.6.1.2.1.190.1.2.1 > > Sending 45 bytes to UDP: [127.0.0.1]:161->[0.0.0.0]:0 > : 30 2B 02 01 01 04 06 70 75 62 6C 69 63 A0 1E 02 > 0+.public... > 0016: 04 40 7C FC 31 02 01 00 02 01 00 30 10 30 0E 06 > .@|.1..0.0.. > 0032: 0A 2B 06 01 02 01 81 3E 01 02 01 05 00 .+.>. > > > Received 45 byte packet from UDP: [127.0.0.1]:161->[0.0.0.0]:60013 > : 30 2B 02 01 01 04 06 70 75 62 6C 69 63 A2 1E 02 > 0+.public... > 0016: 04 40 7C FC 31 02 01 00 02 01 00 30 10 30 0E 06 > .@|.1..0.0.. > 0032: 0A 2B 06 01 02 01 81 3E 01 02 01 80 00 .+.....>. > > SNMP-TSM-MIB::snmpTsmConfigurationUsePrefix = No Such Object available on > this agent at this OID > bash-4.3# > > > I was expecting the snmpd to respond to the gets for the TSM Mib. > Is there something else that I need to do to get the snmpd to respond to > this MIB? > > Thanks for any help > ___ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users > ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
How to add SNMP-TSM-MIB to snmpd
I am using 5.8.r0 net-snmp. I have build the net-snmp library and snmpd with the flags for TSM: *--with-security-modules=tsm --with-transports=TLSTCP,DTLSUDP* *and--with-mibs=SNMP-TSM-MIB:* I can get the snmpd daemon running with self signed cert access working. Installed the TSM Mib in the /etc/snmp/mibs directory Added this the snmpd.conf file: [snmp] mibs +SNMP-TSM-MIB translate works: bash-4.3# ./snmptranslate -m +SNMP-TSM-MIB -IR -On snmpTsmConfigurationUsePrefix .1.3.6.1.2.1.190.1.2.1 bash-4.3# I was trying to do a get on the snmpTsmConfigruationUsePrefix. It failing: bash-4.3# ./snmpget -d -v 2c -c public 127.0.0.1 .1.3.6.1.2.1.190.1.2.1 Sending 45 bytes to UDP: [127.0.0.1]:161->[0.0.0.0]:0 : 30 2B 02 01 01 04 06 70 75 62 6C 69 63 A0 1E 020+.public... 0016: 04 40 7C FC 31 02 01 00 02 01 00 30 10 30 0E 06.@|.1..0.0.. 0032: 0A 2B 06 01 02 01 81 3E 01 02 01 05 00 .+.>. Received 45 byte packet from UDP: [127.0.0.1]:161->[0.0.0.0]:60013 : 30 2B 02 01 01 04 06 70 75 62 6C 69 63 A2 1E 020+.public... 0016: 04 40 7C FC 31 02 01 00 02 01 00 30 10 30 0E 06.@|.1..0.0.. 0032: 0A 2B 06 01 02 01 81 3E 01 02 01 80 00 .+.>. SNMP-TSM-MIB::snmpTsmConfigurationUsePrefix = No Such Object available on this agent at this OID bash-4.3# I was expecting the snmpd to respond to the gets for the TSM Mib. Is there something else that I need to do to get the snmpd to respond to this MIB? Thanks for any help ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Using one AgentX sub-agent with multiple master snmpd daemons
Hello, I am in the process of writing my own AgentX sub-agent for serving some MIB. I was wondering whether it is possible to have the same sub-agent connect to more than one master agents. I have been looking around both in documentation (I couldn't find a relative example) and the source code. It seems to me that I should be able to keep multiple snmp_session objects around and poll them for incoming traffic, but I am not sure if that's a valid way to use the sub-agent. Also, the snmpd.conf man page seems to indicate that the /agentXSocket/ might allow multiple addresses (separated by commas: "agentXSocket [:]*[,...]*"**but it could be that i 'm just not reading this correctly. Any directions would be more than welcome. Cheers, Babis ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Using one AgentX sub-agent with multiple master snmpd daemons
Hello, I am in the process of writing my own AgentX sub-agent for serving some MIB. I was wondering whether it is possible to have the same sub-agent connect to more than one master agents. I have been looking around both in documentation (I couldn't find a relative example) and the source code. It seems to me that I should be able to keep multiple snmp_session objects around and poll them for incoming traffic, but I am not sure if that's a valid way to use the sub-agent. Also, the snmpd.conf man page seems to indicate that the /agentXSocket/ might allow multiple addresses (separated by commas: "agentXSocket [:]*[,...]*"**but it could be that i 'm just not reading this correctly. Any directions would be more than welcome. Cheers, Babis ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: snmpd MIB Question
So, I actually just stumbled across the answer. Having the file loaded in snmp.conf and apparently read and parsed in snmpd didn't work. Adding a configure option --with-mibfiles="/share/snmp/mibs/filename.txt" worked. Its still loading it as snmpd starts up, but now it seems to work and allow use of the MIB defined names instead of just using numeric OIDs. Problem solved. Doug On 8/20/2019 4:15 PM, Doug Ehlers wrote: Hi All, I have I think a very basic question. I've been chasing around on this for a couple of days. I am setting up a custom monitor command in snmpd.conf. As long as I supply numeric OIDs, it works fine. However, if I supply a name in place of the OID, from an MIB file that resolves just fine with snmptranslate, snmpd throws a configuration error saying it can't find the OID. I can see in the -Dread_config output of snmpd that it is seeing and loading my custom MIB file, and obviously snmptranslate is seeing it as well. The question is this. Should I be able to do this, or does the mib2c command get involved and I have to set up the .h and .c files in agent/mibgroup? I'm really hoping creating the .c file isn't required and that I just have some other minor mis-configuration. After spending a couple days reading and playing with it, I just was hoping for some confirmation from the group. Thanks, Doug ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- Doug Ehlers TimeMachines Inc 300 S 68th St Place, STE 100 Lincoln, NE 68510 (402) 486-0511 ext. 2 (206) 339-8595 FAX http://www.timemachinescorp.com ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd MIB Question
Hi All, I have I think a very basic question. I've been chasing around on this for a couple of days. I am setting up a custom monitor command in snmpd.conf. As long as I supply numeric OIDs, it works fine. However, if I supply a name in place of the OID, from an MIB file that resolves just fine with snmptranslate, snmpd throws a configuration error saying it can't find the OID. I can see in the -Dread_config output of snmpd that it is seeing and loading my custom MIB file, and obviously snmptranslate is seeing it as well. The question is this. Should I be able to do this, or does the mib2c command get involved and I have to set up the .h and .c files in agent/mibgroup? I'm really hoping creating the .c file isn't required and that I just have some other minor mis-configuration. After spending a couple days reading and playing with it, I just was hoping for some confirmation from the group. Thanks, Doug ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd
I always get below error when ever I start snmpd: $ ./snmpconf -g basic_setup .. Do you want to configure where and if the agent will send traps? (default = y): n *** Beginning monitoring setup *** Do you want to configure the agent's ability to monitor various aspects of your system? (default = y): n Error: An snmpd.conf file already exists in this directory. 'overwrite', 'skip', 'rename' or 'append'? : overwrite The following files were created: snmpd.conf These files should be moved to c:/usr/share/snmp if you want them used by everyone on the system. In the future, if you add the -i option to the command line I'll copy them there automatically for you. Or, if you want them for your personal use only, copy them to /c/work/config/.snmp . In the future, if you add the -p option to the command line I'll copy them there automatically for you. Starting snmpd: MINGW64 /c/usr/bin $ ./snmpd Warning: no access control information configured. (Config search path: c:/usr/etc/snmp;c:/usr/share/snmp;c:/usr/lib;C:\work\config/.snmp) It's unlikely this agent can serve any useful purpose in this state. Run "snmpconf -g basic_setup" to help you configure the snmpd.conf file for this agent. NET-SNMP version 5.8 MINGW64 /c/usr/bin $ Regards, Prakash ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Force snmpd to only respond to authPriv requests.
Is there a way, in snmpd.conf to force snmpd to only respond to authPriv requests? Thx! ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: snmpd[20456]: %WAAS-UNKNOWN-3-899999: truncating integer value > 32 bits
2019-03-25
Thread
Kiran Kumar Pamula -X (kpamula - HCL TECHNOLOGIES LIMITED at Cisco) via Net-snmp-users
Hi Experts, Could you kindly help on this. Thanks, Kiran From: Kiran Kumar Pamula -X (kpamula - HCL TECHNOLOGIES LIMITED at Cisco) Sent: 13 March 2019 23:23 To: 'net-snmp-users@lists.sourceforge.net' Subject: snmpd[20456]: %WAAS-UNKNOWN-3-89: truncating integer value > 32 bits Hi Experts, Our customer reported below messages. Customer want to know the impact and how to stop them. -- Mar 10 16:35:03 10.137.33.13 2019 Mar 10 07:35:10 snmpd[20456]: %WAAS-UNKNOWN-3-89: truncating integer value > 32 bits Mar 10 16:35:40 10.137.33.13 2019 Mar 10 07:35:11 snmpd[20456]: %WAAS-UNKNOWN-3-89: truncating integer value > 32 bits Mar 10 16:40:06 10.137.33.13 2019 Mar 10 07:40:12 snmpd[20456]: %WAAS-UNKNOWN-3-89: truncating integer value > 32 bits Mar 10 16:50:10 10.137.33.13 2019 Mar 10 07:50:12 last message repeated 5 times Mar 10 17:00:10 10.137.33.13 2019 Mar 10 08:00:12 last message repeated 4 times -- Customer informed the message was seen after running our WAAS Product 1 year, 19 weeks, 23 hours that has Net-snmp 5.7.3 installed on it. We think it looks close to: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597024 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597024;msg=2 The above links mention about a patch to change: snmplib/snmp_client.c 805c805 < snmp_log(LOG_ERR,"truncating integer value > 32 bits\n"); --- > snmp_log(LOG_DEBUG,"truncating integer value > 32 > bits\n"); 816c816 But I see this code is unchanged and remains the same in Net-snmp 5.8 also, without above patch. Could you please advise how to address this issue for our customer. Thanks, Kiran ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd[20456]: %WAAS-UNKNOWN-3-899999: truncating integer value > 32 bits
2019-03-13
Thread
Kiran Kumar Pamula -X (kpamula - HCL TECHNOLOGIES LIMITED at Cisco) via Net-snmp-users
Hi Experts, Our customer reported below messages. Customer want to know the impact and how to stop them. -- Mar 10 16:35:03 10.137.33.13 2019 Mar 10 07:35:10 snmpd[20456]: %WAAS-UNKNOWN-3-89: truncating integer value > 32 bits Mar 10 16:35:40 10.137.33.13 2019 Mar 10 07:35:11 snmpd[20456]: %WAAS-UNKNOWN-3-89: truncating integer value > 32 bits Mar 10 16:40:06 10.137.33.13 2019 Mar 10 07:40:12 snmpd[20456]: %WAAS-UNKNOWN-3-89: truncating integer value > 32 bits Mar 10 16:50:10 10.137.33.13 2019 Mar 10 07:50:12 last message repeated 5 times Mar 10 17:00:10 10.137.33.13 2019 Mar 10 08:00:12 last message repeated 4 times -- Customer informed the message was seen after running our WAAS Product 1 year, 19 weeks, 23 hours that has Net-snmp 5.7.3 installed on it. We think it looks close to: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597024 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597024;msg=2 The above links mention about a patch to change: snmplib/snmp_client.c 805c805 < snmp_log(LOG_ERR,"truncating integer value > 32 bits\n"); --- > snmp_log(LOG_DEBUG,"truncating integer value > 32 > bits\n"); 816c816 But I see this code is unchanged and remains the same in Net-snmp 5.8 also, without above patch. Could you please advise how to address this issue for our customer. Thanks, Kiran ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Can snmpd be configured, built and installed to run with specified user and group
I've solved my problem. snmpd provides the -u and -g command line switches. After startup, it will switch to the userid and groupid provided. It's dynamic config files will be created and accessed using this user and group. To enable remote configuration, I needed to be able to run net-snmp-config from an account other than root. ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Can snmpd be configured, built and installed to run with specified user and group
Is there a way to configure, build, install and run snmpd with a specific user and group? Something other than root:root, thx. ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Limiting MIB access to snmpd
I have built the snmpd and a custom agentx sub agent. When I compiled the daemon and sub agent I specified the with mibs: --with-mibs=SNMPv2-MIB:RFC1213-MIB:SNMP-VIEW-BASED-ACM-MIB:SNMP-COMMUNITY-MIB:SNMP-FRAMEWORK-MIB:SNMP-MPD-MIB:SNMP-USER-BASED-SM-MIB:My-MIB:My-4K-EVENTS-MIB:My-4K-MIB \ When I do an snmpwalk from the top level. I am getting data for mibs that I did not install on my machine. Like: HOST-RESOURCES-MIB::hrSWRunParameters.856 = STRING: "/bin/syslog-ng -F" I would like for the snmpwalk to not get responses for this MIB. Is there a way to build/install/configure snmpd to skip MIBs that I do not want responses for? Actually I am not sure how it knows about this MIB since it is not installed on the device it is running on. Thanks Larry ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: Starting snmpd from WiX installer on Windows?
I figured it out looking at the code. The service MUST be called "Net-SNMP Agent". -- Aaron From: aaron.frie...@non.keysight.com Sent: Tuesday, October 30, 2018 10:25 AM To: net-snmp-users@lists.sourceforge.net Subject: Starting snmpd from WiX installer on Windows? All, Working on a project that includes Net-SNMP and want to add the components to an existing WiX-based MSI installer, with snmpd running as a service. Has anyone done this before, or can provide pointers on configuring snmpd as a service, and so that it starts during install? I prefer to get things running for any user in the Administrators group without running msiexec from an Administrator command prompt. I have the following but this fails to install, complaining about insufficient privileges, but I think that is a red herring, as other services are successfully installed and configured: Thank you in advance for any assistance. Best Regards, Aaron Friesen Contract Software Engineer of Aerotek on behalf of Keysight Keysight Technologies, Inc. 970.679.5632 T ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Starting snmpd from WiX installer on Windows?
All, Working on a project that includes Net-SNMP and want to add the components to an existing WiX-based MSI installer, with snmpd running as a service. Has anyone done this before, or can provide pointers on configuring snmpd as a service, and so that it starts during install? I prefer to get things running for any user in the Administrators group without running msiexec from an Administrator command prompt. I have the following but this fails to install, complaining about insufficient privileges, but I think that is a red herring, as other services are successfully installed and configured: Thank you in advance for any assistance. Best Regards, Aaron Friesen Contract Software Engineer of Aerotek on behalf of Keysight Keysight Technologies, Inc. 970.679.5632 T ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: SNMPD v5.8 Error opening specified endpoint
Could you please test this change? --- a/snmplib/transports/snmpUDPIPv4BaseDomain.c +++ b/snmplib/transports/snmpUDPIPv4BaseDomain.c @@ -312,7 +312,7 @@ netsnmp_udpipv4base_tspec_transport(netsnmp_tdomain_spec *tspec) if (NULL != tspec->source) { struct sockaddr_in src_addr, *srcp = &src_addr; /** get sockaddr from source */ -if (!netsnmp_sockaddr_in2(&src_addr, tspec->source, NULL)) +if (!netsnmp_sockaddr_in2(&src_addr, tspec->source, ":0")) return NULL; return netsnmp_udpipv4base_transport_with_source(&addr, local, srcp); } else { Thanks, Bill On Sun, Aug 26, 2018 at 8:37 PM Bill Fenner wrote: > On Sat, Aug 25, 2018 at 3:45 PM Martin Frlin > wrote: > >> If you specify trapsink line in form localhost: it does not bind a >> socket because it does not set a source in the piece of code I have linked. >> > > I was suggesting adding "-s 127.0.0.1:" to your > trapsink line, like > > trapsink -s 127.0.0.1:62134 localhost public > and > trapsink -s 127.0.0.1:0 localhost public > > Regarding why it binds to port 161 I don't understand your comment. I know >> that destination port will be 162 because that is where the snmptrapd >> listens (by default). >> > > The code that's being used to turn "localhost" into a transport spec > thinks it's being used for an SNMP listener, not a clientaddr, so it > defaults to port 161. This looks like it's a bug that was added in 5.8, > and partially worked around with the new "clientaddrUsesPort" configuration > that you found but as you found that's also buggy. > > >> If someone can explain the reasoning why is binding happening if trapsink >> is on localhost and not if it is on remote and why it always binds on port >> 161 thus creating a problem I could make a patch that resolves this issue. >> > > I don't quite know why this behavior is desirable. From the comment, I > *think* the intent to address the problem that a socket that is bound to a > port will receive packets destined to that port, so if you bind to > 0.0.0.0:62134 and someone sends you a packet to port 62134 that socket > will receive it. This isn't much of a problem since snmpd never reads from > this port. The intention is to bind to localhost:0, which will cause the > kernel to pick a port, but due to the bug I mentioned above it tries to use > localhost:161. > > Bill > > V V pet., 24. avg. 2018 ob 19:57 je oseba Bill Fenner >> napisala: >> >>> On Thu, Aug 23, 2018 at 9:24 AM Martin Frlin >>> wrote: >>> >>>> Ok, additional information. >>>> Compare this line in v5.8: >>>> https://sourceforge.net/p/net-snmp/code/ci/master/tree/agent/agent_trap.c#l358 >>>> with this line >>>> https://sourceforge.net/p/net-snmp/code/ci/v5.7.3/tree/agent/agent_trap.c#l251 >>>> >>>> You will see that v5.7 does not set a source. And because it does not >>>> set a source it does not bind. >>>> >>>> But maybe we want to bind? (Source says we want to reduce open ports >>>> but I don't understand this) >>>> >>>> Ok, but why bind on port 161? If understand correctly we want to SEND >>>> traps. So we should bind localhost: -> >>>> localhost:162 (address of our snmptrapd), but this does not happen. >>>> Instead we get (note that netsnmp prints to->from): >>>> netsnmp_udpbase: binding socket: 9 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 >>>> netsnmp_udpbase: socket 9 bound to UDP: [127.0.0.1]:162->[127.0.0.1]:161 >>>> >>>> So why is socket bound on port 161 instead of some random high level >>>> port? I didn't find where in code port 161 is set. >>>> >>> >>> It comes from the code that parses transport specifications. But it's >>> assuming that it's parsing a destination, not a source. Even if you told >>> that code that you were doing the lookup in the context of a trap, it would >>> use 162. >>> >>> So I think the solution is that either port is unbound or random high >>>> level port is chosen for binding. >>>> >>>> I've also tried to set >>>> clientaddr 127.0.0.1: >>>> clientaddrUsesPort yes >>>> because documentation says this will be used for clients but it also >>>> does not work. >>>> >>> >>> Can you try adding "-s 127.0.0.1:" to your >>> trapsink line instead? You ca
Re: SNMPD v5.8 Error opening specified endpoint
On Sat, Aug 25, 2018 at 3:45 PM Martin Frlin wrote: > If you specify trapsink line in form localhost: it does not bind a > socket because it does not set a source in the piece of code I have linked. > I was suggesting adding "-s 127.0.0.1:" to your trapsink line, like trapsink -s 127.0.0.1:62134 localhost public and trapsink -s 127.0.0.1:0 localhost public Regarding why it binds to port 161 I don't understand your comment. I know > that destination port will be 162 because that is where the snmptrapd > listens (by default). > The code that's being used to turn "localhost" into a transport spec thinks it's being used for an SNMP listener, not a clientaddr, so it defaults to port 161. This looks like it's a bug that was added in 5.8, and partially worked around with the new "clientaddrUsesPort" configuration that you found but as you found that's also buggy. > If someone can explain the reasoning why is binding happening if trapsink > is on localhost and not if it is on remote and why it always binds on port > 161 thus creating a problem I could make a patch that resolves this issue. > I don't quite know why this behavior is desirable. From the comment, I *think* the intent to address the problem that a socket that is bound to a port will receive packets destined to that port, so if you bind to 0.0.0.0:62134 and someone sends you a packet to port 62134 that socket will receive it. This isn't much of a problem since snmpd never reads from this port. The intention is to bind to localhost:0, which will cause the kernel to pick a port, but due to the bug I mentioned above it tries to use localhost:161. Bill V V pet., 24. avg. 2018 ob 19:57 je oseba Bill Fenner > napisala: > >> On Thu, Aug 23, 2018 at 9:24 AM Martin Frlin >> wrote: >> >>> Ok, additional information. >>> Compare this line in v5.8: >>> https://sourceforge.net/p/net-snmp/code/ci/master/tree/agent/agent_trap.c#l358 >>> with this line >>> https://sourceforge.net/p/net-snmp/code/ci/v5.7.3/tree/agent/agent_trap.c#l251 >>> >>> You will see that v5.7 does not set a source. And because it does not >>> set a source it does not bind. >>> >>> But maybe we want to bind? (Source says we want to reduce open ports but >>> I don't understand this) >>> >>> Ok, but why bind on port 161? If understand correctly we want to SEND >>> traps. So we should bind localhost: -> >>> localhost:162 (address of our snmptrapd), but this does not happen. >>> Instead we get (note that netsnmp prints to->from): >>> netsnmp_udpbase: binding socket: 9 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 >>> netsnmp_udpbase: socket 9 bound to UDP: [127.0.0.1]:162->[127.0.0.1]:161 >>> >>> So why is socket bound on port 161 instead of some random high level >>> port? I didn't find where in code port 161 is set. >>> >> >> It comes from the code that parses transport specifications. But it's >> assuming that it's parsing a destination, not a source. Even if you told >> that code that you were doing the lookup in the context of a trap, it would >> use 162. >> >> So I think the solution is that either port is unbound or random high >>> level port is chosen for binding. >>> >>> I've also tried to set >>> clientaddr 127.0.0.1: >>> clientaddrUsesPort yes >>> because documentation says this will be used for clients but it also >>> does not work. >>> >> >> Can you try adding "-s 127.0.0.1:" to your >> trapsink line instead? You can also try ":0". >> >> I found a few bugs in the clientaddr changes before 5.8 went out, but I >> don't use trapsink so didn't notice this one. There are a bunch of hacks >> in the clientaddr support that would clearly have been better to push into >> the transport parsing instead. >> >> Bill >> >> >>> V V čet., 23. avg. 2018 ob 11:47 je oseba Martin Frlin < >>> martin.fr...@gmail.com> napisala: >>> >>>> If you have line: >>>> trapsink localhost public >>>> in your config v5.8 fails to start. Meanwhile v5.3 starts with no >>>> problems. >>>> >>>> Am I missing something or is this a bug?. >>>> >>>> This output was generated using exactly the same config >>>> v5.8 >>>> # snmpd -Dnetsnmp_udpbase -Lo -f >>>> registered debug token netsnmp_udpbase, 1 >>>> Log handling defined - disabling stderr >>>> ne
Re: SNMPD v5.8 Error opening specified endpoint
If you specify trapsink line in form localhost: it does not bind a socket because it does not set a source in the piece of code I have linked. Regarding why it binds to port 161 I don't understand your comment. I know that destination port will be 162 because that is where the snmptrapd listens (by default). If someone can explain the reasoning why is binding happening if trapsink is on localhost and not if it is on remote and why it always binds on port 161 thus creating a problem I could make a patch that resolves this issue. V V pet., 24. avg. 2018 ob 19:57 je oseba Bill Fenner napisala: > On Thu, Aug 23, 2018 at 9:24 AM Martin Frlin > wrote: > >> Ok, additional information. >> Compare this line in v5.8: >> https://sourceforge.net/p/net-snmp/code/ci/master/tree/agent/agent_trap.c#l358 >> with this line >> https://sourceforge.net/p/net-snmp/code/ci/v5.7.3/tree/agent/agent_trap.c#l251 >> >> You will see that v5.7 does not set a source. And because it does not set >> a source it does not bind. >> >> But maybe we want to bind? (Source says we want to reduce open ports but >> I don't understand this) >> >> Ok, but why bind on port 161? If understand correctly we want to SEND >> traps. So we should bind localhost: -> >> localhost:162 (address of our snmptrapd), but this does not happen. >> Instead we get (note that netsnmp prints to->from): >> netsnmp_udpbase: binding socket: 9 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 >> netsnmp_udpbase: socket 9 bound to UDP: [127.0.0.1]:162->[127.0.0.1]:161 >> >> So why is socket bound on port 161 instead of some random high level >> port? I didn't find where in code port 161 is set. >> > > It comes from the code that parses transport specifications. But it's > assuming that it's parsing a destination, not a source. Even if you told > that code that you were doing the lookup in the context of a trap, it would > use 162. > > So I think the solution is that either port is unbound or random high >> level port is chosen for binding. >> >> I've also tried to set >> clientaddr 127.0.0.1: >> clientaddrUsesPort yes >> because documentation says this will be used for clients but it also does >> not work. >> > > Can you try adding "-s 127.0.0.1:" to your trapsink > line instead? You can also try ":0". > > I found a few bugs in the clientaddr changes before 5.8 went out, but I > don't use trapsink so didn't notice this one. There are a bunch of hacks > in the clientaddr support that would clearly have been better to push into > the transport parsing instead. > > Bill > > >> V V čet., 23. avg. 2018 ob 11:47 je oseba Martin Frlin < >> martin.fr...@gmail.com> napisala: >> >>> If you have line: >>> trapsink localhost public >>> in your config v5.8 fails to start. Meanwhile v5.3 starts with no >>> problems. >>> >>> Am I missing something or is this a bug?. >>> >>> This output was generated using exactly the same config >>> v5.8 >>> # snmpd -Dnetsnmp_udpbase -Lo -f >>> registered debug token netsnmp_udpbase, 1 >>> Log handling defined - disabling stderr >>> netsnmp_udpbase: open remote UDP: [127.0.0.1]:162->[0.0.0.0]:0 >>> netsnmp_udpbase: binding socket: 9 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 >>> netsnmp_udpbase: socket 9 bound to UDP: [127.0.0.1]:162->[127.0.0.1]:161 >>> Turning on AgentX master support. >>> netsnmp_udpbase: open local UDP: [127.0.0.1]:161->[0.0.0.0]:0 >>> netsnmp_udpbase: set IP_PKTINFO >>> netsnmp_udpbase: binding socket: 8 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 >>> netsnmp_udpbase: failed to bind for clientaddr: 98 Address already in use >>> Error opening specified endpoint "udp:127.0.0.1:161" >>> Server Exiting with code 1 >>> >>> >>> v5.3 >>> # snmpd -Dnetsnmp_udpbase -Lo -f >>> registered debug token netsnmp_udpbase, 1 >>> Log handling defined - disabling stderr >>> netsnmp_udpbase: open remote UDP: [127.0.0.1]:162->[0.0.0.0]:0 >>> netsnmp_udpbase: client open UDP: [127.0.0.1]:162->[0.0.0.0]:0 >>> Turning on AgentX master support. >>> netsnmp_udpbase: open local UDP: [127.0.0.1]:161->[0.0.0.0]:0 >>> netsnmp_udpbase: set IP_PKTINFO >>> >> >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> Net-snmp-users mailing list >> Net-snmp-users@lists.sourceforge.net >> Please see the following page to unsubscribe or change other options: >> https://lists.sourceforge.net/lists/listinfo/net-snmp-users >> > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: SNMPD v5.8 Error opening specified endpoint
On Thu, Aug 23, 2018 at 9:24 AM Martin Frlin wrote: > Ok, additional information. > Compare this line in v5.8: > https://sourceforge.net/p/net-snmp/code/ci/master/tree/agent/agent_trap.c#l358 > with this line > https://sourceforge.net/p/net-snmp/code/ci/v5.7.3/tree/agent/agent_trap.c#l251 > > You will see that v5.7 does not set a source. And because it does not set > a source it does not bind. > > But maybe we want to bind? (Source says we want to reduce open ports but I > don't understand this) > > Ok, but why bind on port 161? If understand correctly we want to SEND > traps. So we should bind localhost: -> > localhost:162 (address of our snmptrapd), but this does not happen. > Instead we get (note that netsnmp prints to->from): > netsnmp_udpbase: binding socket: 9 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 > netsnmp_udpbase: socket 9 bound to UDP: [127.0.0.1]:162->[127.0.0.1]:161 > > So why is socket bound on port 161 instead of some random high level port? > I didn't find where in code port 161 is set. > It comes from the code that parses transport specifications. But it's assuming that it's parsing a destination, not a source. Even if you told that code that you were doing the lookup in the context of a trap, it would use 162. So I think the solution is that either port is unbound or random high level > port is chosen for binding. > > I've also tried to set > clientaddr 127.0.0.1: > clientaddrUsesPort yes > because documentation says this will be used for clients but it also does > not work. > Can you try adding "-s 127.0.0.1:" to your trapsink line instead? You can also try ":0". I found a few bugs in the clientaddr changes before 5.8 went out, but I don't use trapsink so didn't notice this one. There are a bunch of hacks in the clientaddr support that would clearly have been better to push into the transport parsing instead. Bill > V V čet., 23. avg. 2018 ob 11:47 je oseba Martin Frlin < > martin.fr...@gmail.com> napisala: > >> If you have line: >> trapsink localhost public >> in your config v5.8 fails to start. Meanwhile v5.3 starts with no >> problems. >> >> Am I missing something or is this a bug?. >> >> This output was generated using exactly the same config >> v5.8 >> # snmpd -Dnetsnmp_udpbase -Lo -f >> registered debug token netsnmp_udpbase, 1 >> Log handling defined - disabling stderr >> netsnmp_udpbase: open remote UDP: [127.0.0.1]:162->[0.0.0.0]:0 >> netsnmp_udpbase: binding socket: 9 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 >> netsnmp_udpbase: socket 9 bound to UDP: [127.0.0.1]:162->[127.0.0.1]:161 >> Turning on AgentX master support. >> netsnmp_udpbase: open local UDP: [127.0.0.1]:161->[0.0.0.0]:0 >> netsnmp_udpbase: set IP_PKTINFO >> netsnmp_udpbase: binding socket: 8 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 >> netsnmp_udpbase: failed to bind for clientaddr: 98 Address already in use >> Error opening specified endpoint "udp:127.0.0.1:161" >> Server Exiting with code 1 >> >> >> v5.3 >> # snmpd -Dnetsnmp_udpbase -Lo -f >> registered debug token netsnmp_udpbase, 1 >> Log handling defined - disabling stderr >> netsnmp_udpbase: open remote UDP: [127.0.0.1]:162->[0.0.0.0]:0 >> netsnmp_udpbase: client open UDP: [127.0.0.1]:162->[0.0.0.0]:0 >> Turning on AgentX master support. >> netsnmp_udpbase: open local UDP: [127.0.0.1]:161->[0.0.0.0]:0 >> netsnmp_udpbase: set IP_PKTINFO >> > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: SNMPD v5.8 Error opening specified endpoint
Ok, additional information. Compare this line in v5.8: https://sourceforge.net/p/net-snmp/code/ci/master/tree/agent/agent_trap.c#l358 with this line https://sourceforge.net/p/net-snmp/code/ci/v5.7.3/tree/agent/agent_trap.c#l251 You will see that v5.7 does not set a source. And because it does not set a source it does not bind. But maybe we want to bind? (Source says we want to reduce open ports but I don't understand this) Ok, but why bind on port 161? If understand correctly we want to SEND traps. So we should bind localhost: -> localhost:162 (address of our snmptrapd), but this does not happen. Instead we get (note that netsnmp prints to->from): netsnmp_udpbase: binding socket: 9 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 netsnmp_udpbase: socket 9 bound to UDP: [127.0.0.1]:162->[127.0.0.1]:161 So why is socket bound on port 161 instead of some random high level port? I didn't find where in code port 161 is set. So I think the solution is that either port is unbound or random high level port is chosen for binding. I've also tried to set clientaddr 127.0.0.1: clientaddrUsesPort yes because documentation says this will be used for clients but it also does not work. V V čet., 23. avg. 2018 ob 11:47 je oseba Martin Frlin < martin.fr...@gmail.com> napisala: > If you have line: > trapsink localhost public > in your config v5.8 fails to start. Meanwhile v5.3 starts with no problems. > > Am I missing something or is this a bug?. > > This output was generated using exactly the same config > v5.8 > # snmpd -Dnetsnmp_udpbase -Lo -f > registered debug token netsnmp_udpbase, 1 > Log handling defined - disabling stderr > netsnmp_udpbase: open remote UDP: [127.0.0.1]:162->[0.0.0.0]:0 > netsnmp_udpbase: binding socket: 9 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 > netsnmp_udpbase: socket 9 bound to UDP: [127.0.0.1]:162->[127.0.0.1]:161 > Turning on AgentX master support. > netsnmp_udpbase: open local UDP: [127.0.0.1]:161->[0.0.0.0]:0 > netsnmp_udpbase: set IP_PKTINFO > netsnmp_udpbase: binding socket: 8 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 > netsnmp_udpbase: failed to bind for clientaddr: 98 Address already in use > Error opening specified endpoint "udp:127.0.0.1:161" > Server Exiting with code 1 > > > v5.3 > # snmpd -Dnetsnmp_udpbase -Lo -f > registered debug token netsnmp_udpbase, 1 > Log handling defined - disabling stderr > netsnmp_udpbase: open remote UDP: [127.0.0.1]:162->[0.0.0.0]:0 > netsnmp_udpbase: client open UDP: [127.0.0.1]:162->[0.0.0.0]:0 > Turning on AgentX master support. > netsnmp_udpbase: open local UDP: [127.0.0.1]:161->[0.0.0.0]:0 > netsnmp_udpbase: set IP_PKTINFO > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
SNMPD v5.8 Error opening specified endpoint
If you have line: trapsink localhost public in your config v5.8 fails to start. Meanwhile v5.3 starts with no problems. Am I missing something or is this a bug?. This output was generated using exactly the same config v5.8 # snmpd -Dnetsnmp_udpbase -Lo -f registered debug token netsnmp_udpbase, 1 Log handling defined - disabling stderr netsnmp_udpbase: open remote UDP: [127.0.0.1]:162->[0.0.0.0]:0 netsnmp_udpbase: binding socket: 9 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 netsnmp_udpbase: socket 9 bound to UDP: [127.0.0.1]:162->[127.0.0.1]:161 Turning on AgentX master support. netsnmp_udpbase: open local UDP: [127.0.0.1]:161->[0.0.0.0]:0 netsnmp_udpbase: set IP_PKTINFO netsnmp_udpbase: binding socket: 8 to UDP: [0.0.0.0]:0->[127.0.0.1]:161 netsnmp_udpbase: failed to bind for clientaddr: 98 Address already in use Error opening specified endpoint "udp:127.0.0.1:161" Server Exiting with code 1 v5.3 # snmpd -Dnetsnmp_udpbase -Lo -f registered debug token netsnmp_udpbase, 1 Log handling defined - disabling stderr netsnmp_udpbase: open remote UDP: [127.0.0.1]:162->[0.0.0.0]:0 netsnmp_udpbase: client open UDP: [127.0.0.1]:162->[0.0.0.0]:0 Turning on AgentX master support. netsnmp_udpbase: open local UDP: [127.0.0.1]:161->[0.0.0.0]:0 netsnmp_udpbase: set IP_PKTINFO -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd crashes when starting on uClinux
Hello, When compiling net-snmp [with shared libraries] on linux with target for uClinux, snmpd builds without error. When running snmpd on uClinux, why would snmpd execution crash before executing the 1st statement? thanks John Emrich -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: snmpd 5.7.1 has no response for IF-MIB::ifLinkUpDownTrapEnable
Similar issue in v5.7.3. The one-line patch *was* useful, although I had to disable the ifXTable persistent data storage (by commenting out the ifXTable entries in /var/net-snmp/snmpd.conf [the one that says DO NOT EDIT all over]) to allow the init values to be maintained, rather than overwritten by the (invalid) persistent values. With thanks, Alan >>On 06/11/2012 11:22 AM, David Dombrowsky wrote: >> Is this related to this bug? >> >> http://sourceforge.net/tracker/index.php?func=detail&aid=1479378&group_id=12694&atid=112694 >> >> It's 6 years old, but it looks to still be a problem. It has no >> comments on it. >> >> Anyone have any ideas? >> > >We were able to work around the problem with this patch: > >-- >--- a/agent/mibgroup/if-mib/ifTable/ifTable.c >+++ b/agent/mibgroup/if-mib/ifTable/ifTable.c >@@ -200,6 +200,7 @@ ifTable_rowreq_ctx_init(ifTable_rowreq_ctx * >rowreq_ctx, > /* > * TODO:210:o: |-> Perform extra ifTable rowreq initialization. >(eg DEFVALS) > */ >+rowreq_ctx->data.ifLinkUpDownTrapEnable = >IFLINKUPDOWNTRAPENABLE_DISABLED; > if (NULL == user_init_ctx) > rowreq_ctx->data.ifentry = > netsnmp_access_interface_entry_create(NULL, 0); >-- > >It's probably not correct, but it works for now. Hopefully it is >useful to others. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd hangup a startup
Hello, I wrote an snmp agent in perl, my $agent = new NetSNMP::agent('Name' => 'myAgent'); $agent->register('myAgent version', OID, \&Handle); On first server, it work well. Just installed net-snmp-perl and copied my agent under /usr/share/snmp/snmp_perl.pl file. No need to add perl do "/usr/share/snmp/snmp_perl.pl" in smpd.conf On second server tried the same but no luck... I then added : perl do "/usr/share/snmp/snmp_perl.pl" in smpd.conf Agent start but work 1 time ... I added $agent->main_loop(); in perl code and agent work again !! But snmpd daeomon startup didn't give me back the hand...stay stucked... Do you have an idea ?? Reagrds, Benoit _ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: UPDATE: Starting snmpd deliver 128 duplicate notifications to each trap2sink destinations
On Mon, Jan 1, 2018 at 11:33 PM, Jose Roberto Fernandez Anahia < jrfn...@gmail.com> wrote: > Hello Bill, > Thank you for your post. > > Well, I tried some configurations in my snmpd.conf, disabling ipv6, listen > in only one interface, etc. > but never tried trapsess, i.e. I already used trap2sink as ou can see in > debug dump I posted. > > Do you have tried to use snmptrap to see how much duplicates your get in > your network? > I also see zero extra packets with snmptrap, using either net-snmp 5.7.3 or 5.8. An interesting fact is that if I enable IPV6 I get 128 duplicates without > IPV6 I get 64… > Because of this I said that something is really wrong with the NET-SNMP > network code and how > its interpreting the network characteristics where is running. > My example had IPv6 enabled for both TCP and UDP, and I got zero duplicates. > Also with IPV6 enabled I waas unable to use agentaddress clause, with the > 5.7.3 just a message saing that the end point couldnt > be used, with 5.8.dev. the message says that the end point couldn’t be > used because the address (anyone) is in use, what is > not true. > Sounds like there might be something wrong with your network environment. Bill -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: UPDATE: Starting snmpd deliver 128 duplicate notifications to each trap2sink destinations
Using the same configuration suggested by Bill in the /etc/snmpd.conf, i.e.: agentaddress udp:161,tcp:161 trapsess -v 2c -c sekrit udp:172.25.24.236:162 ….I still having 64 duplicates on management station of this trap: .iso.org.dod.internet.mgmt.mib-2.system.sysUpTime.0: TimeTicks: 0 hours, 0 minutes, 0 seconds.: .iso.org.dod.internet.snmpV2.snmpModules.1.1.4.1.0: Object ID: .1.3.6.1.6.3.1.1.5.1: .iso.org.dod.internet.snmpV2.snmpModules.1.1.4.3.0: Object ID: .1.3.6.1.4.1.8072.3.2.10: He is the debug output when I run snmpd: registered debug token mib_init, 1 registered debug token tdomain, 1 registered debug token stat, 1 registered debug token sess_process_packet, 1 registered debug token transport:send, 1 registered debug token netsnmp_udpbase, 1 registered debug token agentx/subagent, 1 registered debug token udpbase:sendto, 1 tdomain: netsnmp_tdomain_init() called tdomain: domain_list -> { iso.3.6.1.6.1.1, "udp" } -> { iso.3.6.1.2.1.100.1.5, "tcp" } -> { iso.3.6.1.4.1.8072.3.3.7, "alias" } -> { iso.3.6.1.2.1.100.1.13, "unix" } -> [NIL] mib_init: initializing: vacm_conf mib_init: initializing: usmConf mib_init: initializing: nsTransactionTable mib_init: initializing: nsModuleTable mib_init: initializing: nsDebug mib_init: initializing: nsCache mib_init: initializing: nsLogging mib_init: initializing: nsVacmAccessTable mib_init: initializing: snmp_mib mib_init: initializing: system_mib mib_init: initializing: sysORTable mib_init: initializing: vacm_vars mib_init: initializing: snmpEngine mib_init: initializing: snmpMPDStats mib_init: initializing: usmStats mib_init: initializing: usmUser mib_init: initializing: vacm_context tdomain: tdomain_transport_spec("snmptrap", "udp:192.168.0.205:162", 0, "[NIL]", "[NIL]", "[NIL]") tdomain: Found domain "udp" from specifier "udp" tdomain: trying domain "udp" address "192.168.0.205:162" default address ":162" netsnmp_udpbase: open remote UDP: [192.168.0.205]:162->[0.0.0.0]:0 Turning on AgentX master support. Can't identify user (root). Can't identify group (root). tdomain: tdomain_transport_spec("snmp", "udp:161", 1, "[NIL]", "[NIL]", "[NIL]") tdomain: Found domain "udp" from specifier "udp" tdomain: trying domain "udp" address "161" default address ":161" netsnmp_udpbase: open local UDP: [0.0.0.0]:161->[0.0.0.0]:0 netsnmp_udpbase: set IP_PKTINFO netsnmp_udpbase: binding socket: 5 to UDP: [0.0.0.0]:0->[0.0.0.0]:161 tdomain: tdomain_transport_spec("snmp", "tcp:161", 1, "[NIL]", "[NIL]", "[NIL]") tdomain: Found domain "tcp" from specifier "tcp" tdomain: trying domain "tcp" address "161" default address ":161" tdomain: tdomain_transport_spec("agentx", "/var/agentx/master", 1, "[NIL]", "[NIL]", "[NIL]") tdomain: Address starts with '/', so assume "unix" domain tdomain: Found domain "unix" from specifier "unix" tdomain: trying domain "unix" address "/var/agentx/master" default address "/var/agentx/master" stats:pdu: max: 0, threshold 100 ms sess_process_packet: sending message id#1980124534 reqid#279064365 len 95 transport:send: 95 bytes to UDP: [192.168.0.205]:162->[0.0.0.0]:0 Sending 95 bytes to UDP: [192.168.0.205]:162->[0.0.0.0]:0 : 30 5D 02 01 01 04 06 73 65 63 72 65 74 A7 50 020].secret.P. 0016: 04 10 A2 2F 2D 02 01 00 02 01 00 30 42 30 0D 06.../-..0B0.. 0032: 08 2B 06 01 02 01 01 03 00 43 01 08 30 17 06 0A.+...C..0... 0048: 2B 06 01 06 03 01 01 04 01 00 06 09 2B 06 01 06+...+... 0064: 03 01 01 05 01 30 18 06 0A 2B 06 01 06 03 01 01.0...+.. 0080: 04 03 00 06 0A 2B 06 01 04 01 BF 08 03 02 0A .+. stats:notif: (null) inform stats stats:notif: 1 sends, last @ 8 stats:notif: 0 acks, last @ 0 stats:notif: 0 failed sends, last @ 0 stats:notif: 0 timeouts, last @ 0 stats:notif: 0 v3 errs, last @ 0 NET-SNMP version 5.8.dev jrfndes@...> wrote: > Something really .. really wrong with the network code on NET-SNMP. > You don't say much about *exactly* what's in your snmpd.conf, but I tried this: agentaddress udp:161,tcp:161,udp6:161,tcp6:161 trapsess -v 2c -c sekrit udp:172.25.24.236:162 and I got exactly one packet: 12:26:15.577079 44:4c:a8:64:2b:df > be:7e:8c:45:ca:7e, ethertype IPv4 (0x0800), length 138: (tos 0x0, ttl 59, id 43952, offset 0, flags [DF], proto UDP (17), length 124) 172.30.188.156.57296 > 172.25.24.236.snmptrap: { SNMPv2c C="sekrit" { V2Trap(81) R=456329610 .1.3.6.1.2.1.1.3.0=1869016 .1.3.6.1.6.
Re: UPDATE: Starting snmpd deliver 128 duplicate notifications to each trap2sink destinations
Hello Bill, Thank you for your post. Well, I tried some configurations in my snmpd.conf, disabling ipv6, listen in only one interface, etc. but never tried trapsess, i.e. I already used trap2sink as ou can see in debug dump I posted. Do you have tried to use snmptrap to see how much duplicates your get in your network? An interesting fact is that if I enable IPV6 I get 128 duplicates without IPV6 I get 64… Because of this I said that something is really wrong with the NET-SNMP network code and how its interpreting the network characteristics where is running. Also with IPV6 enabled I waas unable to use agentaddress clause, with the 5.7.3 just a message saing that the end point couldnt be used, with 5.8.dev. the message says that the end point couldn’t be used because the address (anyone) is in use, what is not true. I also disabled IPV6 in my host where snmpd is running … no difference. 5.7.3 and 5.8 here behaves exactly same duplicating packets. And no others directives, my snmpd.conf is really simple. Here is my snmpd.conf: trap2sink 192.168.0.100 xyz trap2sink 192.168.0.205 xyz com2sec readonly default abc com2sec readwrite default def rocommunity abc rwcommunity def master agentx agentaddressudp:192.168.0.221:161 agentXSocket/var/agentx/master agentxperms 0660 0550 root root agentxRetries 1 agentxTimeout 3 dontLogTCPWrappersConnects yes agentuser root agentgroup root On Thu, Dec 28, 2017 at 2:02 PM, Jose Roberto Fernandez Anahia < jrfndes@...> wrote: > Something really .. really wrong with the network code on NET-SNMP. > You don't say much about *exactly* what's in your snmpd.conf, but I tried this: agentaddress udp:161,tcp:161,udp6:161,tcp6:161 trapsess -v 2c -c sekrit udp:172.25.24.236:162 and I got exactly one packet: 12:26:15.577079 44:4c:a8:64:2b:df > be:7e:8c:45:ca:7e, ethertype IPv4 (0x0800), length 138: (tos 0x0, ttl 59, id 43952, offset 0, flags [DF], proto UDP (17), length 124) 172.30.188.156.57296 > 172.25.24.236.snmptrap: { SNMPv2c C="sekrit" { V2Trap(81) R=456329610 .1.3.6.1.2.1.1.3.0=1869016 .1.3.6.1.6.3.1.1.4.1.0=.1.3.6.1.4.1.8072.4.0.3 .1.3.6.1.6.3.1.1.4.3.0=.1.3.6.1.4.1.8072.4 } } This is using net-snmp 5.8. Bill -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: UPDATE: Starting snmpd deliver 128 duplicate notifications to each trap2sink destinations
On Thu, Dec 28, 2017 at 2:02 PM, Jose Roberto Fernandez Anahia < jrfn...@gmail.com> wrote: > Something really .. really wrong with the network code on NET-SNMP. > You don't say much about *exactly* what's in your snmpd.conf, but I tried this: agentaddress udp:161,tcp:161,udp6:161,tcp6:161 trapsess -v 2c -c sekrit udp:172.25.24.236:162 and I got exactly one packet: 12:26:15.577079 44:4c:a8:64:2b:df > be:7e:8c:45:ca:7e, ethertype IPv4 (0x0800), length 138: (tos 0x0, ttl 59, id 43952, offset 0, flags [DF], proto UDP (17), length 124) 172.30.188.156.57296 > 172.25.24.236.snmptrap: { SNMPv2c C="sekrit" { V2Trap(81) R=456329610 .1.3.6.1.2.1.1.3.0=1869016 .1.3.6.1.6.3.1.1.4.1.0=.1.3.6.1.4.1.8072.4.0.3 .1.3.6.1.6.3.1.1.4.3.0=.1.3.6.1.4.1.8072.4 } } This is using net-snmp 5.8. Bill -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
UPDATE: Starting snmpd deliver 128 duplicate notifications to each trap2sink destinations
Something really .. really wrong with the network code on NET-SNMP. Compiling 5.7.3 version or even 5.8.dev version. If I remove "agentaddress udp:192.168.0.XXX:161” from the snmpd.conf I got with 128 duplicates notifications for each trap2sink. Although that with the configuration below its impossible to use this parameter in the snmpd.conf no matter what address or port you choose. ./configure \ --build=i686-linux-gnu \ --prefix=/usr \ --sysconfdir=/etc \ --datadir=/usr/share \ --with-sys-contact="MY_EMAIL_ADDRESS" \ --with-sys-location="MY_LOCATION" \ --enable-mini-agent \ --disable-as-needed \ --disable-ipv6 \ --with-root-access \ --with-agentx-socket=/var/agentx/master \ --with-persistent-directory=/var/lib/snmp \ --with-logfile=none \ --with-default-snmp-version=2 \ --with-mib-modules="agentx agentx/subagent agent_mibs" \ --with-mibs="MY_COMPANY_MIB" \ --with-mibdirs=/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp Begin forwarded message: From: Jose Roberto Fernandez Anahia Subject: Starting snmpd deliver 128 duplicate notifications to each trap2sink destinations Date: December 28, 2017 at 03:23:55 GMT-2 To: net-snmp-users@lists.sourceforge.net Regards to my last post about duplicates and the previous one two days ago, I would like to add the following information. I migrated from 5.7.3 to 5.8.dev the problem now is that every notification sent to each trap2sink directives sent from my Ubuntu 41.04 VM result in 64 duplicated notifications on management station (Windows 7) no matter where the notifications is send inside my agentx subagent. This problem occurs also if I send a notification from snmptrap. The traps logged below refers to the trap that the agent send when start and shutdown (automatically) and do not regards to my subagent code. I explicitly disable udp6 and tcp6 (IPv6) in compilation of the 5.8.dev and used in the snmpd.conf: agentaddress udp:192.168.0.221:161 :~# /mnt/hgfs/Projects/net-snmp-5.8.dev/code/agent/snmpd -f -L -d -c /etc/snmp/snmpd.conf -Dmib_init,tdomain,stat,sess_process_packet,transport:send,netsnmp_udpbase,agentx,subagent registered debug token mib_init, 1 registered debug token tdomain, 1 registered debug token stat, 1 registered debug token sess_process_packet, 1 registered debug token transport:send, 1 registered debug token netsnmp_udpbase, 1 registered debug token agentx, 1 registered debug token subagent, 1 tdomain: netsnmp_tdomain_init() called tdomain: domain_list -> { iso.3.6.1.6.1.1, "udp" } -> { iso.3.6.1.2.1.100.1.5, "tcp" } -> { iso.3.6.1.4.1.8072.3.3.7, "alias" } -> { iso.3.6.1.2.1.100.1.13, "unix" } -> [NIL] agentx_register_app_config_handler: registering .conf token for "agentxsocket" agentx_register_app_config_handler: registering .conf token for "agentxperms" agentx_register_app_config_handler: registering .conf token for "agentxRetries" agentx_register_app_config_handler: registering .conf token for "agentxTimeout" mib_init: initializing: vacm_conf mib_init: initializing: usmConf mib_init: initializing: nsTransactionTable mib_init: initializing: nsModuleTable mib_init: initializing: nsDebug mib_init: initializing: nsCache mib_init: initializing: nsLogging mib_init: initializing: nsVacmAccessTable mib_init: initializing: snmp_mib mib_init: initializing: system_mib mib_init: initializing: sysORTable mib_init: initializing: vacm_vars mib_init: initializing: snmpNotifyTable mib_init: initializing: snmpNotifyFilterProfileTable mib_init: initializing: snmpEngine mib_init: initializing: snmpMPDStats mib_init: initializing: usmStats mib_init: initializing: usmUser mib_init: initializing: vacm_context mib_init: initializing: snmpNotifyTable_data mib_init: initializing: snmpNotifyFilterTable_data_storage mib_init: initializing: snmpNotifyFilterTable mib_init: initializing: snmpNotifyFilterTable mib_init: initializing: snmpNotifyFilterProfileTable_data mib_init: initializing: snmpTargetAddrEntry mib_init: initializing: snmpTargetParamsEntry mib_init: initializing: target_counters mib_init: initializing: snmpTargetAddrEntry_data mib_init: initializing: snmpTargetParamsEntry_data tdomain: tdomain_transport_spec("snmptrap", "192.168.0.100", 0, "[NIL]", "[NIL]", "[NIL]") tdomain: checking for host specific config hosts/192.168.0.100 tdomain: Use application default domains "udp" "udp6" tdomain: Found domain "udp" from specifier "udp" tdomain: trying domain "udp" address "192.168.0.100" default address ":162" netsnmp_udpbase: open remote UDP: [192.168.0.100]:162->[0.0.0.0]:0 tdomain: tdomain_transport_spec("snmptrap", "192.168.0
Starting snmpd deliver 128 duplicate notifications to each trap2sink destinations
Regards to my last post about duplicates and the previous one two days ago, I would like to add the following information. I migrated from 5.7.3 to 5.8.dev the problem now is that every notification sent to each trap2sink directives sent from my Ubuntu 41.04 VM result in 64 duplicated notifications on management station (Windows 7) no matter where the notifications is send inside my agentx subagent. This problem occurs also if I send a notification from snmptrap. The traps logged below refers to the trap that the agent send when start and shutdown (automatically) and do not regards to my subagent code. I explicitly disable udp6 and tcp6 (IPv6) in compilation of the 5.8.dev and used in the snmpd.conf: agentaddress udp:192.168.0.221:161 :~# /mnt/hgfs/Projects/net-snmp-5.8.dev/code/agent/snmpd -f -L -d -c /etc/snmp/snmpd.conf -Dmib_init,tdomain,stat,sess_process_packet,transport:send,netsnmp_udpbase,agentx,subagent registered debug token mib_init, 1 registered debug token tdomain, 1 registered debug token stat, 1 registered debug token sess_process_packet, 1 registered debug token transport:send, 1 registered debug token netsnmp_udpbase, 1 registered debug token agentx, 1 registered debug token subagent, 1 tdomain: netsnmp_tdomain_init() called tdomain: domain_list -> { iso.3.6.1.6.1.1, "udp" } -> { iso.3.6.1.2.1.100.1.5, "tcp" } -> { iso.3.6.1.4.1.8072.3.3.7, "alias" } -> { iso.3.6.1.2.1.100.1.13, "unix" } -> [NIL] agentx_register_app_config_handler: registering .conf token for "agentxsocket" agentx_register_app_config_handler: registering .conf token for "agentxperms" agentx_register_app_config_handler: registering .conf token for "agentxRetries" agentx_register_app_config_handler: registering .conf token for "agentxTimeout" mib_init: initializing: vacm_conf mib_init: initializing: usmConf mib_init: initializing: nsTransactionTable mib_init: initializing: nsModuleTable mib_init: initializing: nsDebug mib_init: initializing: nsCache mib_init: initializing: nsLogging mib_init: initializing: nsVacmAccessTable mib_init: initializing: snmp_mib mib_init: initializing: system_mib mib_init: initializing: sysORTable mib_init: initializing: vacm_vars mib_init: initializing: snmpNotifyTable mib_init: initializing: snmpNotifyFilterProfileTable mib_init: initializing: snmpEngine mib_init: initializing: snmpMPDStats mib_init: initializing: usmStats mib_init: initializing: usmUser mib_init: initializing: vacm_context mib_init: initializing: snmpNotifyTable_data mib_init: initializing: snmpNotifyFilterTable_data_storage mib_init: initializing: snmpNotifyFilterTable mib_init: initializing: snmpNotifyFilterTable mib_init: initializing: snmpNotifyFilterProfileTable_data mib_init: initializing: snmpTargetAddrEntry mib_init: initializing: snmpTargetParamsEntry mib_init: initializing: target_counters mib_init: initializing: snmpTargetAddrEntry_data mib_init: initializing: snmpTargetParamsEntry_data tdomain: tdomain_transport_spec("snmptrap", "192.168.0.100", 0, "[NIL]", "[NIL]", "[NIL]") tdomain: checking for host specific config hosts/192.168.0.100 tdomain: Use application default domains "udp" "udp6" tdomain: Found domain "udp" from specifier "udp" tdomain: trying domain "udp" address "192.168.0.100" default address ":162" netsnmp_udpbase: open remote UDP: [192.168.0.100]:162->[0.0.0.0]:0 tdomain: tdomain_transport_spec("snmptrap", "192.168.0.205", 0, "[NIL]", "[NIL]", "[NIL]") tdomain: checking for host specific config hosts/192.168.0.205 tdomain: Use application default domains "udp" "udp6" tdomain: Found domain "udp" from specifier "udp" tdomain: trying domain "udp" address "192.168.0.205" default address ":162" netsnmp_udpbase: open remote UDP: [192.168.0.205]:162->[0.0.0.0]:0 Turning on AgentX master support. agentx/config: port spec: /var/agentx/master agentx/config: port permissions: 0660 0550 root root agentx/config: socket permissions: 660 (432) agentx/config: directory permissions: 550 (360) Can't identify user (root). agentx/config: socket owner: root (0) Can't identify group (root). agentx/config: socket group: root (0) agentx/config/retries: 0 agentx/config/timeout: 3 tdomain: tdomain_transport_spec("snmp", "udp:192.168.0.221:161", 1, "[NIL]", "[NIL]", "[NIL]") tdomain: Found domain "udp" from specifier "udp" tdomain: trying domain "udp" address "192.168.0.221:161" default address ":161" netsnmp_udpbase: open local UDP: [192.168.0.221]:161->[0.0.0.0]:0 netsnmp_udpba
Starting snmpd deliver 128 duplicate notifications to each trap2sink destinations
Hello Fellows Any help will be very appreciated, since I’m in a serious trouble with duplicate notifications. Having configured in the snmpd.conf two trap2sink directives … Why when I start snmpd it sends 128 duplicated notifications to each trap2sink configured destinations? .iso.org.dod.internet.mgmt.mib-2.system.sysUpTime.0: TimeTicks: 0 hours, 0 minutes, 0 seconds.: .iso.org.dod.internet.snmpV2.snmpModules.1.1.4.1.0: Object ID: .1.3.6.1.6.3.1.1.5.1: .iso.org.dod.internet.snmpV2.snmpModules.1.1.4.3.0: Object ID: .1.3.6.1.4.1.8072.3.2.10: Also, when I stop the process another 128 notifications are sent. .iso.org.dod.internet.mgmt.mib-2.system.sysUpTime.0: TimeTicks: 1 hours, 24 minutes, 48 seconds.: .iso.org.dod.internet.snmpV2.snmpModules.1.1.4.1.0: Object ID: .1.3.6.1.4.1.8072.4.0.2: .iso.org.dod.internet.snmpV2.snmpModules.1.1.4.3.0: Object ID: .1.3.6.1.4.1.8072.4: -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: net-snmpd proxy problem
On Fri, 8 Sep 2017 08:49:02 +0200 Bernd wrote: BE> I have a problem with proxy configuration on net-snmpd. I have BE> a software running an snmp agent on some port internally and BE> have the system net-snmpd configured to proxy to that agent. BE> Now when the software is running everything works well but when BE> it is not running just every snmpwalk just on any OID not only BE> the proxied one on the system snmpd fails. I there anything i BE> can do in the configuration to avoid this? BE> BE> I configured the proxy like this: BE> proxy -v 3 -u MYUSER -a SHA -A "mypass" -x DES -X "mypass" -l BE> authPriv BE> localhost:43454 .1.3.6.1.4.1.52393.2.2.1.5.1.12 .1.3.6.1.4.1.52393.2.2.1 BE> BE> Or is this maybe a bug in net-smpd? BE> BE> I am using CentOS7 and the latest net-snmpd which comes with BE> that OS. I've created a bug report for this: https://sourceforge.net/p/net-snmp/bugs/2809/ I will try and get this fixed for the upcoming 5.7.4 and 5.8 releases. Robert -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
net-snmpd proxy problem
Hi there! I have a problem with proxy configuration on net-snmpd. I have a software running an snmp agent on some port internally and have the system net-snmpd configured to proxy to that agent. Now when the software is running everything works well but when it is not running just every snmpwalk just on any OID not only the proxied one on the system snmpd fails. I there anything i can do in the configuration to avoid this? I configured the proxy like this: proxy -v 3 -u MYUSER -a SHA -A "mypass" -x DES -X "mypass" -l authPriv localhost:43454 .1.3.6.1.4.1.52393.2.2.1.5.1.12 .1.3.6.1.4.1.52393.2.2.1 Or is this maybe a bug in net-smpd? I am using CentOS7 and the latest net-snmpd which comes with that OS. Kind regards, Bernd Eilers -- Signature Mit freundlichen Grüßen | with kind regards i.A. Bernd Eilers Fr. Meyer's Sohn (GmbH & Co.) KG Grüner Deich 19 20097 Hamburg | Germany Tel.: +49 40 2393 1468 Fax: +49 40 2393 2468 E-Mail: bernd.eil...@fms-logistics.com <mailto:bernd.eil...@fms-logistics.com> Internet: www.fms-logistics.com <http://www.fms-logistics.com> Wir arbeiten ausschließlich auf Grundlage der Allgemeinen Deutschen Spediteurbedingungen 2016 (ADSp 2016). Die ADSp 2016 beschränken in Ziffer 23 die gesetzliche Haftung für Güterschäden, die nach der gesetzlichen Regelung in § 431 HGB auf 8,33 SZR/kg beschränkt ist, weiter auf 1 Mio € je Schadenfall bzw. 2 Mio € je Schadenereignis oder auf 2 SZR/kg, je nachdem, welcher Betrag höher ist. Bei multimodalen Transporten unter Einschluss einer Seebeförderung ist die Haftungsgrenze generell 2 SZR/kg. Die ADSp sind auf unserer Internetwebsite (http://www.fms-logistics.com/agbs_de.php) abrufbar und werden auf Verlangen übersandt. Wir haben die Speditionshaftungsversicherung im Rahmen der AON Logistics VH Police gezeichnet. Our services are governed exclusively by the Allgemeine Deutsche Spediteurbedingungen 2016 (ADSp 2016) (German Freight Forwarders' General Terms and Conditions 2016). As stated in clause 23 of the ADSp 2016, the statutory liability, which is limited in Section 431 of the German Commercial Code (HGB) to 8,33 Special Drawing Right per kilogram (SDR/kg), is further limited to a maximum of € 1 Million per claim or to € 2 Million per event or to 2 SDR/kg, whichever sum is higher. In the case of multimodal transport which includes sea carriage the maximum liability is in general 2 SDR/kg. The ADSp are available on our website (http://www.fms-logistics.com/agbs_en.php) and can be obtained from the company on request. Our forwarding insurance is covered within the framework of our AON Logistics VH insurance policy. Gerichtsstand/place of jurisdiction: Hamburg. Handelsregister/commercial register: Hamburg HRA 41917. Rechtsform/legal form: Kommanditgesellschaft/Limited Partnership. Persönlich haftende Gesellschafter/general partner: Speditionsgesellschaft Fr. Meyer's Sohn mbH, Marc Meier. Handelsregister/commercial register: Hamburg HRV 17990. Geschäftsführer/managing directors: Marc Meier, Dominik Lucius, Markus Panhauser -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
How to start snmpd without any MIB module
Hi, I'm confused about the -I option, what's the default behavior on the mib modules inclusion? If I want to start snmpd without any MIB supported(in fact, I want to implement most them in subagent) , how to? -I [-]INITLIST This option specifies which modules you do (or do not) want to be initialized when the agent starts up. If the comma-sepa- rated INITLIST is preceded with a ’-’, it is the list of mod- ules that you do not want to be started. Otherwise, INITLIST is the list of modules to be started. To get a list of compiled modules, run the agent with the argu- ments -Dmib_init -H (assumes you have debugging support com- piled in). Thanks Bill -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: snmpd - snmpget and snmpwalk inconsistent
snmpwalk always returns the correct value On Sun, Apr 23, 2017 at 11:11 PM, Ulrich Windl < ulrich.wi...@rz.uni-regensburg.de> wrote: > >>> Ryan Goodfellow schrieb am 21.04.2017 um 20:43 in > Nachricht > : > > Hi, > > > > I have observed a puzzling inconsistency between the get and walk > requests > > from snmpd. I am running the daemon on a Cumulus Linux switch. The > > following shell sessions shows the issue. > > > > ### SERVER (stem) ### > > > > ry@stem$ snmpd --version > > NET-SNMP version: 5.7.3 > > > > ry@stem$ service snmpd restart > > > > ry@stem$ pgrep -lfa snmpd > > 1298 /usr/sbin/snmpd -y -LF d /var/log/snmp -DALL -u snmp -g snmp -I > -smux > > -p /run/snmpd.pid -f > > > > > > ### CLIENT ### > > > > ## initial request for ifNumber using GET returns 0 (wrong) > > ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0 > > Fri Apr 21 18:20:15 UTC 2017 > > iso.3.6.1.2.1.2.1.0 = INTEGER: 0 > > > > ## initial request for ifNumber using WALK returns 11 (correct) > > ry$ date && snmpwalk -c public -v2c stem .1.3.6.1.2.1.2.1.0 > > Fri Apr 21 18:20:20 UTC 2017 > > iso.3.6.1.2.1.2.1.0 = INTEGER: 11 > > What happens if you start with snmpwalk? It looks like if the first query > after some pause returns the incorrect value, independent of the method. > > > > > ## subsequent requests for ifNumber using GET returns 11 (correct) > > ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0 > > Fri Apr 21 18:20:24 UTC 2017 > > iso.3.6.1.2.1.2.1.0 = INTEGER: 11 > > > > ## after some time passes GET is back to being incorrect > > ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0 > > Fri Apr 21 18:21:58 UTC 2017 > > iso.3.6.1.2.1.2.1.0 = INTEGER: 0 > > > > In doing some tests, I have determined that the value goes back to 0 > > exactly 1 minute after the walk was executed. > > > > > > > > -- > > *ry**@isi* > > > > > -- *ry**@isi* -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Antw: snmpd - snmpget and snmpwalk inconsistent
>>> Ryan Goodfellow schrieb am 21.04.2017 um 20:43 in >>> Nachricht : > Hi, > > I have observed a puzzling inconsistency between the get and walk requests > from snmpd. I am running the daemon on a Cumulus Linux switch. The > following shell sessions shows the issue. > > ### SERVER (stem) ### > > ry@stem$ snmpd --version > NET-SNMP version: 5.7.3 > > ry@stem$ service snmpd restart > > ry@stem$ pgrep -lfa snmpd > 1298 /usr/sbin/snmpd -y -LF d /var/log/snmp -DALL -u snmp -g snmp -I -smux > -p /run/snmpd.pid -f > > > ### CLIENT ### > > ## initial request for ifNumber using GET returns 0 (wrong) > ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0 > Fri Apr 21 18:20:15 UTC 2017 > iso.3.6.1.2.1.2.1.0 = INTEGER: 0 > > ## initial request for ifNumber using WALK returns 11 (correct) > ry$ date && snmpwalk -c public -v2c stem .1.3.6.1.2.1.2.1.0 > Fri Apr 21 18:20:20 UTC 2017 > iso.3.6.1.2.1.2.1.0 = INTEGER: 11 What happens if you start with snmpwalk? It looks like if the first query after some pause returns the incorrect value, independent of the method. > > ## subsequent requests for ifNumber using GET returns 11 (correct) > ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0 > Fri Apr 21 18:20:24 UTC 2017 > iso.3.6.1.2.1.2.1.0 = INTEGER: 11 > > ## after some time passes GET is back to being incorrect > ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0 > Fri Apr 21 18:21:58 UTC 2017 > iso.3.6.1.2.1.2.1.0 = INTEGER: 0 > > In doing some tests, I have determined that the value goes back to 0 > exactly 1 minute after the walk was executed. > > > > -- > *ry**@isi* -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd - snmpget and snmpwalk inconsistent
Hi, I have observed a puzzling inconsistency between the get and walk requests from snmpd. I am running the daemon on a Cumulus Linux switch. The following shell sessions shows the issue. ### SERVER (stem) ### ry@stem$ snmpd --version NET-SNMP version: 5.7.3 ry@stem$ service snmpd restart ry@stem$ pgrep -lfa snmpd 1298 /usr/sbin/snmpd -y -LF d /var/log/snmp -DALL -u snmp -g snmp -I -smux -p /run/snmpd.pid -f ### CLIENT ### ## initial request for ifNumber using GET returns 0 (wrong) ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0 Fri Apr 21 18:20:15 UTC 2017 iso.3.6.1.2.1.2.1.0 = INTEGER: 0 ## initial request for ifNumber using WALK returns 11 (correct) ry$ date && snmpwalk -c public -v2c stem .1.3.6.1.2.1.2.1.0 Fri Apr 21 18:20:20 UTC 2017 iso.3.6.1.2.1.2.1.0 = INTEGER: 11 ## subsequent requests for ifNumber using GET returns 11 (correct) ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0 Fri Apr 21 18:20:24 UTC 2017 iso.3.6.1.2.1.2.1.0 = INTEGER: 11 ## after some time passes GET is back to being incorrect ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0 Fri Apr 21 18:21:58 UTC 2017 iso.3.6.1.2.1.2.1.0 = INTEGER: 0 In doing some tests, I have determined that the value goes back to 0 exactly 1 minute after the walk was executed. -- *ry**@isi* -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: net-snmp instalation problem :snmpd not installed
deepak.sachan deepak.sachan writes: > 1. I am not able to find snmp.conf &snmpd.conf You likely need to create them. Some packages come with example configuration files, I'm not sure about ubuntu. > 2. snmp server (snmpd) is not installed. (is it possible while installing > net-snmp ,snmpd is not > installed ) You likely need to install the agent package, not just the primary net-snmp package. Search the package database in ubuntu for "snmpd". But then you state: > 3. All the snmp client tool (snmpwalk ,snmpget etc) are running except snmpd > . while running - > > $ snmpd > snmpd: symbol lookup error: /usr/local/lib/libnetsnmpmibs.so.30: undefined > symbol: netsnmp_memdup That sounds like a version incompatibility. IE, I think you've manually compiled net-snmp at some *and* have a package installed. That is generally a bad thing to do because of library differences. -- Wes Hardaker Please mail all replies to net-snmp-cod...@lists.sourceforge.net -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Compiled SNMP, ld: fatal: Symbol referencing errors. No output written to .libs/snmpd when trying to make
Hi Ben, Utmost apologies, there is alot of content in archives, would you please be able to send me a link to the archive where your installation script resides. Thank you in advance, Kindest Regards, Clement Kumar On Tue, Feb 21, 2017 at 8:35 AM, Clement Dass wrote: > Good Morning Ben, > > Thank you so much for the kind response, I will take a look into the > archives now and try and find the script, will update accordingly. Also > will attempt installation on a different location and also update. > > Have a great day. > > Kindest Regards, > Clement Kumar > > On Tue, Feb 21, 2017 at 3:07 AM, Taylor, Ben wrote: > >> Check the archives. I posted a script to help build on Solaris. >> >> Also, find a different place to install it. /use/local or some other >> place. The reason for not installing it in >> /use/sfw is that is the default Solaris location. >> >> Ben >> >> Sent from my iPhone >> >> > On Feb 20, 2017, at 12:44 AM, Clement Dass >> wrote: >> > >> > Hi, >> > >> > I have managed to ./configure net-snmp using the following: >> > >> > ./configure --with-oenssl=/usr/sfw --with-mib-modules="ucd-snmp/lmSensors >> ucd-snmp/diskio \ smux mibII/mta_sendmail" --with-cc=gcc >> > >> > Next is make, but when trying to make I get the following: >> > >> > ld: warning: file ../snmplib/.libs/libnetsnmp.so: linked to >> /usr/local/src/net-snmp/snmplib/.libs/libnetsnmp.so: attempted multiple >> inclusion of file >> > Undefined first referenced >> > symbol in file >> > picl_initialize ./.libs/libnetsnmpmibs.so >> > picl_get_propval_by_name./.libs/libnetsnmpmibs.so >> > picl_get_propinfo_by_name ./.libs/libnetsnmpmibs.so >> > picl_get_propval./.libs/libnetsnmpmibs.so >> > picl_shutdown ./.libs/libnetsnmpmibs.so >> > picl_get_root ./.libs/libnetsnmpmibs.so >> > ld: fatal: Symbol referencing errors. No output written to .libs/snmpd >> > collect2: error: ld returned 1 exit status >> > make[1]: *** [snmpd] Error 1 >> > make[1]: Leaving directory `/usr/local/src/net-snmp/agent' >> > make: *** [subdirs] Error 1 >> > >> > OS: SunOS Narada125 5.9 Generic_118558-34 sun4u sparc SUNW,Sun-Fire-V490 >> > >> > Kindly requesting support as it is critical I get snmp working on this >> server and it requires monitoring, really really need help, please. >> > >> > Thank you, >> > Clement >> > >> -- >> > Check out the vibrant tech community on one of the world's most >> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> > ___ >> > Net-snmp-users mailing list >> > Net-snmp-users@lists.sourceforge.net >> > Please see the following page to unsubscribe or change other options: >> > https://lists.sourceforge.net/lists/listinfo/net-snmp-users >> > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Compiled SNMP, ld: fatal: Symbol referencing errors. No output written to .libs/snmpd when trying to make
Good Morning Ben, Thank you so much for the kind response, I will take a look into the archives now and try and find the script, will update accordingly. Also will attempt installation on a different location and also update. Have a great day. Kindest Regards, Clement Kumar On Tue, Feb 21, 2017 at 3:07 AM, Taylor, Ben wrote: > Check the archives. I posted a script to help build on Solaris. > > Also, find a different place to install it. /use/local or some other > place. The reason for not installing it in > /use/sfw is that is the default Solaris location. > > Ben > > Sent from my iPhone > > > On Feb 20, 2017, at 12:44 AM, Clement Dass > wrote: > > > > Hi, > > > > I have managed to ./configure net-snmp using the following: > > > > ./configure --with-oenssl=/usr/sfw --with-mib-modules="ucd-snmp/lmSensors > ucd-snmp/diskio \ smux mibII/mta_sendmail" --with-cc=gcc > > > > Next is make, but when trying to make I get the following: > > > > ld: warning: file ../snmplib/.libs/libnetsnmp.so: linked to > /usr/local/src/net-snmp/snmplib/.libs/libnetsnmp.so: attempted multiple > inclusion of file > > Undefined first referenced > > symbol in file > > picl_initialize ./.libs/libnetsnmpmibs.so > > picl_get_propval_by_name./.libs/libnetsnmpmibs.so > > picl_get_propinfo_by_name ./.libs/libnetsnmpmibs.so > > picl_get_propval./.libs/libnetsnmpmibs.so > > picl_shutdown ./.libs/libnetsnmpmibs.so > > picl_get_root ./.libs/libnetsnmpmibs.so > > ld: fatal: Symbol referencing errors. No output written to .libs/snmpd > > collect2: error: ld returned 1 exit status > > make[1]: *** [snmpd] Error 1 > > make[1]: Leaving directory `/usr/local/src/net-snmp/agent' > > make: *** [subdirs] Error 1 > > > > OS: SunOS Narada125 5.9 Generic_118558-34 sun4u sparc SUNW,Sun-Fire-V490 > > > > Kindly requesting support as it is critical I get snmp working on this > server and it requires monitoring, really really need help, please. > > > > Thank you, > > Clement > > > -- > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > ___ > > Net-snmp-users mailing list > > Net-snmp-users@lists.sourceforge.net > > Please see the following page to unsubscribe or change other options: > > https://lists.sourceforge.net/lists/listinfo/net-snmp-users > -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Compiled SNMP, ld: fatal: Symbol referencing errors. No output written to .libs/snmpd when trying to make
Hi, I have managed to ./configure net-snmp using the following: ./configure --with-oenssl=/usr/sfw --with-mib-modules="ucd-snmp/lmSensors ucd-snmp/diskio \ smux mibII/mta_sendmail" --with-cc=gcc Next is make, but when trying to make I get the following: ld: warning: file ../snmplib/.libs/libnetsnmp.so: linked to /usr/local/src/net-snmp/snmplib/.libs/libnetsnmp.so: attempted multiple inclusion of file Undefined first referenced symbol in file picl_initialize ./.libs/libnetsnmpmibs.so picl_get_propval_by_name./.libs/libnetsnmpmibs.so picl_get_propinfo_by_name ./.libs/libnetsnmpmibs.so picl_get_propval./.libs/libnetsnmpmibs.so picl_shutdown ./.libs/libnetsnmpmibs.so picl_get_root ./.libs/libnetsnmpmibs.so ld: fatal: Symbol referencing errors. No output written to .libs/snmpd collect2: error: ld returned 1 exit status make[1]: *** [snmpd] Error 1 make[1]: Leaving directory `/usr/local/src/net-snmp/agent' make: *** [subdirs] Error 1 OS: SunOS Narada125 5.9 Generic_118558-34 sun4u sparc SUNW,Sun-Fire-V490 Kindly requesting support as it is critical I get snmp working on this server and it requires monitoring, really really need help, please. Thank you, Clement -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: oldEngineID changes upon restart of snmpd
Hi, engineID value is 'random' by default so whenever snmpd restarts , there will be new engineID. It can be reconfigured (Add keyword 'engineIDType' in etc/snmp/snmpd.conf) to be based on MAC then engineID will be constant. engineIDType 1|2|3 specifies that the engineID should be built from the IPv4 address (1), IPv6 address (2) or MAC address (3). Note that changing the IP address (or switching the network interface card) may cause problems. Thanks On Fri, Jan 20, 2017 at 1:51 PM, Gerrit Avenant wrote: > I am running net-snmp 5.7.3 on an embedded linux platform. > > It seems to me my oldEngineID is changed upon each restart of the daemon. > > > I stop the daemon. > > I create a user in the persistent snmpd.conf through createUser. > > I restart the daemon and oldEngineID matches that of the usmUser created. > I can use the user to to read OIDs. > > When I restart the daemon again, the oldEngineID changes, but the usmUser > created is still the same. The created user is also not recognized anymore. > > > I don't change the EngineID anywhere in the non-persistent snmpd.conf at > all. > > Any help appreciated. > > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > ___ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
net-snmp instalation problem :snmpd not installed
Hi I am trying to install net-snmp on ubuntu13.10 from .tar source . After complete installation- 1. I am not able to find snmp.conf &snmpd.conf 2. snmp server (snmpd) is not installed. (is it possible while installing net-snmp ,snmpd is not installed ) 3. All the snmp client tool (snmpwalk ,snmpget etc) are running except snmpd . while running - $ snmpd snmpd: symbol lookup error: /usr/local/lib/libnetsnmpmibs.so.30: undefined symbol: netsnmp_memdup $ sudo service snmpd start snmpd: unrecognized service thanks -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
oldEngineID changes upon restart of snmpd
I am running net-snmp 5.7.3 on an embedded linux platform. It seems to me my oldEngineID is changed upon each restart of the daemon. I stop the daemon. I create a user in the persistent snmpd.conf through createUser. I restart the daemon and oldEngineID matches that of the usmUser created. I can use the user to to read OIDs. When I restart the daemon again, the oldEngineID changes, but the usmUser created is still the same. The created user is also not recognized anymore. I don't change the EngineID anywhere in the non-persistent snmpd.conf at all. Any help appreciated. -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Unable to access snmpd from anywhere but localhost
Hi, Does querying alpha (10.0.0.224 ) from remote device using SNMPv2c community works ? On Tue, Jan 10, 2017 at 6:14 PM, Ed Greenberg wrote: > This is on Centos 7 with > > Installed Packages > net-snmp.x86_64 1:5.7.2-24.el7_2.1 @base > > I have this package on two servers on the same subnet. > > On 10.0.0.224 (let's call it 'alpha', because that's it's hostname) I run: > > [root@alpha ~]# net-snmp-create-v3-user > Enter a SNMPv3 user name to create: > nagios > Enter authentication pass-phrase: > foobarski > Enter encryption pass-phrase: >[press return to reuse the authentication pass-phrase] > > adding the following line to /var/lib/net-snmp/snmpd.conf: > createUser nagios MD5 "foobarski" DES > adding the following line to /etc/snmp/snmpd.conf: > rwuser nagios > [root@alpha ~]# > > Then I start snmpd with > > [root@alpha ~]# snmpd -LEd -f -d -a > NET-SNMP version 5.7.2 > > This should log to standard error, anything debug or better, without > detaching. > > From 10.0.0.244 I run > > snmpget -v3 -u nagios -a MD5 -A foobarski -l authPriv -x DES -X > foobarski 10.0.0.224 system.sysUpTime.0 > > Over in another window on Alpha I am running tcpdump and I see the > packets coming in. > 07:36:49.913605 IP 10.0.0.244.38890 > alpha.snmp: F=r U= E= C= > GetRequest(14) > 07:36:50.914888 IP 10.0.0.244.38890 > alpha.snmp: F=r U= E= C= > GetRequest(14) > 07:36:51.916270 IP 10.0.0.244.38890 > alpha.snmp: F=r U= E= C= > GetRequest(14) > 07:36:52.917526 IP 10.0.0.244.38890 > alpha.snmp: F=r U= E= C= > GetRequest(14) > 07:36:53.918674 IP 10.0.0.244.38890 > alpha.snmp: F=r U= E= C= > GetRequest(14) > 07:36:54.919985 IP 10.0.0.244.38890 > alpha.snmp: F=r U= E= C= > GetRequest(14) > ^C > > snmpd stands mute. It does not log to stderror, beyond logging it's > signon, and it does not respond to the packets. > > The config files were exactly as delivered, but for what > net-snmp-create-v3-user added. > > Later, I added agentAddress udp:161 with no change. > > I'm stumped. > > In my last job I had over 100 servers that had been set up according to > this process. They were, however, all centos 6 running 1:5.5-57.el6_8.1 > > Did something change? > > Many thanks, > > > Ed Greenberg > > > > > -- > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > ___ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users > -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Unable to access snmpd from anywhere but localhost
This is on Centos 7 with Installed Packages net-snmp.x86_64 1:5.7.2-24.el7_2.1 @base I have this package on two servers on the same subnet. On 10.0.0.224 (let's call it 'alpha', because that's it's hostname) I run: [root@alpha ~]# net-snmp-create-v3-user Enter a SNMPv3 user name to create: nagios Enter authentication pass-phrase: foobarski Enter encryption pass-phrase: [press return to reuse the authentication pass-phrase] adding the following line to /var/lib/net-snmp/snmpd.conf: createUser nagios MD5 "foobarski" DES adding the following line to /etc/snmp/snmpd.conf: rwuser nagios [root@alpha ~]# Then I start snmpd with [root@alpha ~]# snmpd -LEd -f -d -a NET-SNMP version 5.7.2 This should log to standard error, anything debug or better, without detaching. From 10.0.0.244 I run snmpget -v3 -u nagios -a MD5 -A foobarski -l authPriv -x DES -X foobarski 10.0.0.224 system.sysUpTime.0 Over in another window on Alpha I am running tcpdump and I see the packets coming in. 07:36:49.913605 IP 10.0.0.244.38890 > alpha.snmp: F=r U= E= C= GetRequest(14) 07:36:50.914888 IP 10.0.0.244.38890 > alpha.snmp: F=r U= E= C= GetRequest(14) 07:36:51.916270 IP 10.0.0.244.38890 > alpha.snmp: F=r U= E= C= GetRequest(14) 07:36:52.917526 IP 10.0.0.244.38890 > alpha.snmp: F=r U= E= C= GetRequest(14) 07:36:53.918674 IP 10.0.0.244.38890 > alpha.snmp: F=r U= E= C= GetRequest(14) 07:36:54.919985 IP 10.0.0.244.38890 > alpha.snmp: F=r U= E= C= GetRequest(14) ^C snmpd stands mute. It does not log to stderror, beyond logging it's signon, and it does not respond to the packets. The config files were exactly as delivered, but for what net-snmp-create-v3-user added. Later, I added agentAddress udp:161 with no change. I'm stumped. In my last job I had over 100 servers that had been set up according to this process. They were, however, all centos 6 running 1:5.5-57.el6_8.1 Did something change? Many thanks, Ed Greenberg -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re[2]: snmpd handles limit
Yep, you're right. Been able to set it correctly on Ubuntu 14.04 (/etc/security/limits.conf), but the same configuration does not seem to work on Ubuntu 16.04. Trying to figure out why. Thanks for pointing this out. Christian Tardif -- Message d'origine -- De: "Eduardo Bragatto" À: net-snmp-users@lists.sourceforge.net Envoyé : 2016-08-30 17:04:44 Objet : Re: snmpd handles limit Hi, The error “too many open files” actually comes from the operating system — it seems you’re reaching the limit of file descriptors a process may keep open (some linux distros have that limit set to 1024 by default, which seems to be your case). You can increase this number by editing your system’s limit.conf file: http://linux.die.net/man/5/limits.conf Please check the documentation of your distro for the proper way to increase the number of file descriptors. Cheers -Eduardo Bragatto On 30 de ago de 2016, at 9:43 AM, Tardif, Christian wrote: Hi, I'm using snmpd as a proxy to handle all my devices polling from a restricted environment to the production environment. Something like 1400 devices. And I found that I can set up up to 1010 devices without any problem. But as soon as I enter more devices, the daemon does not start anymore, complaining that there are "Too many open files". I tried to increase this value (though I can't figure out the limit it breaks) to 4,000,000 handlers (from /prox/sys/fs/file-max (defaults to 202,747). I can't create any more device anyway. So it must be something else that I can't find out. Is this something hardcoded in the library or a value in the config file that I could play with? Tks, -- Christian -- ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: snmpd handles limit
Hi, The error “too many open files” actually comes from the operating system — it seems you’re reaching the limit of file descriptors a process may keep open (some linux distros have that limit set to 1024 by default, which seems to be your case). You can increase this number by editing your system’s limit.conf file: http://linux.die.net/man/5/limits.conf Please check the documentation of your distro for the proper way to increase the number of file descriptors. Cheers -Eduardo Bragatto > On 30 de ago de 2016, at 9:43 AM, Tardif, Christian > wrote: > > Hi, > > I'm using snmpd as a proxy to handle all my devices polling from a restricted > environment to the production environment. Something like 1400 devices. And > I found that I can set up up to 1010 devices without any problem. But as soon > as I enter more devices, the daemon does not start anymore, complaining that > there are "Too many open files". I tried to increase this value (though I > can't figure out the limit it breaks) to 4,000,000 handlers (from > /prox/sys/fs/file-max (defaults to 202,747). I can't create any more device > anyway. So it must be something else that I can't find out. > > Is this something hardcoded in the library or a value in the config file that > I could play with? > > Tks, > > -- > Christian > > > -- > ___ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd handles limit
Hi, I'm using snmpd as a proxy to handle all my devices polling from a restricted environment to the production environment. Something like 1400 devices. And I found that I can set up up to 1010 devices without any problem. But as soon as I enter more devices, the daemon does not start anymore, complaining that there are "Too many open files". I tried to increase this value (though I can't figure out the limit it breaks) to 4,000,000 handlers (from /prox/sys/fs/file-max (defaults to 202,747). I can't create any more device anyway. So it must be something else that I can't find out. Is this something hardcoded in the library or a value in the config file that I could play with? Tks, -- CHRISTIAN --- ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd - customize ifNumber
Hello, My x86 is connected via PCIe to an Intel's device. This device(ASIC) is an ethernet switch (fm10k) Intel provides a linux library + device driver for managing the switch (e.g: read port status, set port speed). I want to run snmpd on the x86 and fill the TODO with the relevant Intel's API. Intel does not provide any SNMP infrastructure for this device. I think it will be great if the x86 will run snmpd with some customization and will monitor\manage the switch device. Is it possible ? What SNMP agent runs in all commercial switches. Is it not snmpd ? My first step is to understand how to "convince" snmpd that the switch has 16 ports. The default is 4 which is the number if etherent devices in the x86. This is of course not relevant for my needs. I also tried to run example_demon.c But in my case I do not have new MIBs. Just the standard ones. Thank you, Zvika -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Customize snmpd to monitr an 8 ports switch
Hi Fredrik, All, The Centos is running on the switch. It should run snmpd. The snmpd should be customized in order to manage and monitor 8 ports of the switch. If I query ifSpeed (for example) I'm getting 4 values. What should I change in order to get 8 values ? Thank you, Z.V -Original Message- From: Fredrik Björk Sent: Sunday, June 5, 2016 00:50 To: net-snmp-users@lists.sourceforge.net Subject: Re: Fwd: Customize snmpd to monitr an 8 ports switch Hi! What are you trying to accomplish? Is Centos running on the switch or a system trying to read SNMP from a switch? Giv us some sample outputs. /Fredrik Den 2016-06-04 kl. 23:12, skrev Zvi Vered: > Hello, > > Should I modify IF-MIB.txt for this purpose ? How ? > > Thank you, > Z.V > > > -- Forwarded message -- > From: Zvi Vered > Date: Fri, Jun 3, 2016 at 12:32 AM > Subject: Customize snmpd to monitr an 8 ports switch > To: net-snmp-users@lists.sourceforge.net > > > Hello, > > I compiled net-snmp for Centos 6.4 and ran MIB browser. > > I noticed that only 4 ports are monitored. > > For example, upon request for ifSpeed, I got 4 values. > > How can I customize snmpd to support 8 ports ? > > Thank you, > Z.V > > -- > What NetFlow Analyzer can do for you? Monitors network bandwidth and > traffic > patterns at an interface-level. Reveals which users, apps, and protocols > are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e > ___ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Fwd: Customize snmpd to monitr an 8 ports switch
Hi! What are you trying to accomplish? Is Centos running on the switch or a system trying to read SNMP from a switch? Giv us some sample outputs. /Fredrik Den 2016-06-04 kl. 23:12, skrev Zvi Vered: > Hello, > > Should I modify IF-MIB.txt for this purpose ? How ? > > Thank you, > Z.V > > > -- Forwarded message -- > From: Zvi Vered > Date: Fri, Jun 3, 2016 at 12:32 AM > Subject: Customize snmpd to monitr an 8 ports switch > To: net-snmp-users@lists.sourceforge.net > > > Hello, > > I compiled net-snmp for Centos 6.4 and ran MIB browser. > > I noticed that only 4 ports are monitored. > > For example, upon request for ifSpeed, I got 4 values. > > How can I customize snmpd to support 8 ports ? > > Thank you, > Z.V > > -- > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e > ___ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Fwd: Customize snmpd to monitr an 8 ports switch
Hello, Should I modify IF-MIB.txt for this purpose ? How ? Thank you, Z.V -- Forwarded message -- From: Zvi Vered Date: Fri, Jun 3, 2016 at 12:32 AM Subject: Customize snmpd to monitr an 8 ports switch To: net-snmp-users@lists.sourceforge.net Hello, I compiled net-snmp for Centos 6.4 and ran MIB browser. I noticed that only 4 ports are monitored. For example, upon request for ifSpeed, I got 4 values. How can I customize snmpd to support 8 ports ? Thank you, Z.V -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Compile snmpd from source
Hello, Under Centos 6.4 I installed snmpd. It runs from /usr/sbin Then I installed the sources (in my case net-snmp 5.5) and installed them with: ./configure make make install The snmpd binary was installed in /usr/local Running: "service snmpd restart" running the original /usr/snmpd When I tried to: "cp /usr/local/snmpd /usr/sbin" and run the snmpd I got: Warning: no access control information configured. It's unlikely this agent can serve any useful purpose in this state. Run "snmpconf -g basic_setup" to help you configure the snmpd.conf file for this agent. NET-SNMP version 5.5 And the agent is not responding to the MIB browser. Can you please help ? Thank you, Zvi Vered -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Customize snmpd to monitr an 8 ports switch
Hello, I compiled net-snmp for Centos 6.4 and ran MIB browser. I noticed that only 4 ports are monitored. For example, upon request for ifSpeed, I got 4 values. How can I customize snmpd to support 8 ports ? Thank you, Z.V -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: net-snmp 5.4.1 on Solaris 11: snmpd becomes non-responsive
It appears that there is an issue if the number of TCP connections is greater than 1000 as is the case on our server. # netstat -an | grep ESTABLISHED | wc -l 1907 As suggested by Oracle, I appended the following options for snmpd to disable the TCP MIB at runtime and avoid querying the tcpConnTable: snmpd -I -tcp But, when running 'snmpwalk,' it appears that the TCP MIB is still enabled: . . . TCP-MIB::tcpConnRemPort.192.168.18.6.64494.192.168.18.6.7103 = INTEGER: 7103 TCP-MIB::tcpConnRemPort.192.168.18.6.64820.192.168.18.9.7107 = INTEGER: 7107 TCP-MIB::tcpConnRemPort.192.168.18.6.64952.192.168.18.6.7103 = INTEGER: 7103 Timeout: No Response from localhost . . . The Oracle Doc ID is 1357800.1 Any suggestions? Best regards, Shannon From: Touchstone Shannon [mailto:shannon.touchst...@gemalto.com] Sent: Friday, April 22, 2016 5:23 PM To: net-snmp-users@lists.sourceforge.net Subject: net-snmp 5.4.1 on Solaris 11: snmpd becomes non-responsive After enabling the net-snmp service, snmpd will run for a short period and then become non-responsive. snmpwalk times out. The following message repeats over and over in the log: verbose:access:tcpconn:entry: create Any ideas? Best regards, Shannon This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited. E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender. Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus. This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited. E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender. Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus. -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
net-snmp 5.4.1 on Solaris 11: snmpd becomes non-responsive
After enabling the net-snmp service, snmpd will run for a short period and then become non-responsive. snmpwalk times out. The following message repeats over and over in the log: verbose:access:tcpconn:entry: create Any ideas? Best regards, Shannon This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited. E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender. Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus. -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Antw: Persistence of Disk index in snmpd
>>> Rudi Daemen schrieb am 22.01.2016 um 11:10 in Nachricht : > Hi, > > I have been using snmpd to monitor disk activity on my storage machine > (Debian 8, running mdadm raid6), for this, I've been using the > "DiskIODevice" and "hrStorage" trees. This has been working like a > charm except for one issue: > The disk device index appears to change every reboot. So every time > the storage server needs to reboot I have to rewrite the monitoring > configuration on the statistics collector to keep the data accurate. > > The layout of the system is as follows: > /dev/sda up until /dev/sdf are the raid disks, holding two sets: > /dev/md0 and /dev/md1. > /dev/sdg is the boot device (USB flashdisk). > > For some reason the order in which /dev/sda to /dev/sdf, /dev/md0 and > /dev/md1 are indexed changes every boot. The only disk that > consistently gets the same index number is /dev/sdg. That's a feature of Linux: If you want consistent disk monitoring, you wounldn't use /dev/sda, but some other path like /dev/disk/by-*. However it seems those paths are not exported via SNMP. > Note: the physical device paths do not change, port 1 on the disk > controller will always map to /dev/sda, port 2 to /dev/sdb, etc. This > detection is consistent in the system. > > For the hrStorage, the solution seems to be to use the dskTable tree > and manually configure each filesystem in the snmpd config. However, > this only seems to work for actual filesytems, not for individual > disks Yes . > Is there a way to get a persistent index (or manually configured > indexing) on the "DiskIODevice" trees? Hack the source (host/hr_disk.c)? Regards, Ulrich > > Kind regards, > Rudi Daemen > > -- > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > ___ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Persistence of Disk index in snmpd
Hi, I have been using snmpd to monitor disk activity on my storage machine (Debian 8, running mdadm raid6), for this, I've been using the "DiskIODevice" and "hrStorage" trees. This has been working like a charm except for one issue: The disk device index appears to change every reboot. So every time the storage server needs to reboot I have to rewrite the monitoring configuration on the statistics collector to keep the data accurate. The layout of the system is as follows: /dev/sda up until /dev/sdf are the raid disks, holding two sets: /dev/md0 and /dev/md1. /dev/sdg is the boot device (USB flashdisk). For some reason the order in which /dev/sda to /dev/sdf, /dev/md0 and /dev/md1 are indexed changes every boot. The only disk that consistently gets the same index number is /dev/sdg. Note: the physical device paths do not change, port 1 on the disk controller will always map to /dev/sda, port 2 to /dev/sdb, etc. This detection is consistent in the system. For the hrStorage, the solution seems to be to use the dskTable tree and manually configure each filesystem in the snmpd config. However, this only seems to work for actual filesytems, not for individual disks. Is there a way to get a persistent index (or manually configured indexing) on the "DiskIODevice" trees? Kind regards, Rudi Daemen -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: snmpd 5.7.3 under FreeBSD 10.2 does not reply to SNMP requests
Hi, for some reason I thought that bsnmpd configuration file is compatible with Net-SNMP snmpd. While the Net-SNMP snmpd did not complain about configuration file syntax(even if I started it with "snmpd -DALL -f -C -c /etc/snmpd.config"), then it did not reply to SNMP requests. regards, Martin On 10/19/15, Martin T wrote: > Hi, > > I compiled Net-SNMP snmpd version 5.7.3 under FreeBSD 10.2. When I > start the snmpd with "snmpd -f -C -c /etc/snmpd.config" command, then > it listens on UDP port 161: > > root@FreeBSD10:~ # sockstat -4l > USER COMMANDPID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS > root snmpd 29916 8 udp4 *:161 *:* > root sendmail 553 3 tcp4 127.0.0.1:25 *:* > root sshd 550 4 tcp4 *:22 *:* > root syslogd359 7 udp4 *:514 *:* > root@FreeBSD10:~ # ps -fp 29916 > PID TT STATTIME COMMAND > 29916 0 S+ 0:00.61 snmpd -f -C -c /etc/snmpd.config > root@FreeBSD10:~ # > > However, if I snmpwalk this host, then it does not reply to SNMP > messages. Content of /etc/snmpd.config can be seen below: > > root@FreeBSD10:~ # grep -v '^#' /etc/snmpd.config | grep -vE '^$' > location := "Room 200" > contact := "sysmeis...@example.com" > system := 1 # FreeBSD > traphost := localhost > trapport := 162 > read := "public" > write := "geheim" > trap := "mytrap" > NoAuthProtocol:= 1.3.6.1.6.3.10.1.1.1 > HMACMD5AuthProtocol := 1.3.6.1.6.3.10.1.1.2 > HMACSHAAuthProtocol := 1.3.6.1.6.3.10.1.1.3 > NoPrivProtocol:= 1.3.6.1.6.3.10.1.2.1 > DESPrivProtocol := 1.3.6.1.6.3.10.1.2.2 > AesCfb128Protocol := 1.3.6.1.6.3.10.1.2.4 > securityModelAny := 0 > securityModelSNMPv1 := 1 > securityModelSNMPv2c := 2 > securityModelUSM := 3 > MPmodelSNMPv1 := 0 > MPmodelSNMPv2c:= 1 > MPmodelSNMPv3 := 3 > noAuthNoPriv := 1 > authNoPriv := 2 > authPriv := 3 > %snmpd > begemotSnmpdDebugDumpPdus = 2 > begemotSnmpdDebugSyslogPri= 7 > begemotSnmpdCommunityString.0.1 = $(read) > begemotSnmpdCommunityDisable = 1 > begemotSnmpdPortStatus.0.0.0.0.161 = 1 > begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1 > begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4 > begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4 > begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2 > begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap) > sysContact= $(contact) > sysLocation = $(location) > sysObjectId = 1.3.6.1.4.1.12325.1.1.2.1.$(system) > snmpEnableAuthenTraps = 2 > begemotSnmpdModulePath."mibII"= "/usr/lib/snmp_mibII.so" > root@FreeBSD10:~ # > > > If I use this very same configuration file with bsnmpd("bsnmpd -d -c > /etc/snmpd.config"), then host does reply to SNMP queries. > > > What might cause such behavior? Please let me know if additional > information is needed. > > > thanks, > Martin > -- ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd 5.7.3 under FreeBSD 10.2 does not reply to SNMP requests
Hi, I compiled Net-SNMP snmpd version 5.7.3 under FreeBSD 10.2. When I start the snmpd with "snmpd -f -C -c /etc/snmpd.config" command, then it listens on UDP port 161: root@FreeBSD10:~ # sockstat -4l USER COMMANDPID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS root snmpd 29916 8 udp4 *:161 *:* root sendmail 553 3 tcp4 127.0.0.1:25 *:* root sshd 550 4 tcp4 *:22 *:* root syslogd359 7 udp4 *:514 *:* root@FreeBSD10:~ # ps -fp 29916 PID TT STATTIME COMMAND 29916 0 S+ 0:00.61 snmpd -f -C -c /etc/snmpd.config root@FreeBSD10:~ # However, if I snmpwalk this host, then it does not reply to SNMP messages. Content of /etc/snmpd.config can be seen below: root@FreeBSD10:~ # grep -v '^#' /etc/snmpd.config | grep -vE '^$' location := "Room 200" contact := "sysmeis...@example.com" system := 1 # FreeBSD traphost := localhost trapport := 162 read := "public" write := "geheim" trap := "mytrap" NoAuthProtocol := 1.3.6.1.6.3.10.1.1.1 HMACMD5AuthProtocol := 1.3.6.1.6.3.10.1.1.2 HMACSHAAuthProtocol := 1.3.6.1.6.3.10.1.1.3 NoPrivProtocol := 1.3.6.1.6.3.10.1.2.1 DESPrivProtocol := 1.3.6.1.6.3.10.1.2.2 AesCfb128Protocol := 1.3.6.1.6.3.10.1.2.4 securityModelAny:= 0 securityModelSNMPv1 := 1 securityModelSNMPv2c:= 2 securityModelUSM:= 3 MPmodelSNMPv1 := 0 MPmodelSNMPv2c := 1 MPmodelSNMPv3 := 3 noAuthNoPriv := 1 authNoPriv := 2 authPriv := 3 %snmpd begemotSnmpdDebugDumpPdus = 2 begemotSnmpdDebugSyslogPri = 7 begemotSnmpdCommunityString.0.1 = $(read) begemotSnmpdCommunityDisable= 1 begemotSnmpdPortStatus.0.0.0.0.161 = 1 begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1 begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4 begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4 begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2 begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap) sysContact = $(contact) sysLocation = $(location) sysObjectId = 1.3.6.1.4.1.12325.1.1.2.1.$(system) snmpEnableAuthenTraps = 2 begemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.so" root@FreeBSD10:~ # If I use this very same configuration file with bsnmpd("bsnmpd -d -c /etc/snmpd.config"), then host does reply to SNMP queries. What might cause such behavior? Please let me know if additional information is needed. thanks, Martin -- ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd Duplicate IPv4 address detected
Hi, I have problem when starting snmpd deamon on debian. My snmpd version 5.7.2.1+dfsg-1. After starting snmpd daemon snmpd uses 96% of cpu all the time. I can't snmpwalk server. In logs i see: snmpd[5087]: Duplicate IPv4 address detected, some interfaces may not be visible in IP-MIB snmpd[5141]: IfIndex of an interface changed. Such interfaces will appear multiple times in IF-MIB. I think that duplicate error is related to ppp interfaces. I have around 800 ppp interfaces on server. Anyone face similar problem ? Is there any way to solve that ? appreciate any help Regards lukas -- ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Snmpd blind scan on different subnet
More information, I can query the moved computer directly like this: > snmpwalk -v 1 -c public 192.168.1.4 sysUpTime > And have this result: > DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (528183) 1:28:01.83 > But still can't discover the machine via > snmpwalk -v 1 -c public localhost ip > What's wrong here? Rgs PS: Sorry for the duplicated messages, Jurkiewicz , I forgot to reply to the mail list. On Fri, Jul 31, 2015 at 10:34 AM, Tien To Tran wrote: > More information, I can query the moved computer directly like this: > >> snmpwalk -v 1 -c public 192.168.1.4 sysUpTime >> > > And have this result: > >> DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (528183) 1:28:01.83 >> > But still can't discover the machine via > >> snmpwalk -v 1 -c public localhost ip >> > What's wrong here? > > Rgs > Tien > > On Thu, Jul 30, 2015 at 10:13 PM, Tien To Tran > wrote: > >> Hi, I can ping the moved computer and firewall is off. >> >> Rgs >> Tien >> > > -- ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users