while recieving snmptrap on linux system...every thing working fine,but in windows server & XP I am getting Could not format log-string
.Anyone please help me to solve this problem.
I am using Net-SNMP-5.6.1.1 for windows server.
Thanks in Advance
Asked
Active
Viewed 557 times
0

Gaurav
- 91
- 1
- 4
- 14
1 Answers
0
This is because of supplied snprintf()
is used instead of sprintf()
as it does limit checks
for string length. or because of Void debugmsg_hex(const char *token, const u_char * thedata, size_t len)
which can accept no longer than LOGLENGTH==1024
.
Resolve:
verify snmp_logging.c
and remove checks.
CODE
what is complete error message. I need the printed code.

Grijesh Chauhan
- 57,103
- 20
- 141
- 208
-
Hi Grijesh ,I am actually viewing this message in Event-Viewer,& its only showing "Could not format log-string".. – Gaurav Dec 13 '12 at 12:42
-
In `logging.c` there is a macro `LOGLENGTH` increase it size , recompile and run ..otherwise disable debug mode. – Grijesh Chauhan Dec 13 '12 at 12:50
-
Try with this option `snmptrab -Dmib_init -H ..` – Grijesh Chauhan Dec 13 '12 at 12:55
-
Hi Grijesh,sorry for being late...I will do it..anyways, Thankyou very much for your kindly effort.will you please check out this link ..http://serverfault.com/questions/458338/server-ip-address-is-not-getting-displayed-in-snmp-trap-messages .I am desperately looking around for its answer but don't getting...Will you be please help me out to solve this problem, looking for your kindly help – Gaurav Dec 15 '12 at 12:59
-
sorry I have no idea on this ...I can give an e-mail-id where you can ask this issue. – Grijesh Chauhan Dec 15 '12 at 13:15
-
k...It would be appreciating if u can provide it..looking forward to it. – Gaurav Dec 15 '12 at 13:27
-
Here I used to ask my queries and got response too. `net-snmp-coders@lists.sourceforge.net, Niels Baggesen
` – Grijesh Chauhan Dec 15 '12 at 13:30 -
Hi Grijesh!! Would you please tell me about the location of {snmp_logging.c } .I searched a lot but didn't find it out .Thank you – Gaurav Dec 26 '12 at 11:02
-
@Gaurav Hi Gaurav, the file path is `/net-snmp-5.7.1/snmplib/snmp_logging.c` – Grijesh Chauhan Dec 27 '12 at 06:03
-
but I have download 5.6.1.1 version of net-snmp(binary file) .& it does not contain any snmplib folder – Gaurav Dec 27 '12 at 06:10
-
At the time of installation,I got only /usr folder. – Gaurav Dec 27 '12 at 06:12
-
Oh! really?...be sure that you have not made any mistake. are you in Linux or windows? – Grijesh Chauhan Dec 27 '12 at 06:13
-
yes ......Windows Server 2008 Machine.On Linux its working fine ,means I am getting the traps perfectly(on Linux I am using 5.5 version) – Gaurav Dec 27 '12 at 06:19
-
What I am thinking is, that you are talking about Source files,while I am using .exe(binary file) of 6.1.1 version of Net-Snmp for installation .What would I have to do now?? – Gaurav Dec 27 '12 at 06:24
-
And have you done the Net-Snmp Installation by compiling the source folder (not through Binary File) ? If Yes..then please give me some hint.Because I don't have any idea – Gaurav Dec 27 '12 at 06:38
-
Yes I am commenting about source files. You can download source file and compile them manually. I think.,Specially If you want to develop over net-snmp. – Grijesh Chauhan Dec 27 '12 at 06:38
-
Yes I compiled first then installed myself explicitly. There is a README file. steps are clearly written in which. first run `./configure` then `make`. – Grijesh Chauhan Dec 27 '12 at 06:39
-
Get instructions from [**web-page**](http://net-snmp.sourceforge.net/docs/INSTALL.html) also. – Grijesh Chauhan Dec 27 '12 at 06:42
-
Ok then ..THANK YOU,Once Again – Gaurav Dec 27 '12 at 06:53
-
Yes off-course ...we have to remove. otherwise how would you update? – Grijesh Chauhan Dec 27 '12 at 07:11
-
let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/21742/discussion-between-gaurav-and-grijesh-chauhan) – Gaurav Dec 27 '12 at 07:12