facebook

Mac: Run Tomcat as root?

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #312540 Reply

    Seldon Systems
    Participant

    Hi,

    I’m using MyEclipse 8.6 on Mac OS X 10.6. My web application wants to listen to incoming SNMP requests (UDP port 162). Now when running inside Tomcat in MyEclipse, the port binding fails, and I get the following exception, probably because only the UNIX root user can access ports < 1024:

     java.net.BindException: Permission denied
        at java.net.PlainDatagramSocketImpl.bind0(Native Method)
        at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
        at java.net.DatagramSocket.bind(DatagramSocket.java:372)
        at java.net.DatagramSocket.<init>(DatagramSocket.java:211)
        at java.net.DatagramSocket.<init>(DatagramSocket.java:262)
        at java.net.DatagramSocket.<init>(DatagramSocket.java:235)

    Now I already run MyEclipse as root (launched from a terminal window with “sudo open”), but I can’t seem to get the JVM for Tomcat to run as root, either. When I launch Tomcat manually from a terminal as root (“sudo ./startup.sh”) then the app works just fine, and the port binding works.

    So, how can I make Tomcat run with “sudo” in MyEclipse on the Mac?

    Karsten

    #312703 Reply

    Scott Anderson
    Participant

    This message has not been recovered.

    #312707 Reply

    Seldon Systems
    Participant

    This message has not been recovered.

    #312711 Reply

    Scott Anderson
    Participant

    This message has not been recovered.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Mac: Run Tomcat as root?

You must be logged in to post in the forum log in