Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have Amazon's own prepackaged instance with Tomcat7 ( i-a23e4ac2 ). Got a war file uploaded to webapps, in Server.xml connector is set to listen on port 80.

Default security group settings are:

ALL sg-07787e6e (default)
TCP
Port (Service)  Source  Action
0 - 65535   sg-07787e6e (default)
80 (HTTP)   0.0.0.0/0   
22 (SSH)    70.126.98.72/32 
UDP
Port (Service)  Source  Action
0 - 65535   sg-07787e6e (default)

I have an elastic ip associated with the instance.

... and I can't get any positive results with that.

Here's what logs are showing:

stacktrace.log (in tomcat7 )
2011-10-02 13:40:11,840 stop children - Catalina:j2eeType=WebModule,name=//localhost/RemoteSupportWizard-0.1,J2EEApplication=none,J2EEServer=none ERROR StackTrace - Full Stack Trace:
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:172)
at org.springframework.context.support.AbstractApplicationContext.containsBean(AbstractApplicationContext.java:1109)
at org.codehaus.groovy.grails.web.context.GrailsContextLoader$1.run(GrailsContextLoader.java:88)
at org.codehaus.groovy.grails.lifecycle.ShutdownOperations.runOperations(ShutdownOperations.java:62)
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.closeWebApplicationContext(GrailsContextLoader.java:136)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:142)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4763)
at org.apache.catalina.core.StandardContext$4.run(StandardContext.java:5473)
at java.lang.Thread.run(Thread.java:636)
2011-10-02 13:40:11,842 stop children - Catalina:j2eeType=WebModule,name=//localhost/RemoteSupportWizard-0.1,J2EEApplication=none,J2EEServer=none ERROR StackTrace - Full Stack Trace:
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
at java.lang.Thread.run(Thread.java:636)

tail_catalina.log:

SEVERE: Failed to initialize end point associated with ProtocolHandler 
java.net.BindException: Permission denied <null>:80
Browser: 

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Apache/2.2.16 (Amazon) Server at 107.20.253.141 Port 80

Any suggestions will be most appreciated.

Should I try a different instance? For some reason I thought using a prepackaged instance would make deployment a lot easier.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Only root is allowed to bind on ports lower than 1024. Either run tomcat as root or let it listen on a port >1024. Then use an iptables firewall rule to map the upper port to port 80.

share|improve this answer
    
I would consider it a bad practice to run Tomcat as root. –  Corey S. Oct 2 '11 at 14:50
    
@CoreyS. Me too. But it is a valid option. –  mailq Oct 2 '11 at 15:00
    
... so what would be a better (proper) option? Port >1024 and ip tables? By the way, I din't have any luck running it on port 8080 either. –  vector Oct 2 '11 at 15:07
    
As I said: serverfault.com/questions/155275/… –  mailq Oct 2 '11 at 15:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.