My agent terminates because status = -21
Kjersti Grønnevik
kgr____morecom.no
Wed Apr 3 16:39:43 CEST 2002
Hi
My agent terminates right after I have started it because the status = -21.
What can be possible causes and solutions to this?
Hope this is understandable and thanks so much for great help so far!
Best regards,
Kjersti
Here is some of my code:
int main (int argc, char* argv[])
{
if (argc>1)
port = atoi(argv[1]);
else
port = 4700; //the 161 port is taken
Log::initLog("snmp.log", "snmpagent", 15, 20000);
int status;
Snmpx snmp(status, port); // Here I get status = -21
if (status == SNMP_CLASS_SUCCESS)
{
LOG_BEGIN(Log::INFO, LOC);
LOG("main: SNMP listen port");
LOG(port);
LOG_END;
}
else {
LOG_BEGIN(Log::ERROR, LOC);
LOG("main: SNMP port init failed");
LOG(status);
LOG_END;
exit(1);
}
More information about the AGENTPP
mailing list