There can be several reasons why a is thrown when initializing a TransportMapping for listening on traps or incoming SNMP requests:

  1. The port is 161 or 162 (or any other port below 1024) on an Unix system. Then you need to run your application/agent with root privileges to be able to bind that port.
  2. The port is already used by another application.
  3. The address does not belong to the local host. For example, if the local host has interfaces with address (local loop), (eth0), and (eth1) then you will get a bind exception when trying to init a transport mapping on In most cases, using<port> is the best choice. This special address binds all available local interfaces.