0

How do I avoid the UnknownHostException in this line:

TransportMapping transport = new DefaultUdpTransportMapping();

I use the SNMP4J 2.2.0 API and use multiple threads (one thread for each switch)

Lex Li
  • 60,503
  • 9
  • 116
  • 147
Thorsten Niehues
  • 13,712
  • 22
  • 78
  • 113

1 Answers1

0

OK I got this fixed by calling

TransportMapping transport = new DefaultUdpTransportMapping();

only once for each thread. With 50 threads it still works fine.

My guess is that the networkIf / OS / Java was out of available ports

Thorsten Niehues
  • 13,712
  • 22
  • 78
  • 113