| Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 09/12/2009 18:07:55
|
craig
Knight
Joined: 06/08/2007 16:50:46
Messages: 113
Offline
|
This is an FYI
I transferred a mango installation to a new host (and from windows to linux) and found that none of the SNMP Data sources would work.
Code:
'SNMP Datasource Name': java.net.BindException: Permission denied
editing /etc/modprobe.d/aliases so that
Code:
becomes
Code:
disabled IPV6 and fixed the problem
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 09/12/2009 18:30:20
|
mlohbihler
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 899
Online
|
Did you try setting the preferred Java stack? I believe this is the option:
Code:
-Djava.net.preferIPv4Stack=false
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 09/12/2009 19:32:41
|
craig
Knight
Joined: 06/08/2007 16:50:46
Messages: 113
Offline
|
Ah nope, didn't know the option existed.
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 10/12/2009 03:36:04
|
narenblr
Padawan
Joined: 06/10/2009 01:17:36
Messages: 28
Location: Bangalore, India
Offline
|
Also remember < 1024 ports on UNIX/Linux are privilidged ports and can be run only as root or by Xinetd. Hence, you should run mango as root and not as an ordinary user.
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 10/12/2009 13:47:49
|
craig
Knight
Joined: 06/08/2007 16:50:46
Messages: 113
Offline
|
narenblr wrote:
Also remember < 1024 ports on UNIX/Linux are privilidged ports and can be run only as root or by Xinetd. Hence, you should run mango as root and not as an ordinary user.
Yep upon further investigation I still seem to be getting the error. I think before it gave that error because it couldn't bind to the port and SNMP poll didn't work because of the IPV6 issue.
Now mango can poll the SNMP data sources since I've disabled IPV6 but is still giving the BindException because it can't listen. I'm not using SNMP traps, just poll, so mango shouldn't need to bind to any low port numbers.
I won't be running any webapp as root
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 10/12/2009 14:20:38
|
mlohbihler
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 899
Online
|
I'm not using SNMP traps, just poll, so mango shouldn't need to bind to any low port numbers.
SNMP is UDP, so you'll always be listener binding even if you're not using traps.
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 10/12/2009 14:26:31
|
craig
Knight
Joined: 06/08/2007 16:50:46
Messages: 113
Offline
|
gotcha. but shouldn't need to bind to port 162 if not using traps right?
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 10/12/2009 14:34:27
|
mlohbihler
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 899
Online
|
Not to 162, no. But 161 is the default port for other SNMP traffic, and since the data source is UDP it needs to bind to a port as a listener to get responses. If you didn't change from the default of 161 and you're not running as root, this would explain why you get a permission exception on Linux when you didn't get one under Windows.
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 10/12/2009 16:03:02
|
craig
Knight
Joined: 06/08/2007 16:50:46
Messages: 113
Offline
|
netstat -anutp reveals one listening UDP port per SNMP data source, but not port 161
If I disable an SNMP data source and re-enable it, I get the BindException. If I reboot the server I get the BindException but the data source still seems to update.
None of this is critical for me, I'll let you know how it pans out.
Code:
udp 0 0 0.0.0.0:36751 0.0.0.0:* 10106/java
udp 0 0 0.0.0.0:33301 0.0.0.0:* 10106/java
udp 0 0 0.0.0.0:39594 0.0.0.0:* 10106/java
udp 0 0 0.0.0.0:60990 0.0.0.0:* 10106/java
udp 0 0 0.0.0.0:34119 0.0.0.0:* 10106/java
udp 0 0 0.0.0.0:39881 0.0.0.0:* 10106/java
udp 0 0 0.0.0.0:34009 0.0.0.0:* 10106/java
udp 0 0 0.0.0.0:48879 0.0.0.0:* 10106/java
udp 0 0 0.0.0.0:42866 0.0.0.0:* 10106/java
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 10/12/2009 17:22:41
|
craig
Knight
Joined: 06/08/2007 16:50:46
Messages: 113
Offline
|
Since I'm not using traps I changed the trap port in SNMP datasource settings to a large port number and no longer get the BindException.
If I were using traps I think I'd do some port translation on the firewall so that incoming UDP port 162 packets were sent to a higher port on the mango instance
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 10/12/2009 18:00:09
|
mlohbihler
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 899
Online
|
Ah, right. The data source will listen for traps in any case. You can always just change the port number from 162 to, say 50162.
|
Best regards,
Matthew Lohbihler |
|
|
 |
|
|