Mac OSX 10.3.8, Tomcat 5.5.7, IntelliJ 4.5.4 problem

Dear All,

I can stop and start Tomcat no problem from Terminal (after sudo sh) as described at http://developer.apple.com/internet/java/tomcat1.html.

Note that I configured Tomcat to serve on port 80, not 8080, in server.xml.

However, when I try to start it in IntelliJ, I get the errors shown at the end of this post. I configured IntelliJ as described in IntelliJ help (Run -> Edit Configurations -> etc), with the default startup and shutdown script (I don't have any environment variables defined). Then I just chose Run and clicked the Run button.

Here are the errors: can anyone tell me how to get this to work? TMIA, /r:b:


/usr/local/jakarta-tomcat-5.5.7/bin/catalina.sh run
Using CATALINA_BASE: /Users/richardbondi/Library/Caches/IntelliJ IDEA/tomcat_local_f06387f8
Using CATALINA_HOME: /usr/local/jakarta-tomcat-5.5.7
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-5.5.7/temp
Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Home
Created MBeanServer with ID: 4e28b:102a911b591:-8000:Richard-Bondis-iBook.local:1
Mar 15, 2005 8:54:35 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Permission denied:80
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)
at org.apache.catalina.connector.Connector.initialize(Connector.java:918)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
at org.apache.catalina.startup.Catalina.load(Catalina.java:509)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)
Mar 15, 2005 8:54:35 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.BindException: Permission denied:80
at org.apache.catalina.connector.Connector.initialize(Connector.java:920)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
at org.apache.catalina.startup.Catalina.load(Catalina.java:509)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)
Mar 15, 2005 8:54:35 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2603 ms
Mar 15, 2005 8:54:36 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 15, 2005 8:54:36 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
Mar 15, 2005 8:54:36 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Mar 15, 2005 8:54:38 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: , , ]
Mar 15, 2005 8:54:40 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Mar 15, 2005 8:54:40 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Mar 15, 2005 8:54:42 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Mar 15, 2005 8:54:42 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Mar 15, 2005 8:54:43 PM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.net.BindException: Permission denied:80
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:312)
at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:181)
at org.apache.catalina.connector.Connector.start(Connector.java:990)
at org.apache.catalina.core.StandardService.start(StandardService.java:459)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Mar 15, 2005 8:54:43 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException: Protocol handler start failed: java.net.BindException: Permission denied:80
at org.apache.catalina.connector.Connector.start(Connector.java:992)
at org.apache.catalina.core.StandardService.start(StandardService.java:459)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Mar 15, 2005 8:54:43 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7523 ms
Mar 15, 2005 8:54:43 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
at java.net.ServerSocket.bind(ServerSocket.java:318)
at java.net.ServerSocket.]]>(ServerSocket.java:185)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:346)
at org.apache.catalina.startup.Catalina.await(Catalina.java:600)
at org.apache.catalina.startup.Catalina.start(Catalina.java:560)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)

2 comments
Comment actions Permalink

On 2005-03-16 02:57:38 +0100, Richard Bondi <no_mail@jetbrains.com> said:

Dear All,

I can stop and start Tomcat no problem from Terminal (after sudo sh) as
described at http://developer.apple.com/internet/java/tomcat1.html.
Note that I configured Tomcat to serve on port 80, not 8080, in server.xml.


you need to have sudo/root permissions on the mac to access port 80
(and other lower system ports).


Oliver

0
Comment actions Permalink

On Wed, 16 Mar 2005 04:57:38 +0300, Richard Bondi wrote:

[I don't use a Mac but I don't think there's anything Mac-specific going
on here]

I can stop and start Tomcat no problem from Terminal (after sudo sh)

Note that I configured Tomcat to serve on port 80, not 8080, in server.xml.

java.net.BindException: Permission denied:80


Because you're launching Tomcat as a non-root user.

You could prepend the default startup commands with 'sudo ' and make sure
you've run sudo externally before starting Tomcat (taking advantage of the
fact that sudo is usually configured not to prompt for a password for some
period of time after the password was last provided), or edit the sudoers
file and set the timestamp_timeout value to something appropriate.

Or just stick with a non-privileged port.

--
Mark Scott
mark@codebrewer.com

0

Please sign in to leave a comment.