You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Scott Anderson <sc...@gmail.com> on 2005/04/20 01:21:10 UTC

Geronimo fails on startup when Jetty port set to 80

I went into modules/assembly/src/plan/j2ee-server-plan.xml and changed 
the Jetty port from 8080 to 80, rebuilt the assembly module, and got the 
following when I tried to start the server...

16:04:25,336 INFO  [Container] Started 
org.apache.geronimo.jetty.JettyServer@4eb043
16:04:25,439 ERROR [GBeanInstance] Problem in doFail of 
geronimo.server:name=JettyWebConnector,J2EEServer=geronimo,J2EEApplication=null,j2eeType=GBean,J2EEModule=org/apache/geronimo/Server
java.lang.NullPointerException
        at org.mortbay.util.ThreadedServer.stop(ThreadedServer.java:544)
        at org.mortbay.http.SocketListener.stop(SocketListener.java:211)
        at 
org.apache.geronimo.jetty.connector.JettyConnector.doFail(JettyConnector.java:90)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:860)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:331)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:477)
        at 
org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullStart(GBeanSingleReference.java:149)
        at 
org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(GBeanSingleReference.java:124)
        at 
org.apache.geronimo.gbean.runtime.AbstractGBeanReference.addTarget(AbstractGBeanReference.java:244)
        at 
org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(GBeanSingleReference.java:158)
        at 
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:153)
        at 
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:36)
        at 
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:229)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:354)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:133)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:494)
        at 
org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:141)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:494)
        at 
org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
        at org.apache.geronimo.system.main.Daemon.main(Daemon.java:185)
16:04:25,447 ERROR [GBeanInstanceState] Error while starting; GBean is 
now in the FAILED state: 
objectName="geronimo.server:name=JettyWebConnector,J2EEServer=geronimo,J2EEApplication=null,j2eeType=GBean,J2EEModule=org/apache/geronimo/Server"
java.net.BindException: Permission denied
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at 
org.mortbay.util.ThreadedServer.newServerSocket(ThreadedServer.java:391)
        at org.mortbay.util.ThreadedServer.open(ThreadedServer.java:477)
        at 
org.apache.geronimo.jetty.connector.JettyConnector.doStart(JettyConnector.java:71)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:841)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:331)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:477)
        at 
org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullStart(GBeanSingleReference.java:149)
        at 
org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(GBeanSingleReference.java:124)
        at 
org.apache.geronimo.gbean.runtime.AbstractGBeanReference.addTarget(AbstractGBeanReference.java:244)
        at 
org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(GBeanSingleReference.java:158)
        at 
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:153)
        at 
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:36)
        at 
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:229)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:354)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:133)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:494)
        at 
org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:141)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:494)
        at 
org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
        at org.apache.geronimo.system.main.Daemon.main(Daemon.java:185)
16:04:25,448 WARN  [GBeanSingleReference] Exception occured while 
attempting to fully start: 
objectName=geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Server,J2EEServer=geronimo,j2eeType=GBean,name=JettyWebConnector
java.lang.IllegalStateException: Cannot transition to running state from 
failed
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.setStateInstance(GBeanInstanceState.java:497)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:353)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:477)
        at 
org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullStart(GBeanSingleReference.java:149)
        at 
org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(GBeanSingleReference.java:124)
        at 
org.apache.geronimo.gbean.runtime.AbstractGBeanReference.addTarget(AbstractGBeanReference.java:244)
        at 
org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(GBeanSingleReference.java:158)
        at 
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:153)
        at 
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:36)
        at 
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:229)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:354)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:133)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:494)
        at 
org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:141)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:494)
        at 
org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
        at org.apache.geronimo.system.main.Daemon.main(Daemon.java:185)
16:04:25,529 INFO  [HOWLLog] Initiating transaction manager recovery
16:04:25,565 WARN  [HOWLLog] Received unexpected log record: 
org.objectweb.howl.log.xa.XALogRecord@b6ef8
16:04:25,565 INFO  [HOWLLog] In doubt transactions recovered from log

I ran into the above failure on OS X (10.3.9)/JDK 1.4.2 as well as on 
Fedora Core 3/JDK 1.5.

I am also interested in testing whether Geronimo/Jetty can work with 
Apache 1.3 or 2.0 using mod_jk...

    http://jetty.mortbay.org/jetty/faq?s=700-Clustering&t=modjk

If anyone has tried this, I'd appreciate hearing if it worked and if 
there were any gotchas that I would need to account for.

Scott

Re: Geronimo fails on startup when Jetty port set to 80

Posted by si...@insession.com.
Scott,

FYI.. AFAIK, the development of the JK2 connector has been discontinued 
(see announcment on 15 Nov 2004 in 
http://jakarta.apache.org/tomcat/connectors-doc/index.html )

So it might be safer to stick with the JK connector.

John

Scott Anderson <po...@gmail.com> wrote on 26/04/2005 08:02:36 AM:

> 
> Jeremy Boynes wrote:
> 
> >
> > It has been a while but I think it may be using tomcat_home to find 
> > the properties files - you would just need to set it to the right 
> > location but may not need to actually have a full install of Tomcat 
> > there.
> >
> 
> It appears that it does not matter what the tomcat_home property is set 
> to...at least not for my OS X/Apache 1.3 installation. I did not test if 

> removing the property made any difference.
> 
> Connecting  Apache 1.3 to Geronimo on OS X was straight forward. The 
> httpd.conf additions and the workers.properties file worked as 
advertised...
> 
> --- begin /private/etc/httpd/httpd.conf additions ---
> 
> LoadModule    jk_module  libexec/mod_jk.so
> AddModule     mod_jk.c
> JkWorkersFile /private/etc/httpd/workers.properties
> JkLogFile     /private/var/log/httpd/mod_jk.log
> JkLogLevel    info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y]
> 
> JkMount /context_path/* ajp13
> 
> --- end /private/etc/httpd/httpd.conf additions ---
> 
> --- begin /private/etc/httpd/workers.properties ---
> 
> workers.tomcat_home=/tomcat
> workers.java_home=/Library/Java/Home
> ps=/
> worker.list=ajp13
> worker.ajp13.port=8009
> worker.ajp13.host=localhost
> worker.ajp13.type=ajp13
> 
> --- end /private/etc/httpd/workers.properties ---
> 
> I found a mod_jk.so binary for OS X using google and installed it at 
> /usr/libexec/httpd/mod_jk.so. After restarting httpd, the connection to 
> Geronimo was good to go.
> 
> 
> Unfortunately my experience with installing the mod_jk2 connector on 
> Apache 2 / Fedora Core 3 did not go as smoothly. I was planning on rely 
> on information from the Jetty web site...
> 
>    http://jetty.mortbay.org/jetty/faq?s=700-Clustering&t=modjk
> 
> ...but soon found that this information was out of date. The "native" 
> ant target does not exist. I'd think it would be a very useful usability 

> enhancement for Geronimo to have something like what Jetty once 
provided.
> 
> Anyway, after some further research I found an RPM for installing 
> mod_jk2 for Fedora Core 3 and figured out the httpd.conf additions and 
> what needs to be in the workers2.properties file...
> 
> --- begin /etc/httpd/conf/httpd.conf additions ---
> 
> LoadModule    jk2_module modules/mod_jk2.so
> 
> --- end /etc/httpd/conf/httpd.conf additions ---
> 
> The above directive could also be added to a file within the 
> /etc/httpd/conf.d/ directory. The workers2.properties file is assumed to 

> be located in the /etc/httpd/conf/ directory therefore no specification 
> of its location was required. There seems to be a directive that might 
> support a different location for this file, but I could not get it to 
> work...
> 
>    JkSet config.file /etc/httpd/conf/workers2.properties
> 
> --- begin /etc/httpd/conf/workers2.properties ---
> 
> [logger]
> level=DEBUG
> 
> [config:]
> file=${serverRoot}/httpd/conf/workers2.properties
> debug=0
> debugEnv=0
> 
> [uriMap:]
> info=Maps the requests. Options: debug
> debug=0
> 
> # Alternate file logger
> [logger.file:0]
> level=DEBUG
> file=${serverRoot}/logs/jk2.log
> 
> [shm:]
> info=Scoreboard. Required for reconfiguration and status with 
> multiprocess servers
> file=${serverRoot}/logs/jk2.shm
> size=1000000
> debug=0
> disabled=0
> 
> [workerEnv:]
> info=Global server options
> timing=1
> debug=0
> # Default Native Logger (apache2 or win32 )
> # can be overriden to a file logger, useful
> # when tracing win32 related issues
> #logger=logger.file:0
> 
> [lb:lb]
> info=Default load balancer.
> debug=0
> 
> [channel.socket:localhost:8009]
> info=Ajp13 forwarding over socket
> debug=0
> port=8009
> host=127.0.0.1
> 
> [ajp13:localhost:8009]
> channel=channel.socket:localhost:8009
> group=lb
> 
> [uri:/context_path/*]
> group=lb
> 
> [status:]
> info=Status worker, displays runtime informations
> 
> [uri:/jkstatus/*]
> info=Display status information and checks the config file for changes.
> group=status:
> 
> --- end /etc/httpd/workers2.properties ---
> 
> I added the mod_jk2.so binary I found on Google to the 
> /etc/httpd/modules/ directory and it worked.
> 
> Scott
> 
> 
> ---
> 
> Jeremy Boynes wrote:
> 
> > Scott Anderson wrote:
> >
> >>
> >> For a workers.properties file that might work with Geronimo/Jetty I 
> >> found...
> >>
> >> workers.tomcat_home=/usr/local/jakarta-tomcat
> >> workers.java_home=/usr/java
> >> ps=/
> >> worker.list=ajp13
> >> worker.ajp13.port=8009
> >> worker.ajp13.host=localhost
> >> worker.ajp13.type=ajp13
> >> 
> >
> >
> > It has been a while but I think it may be using tomcat_home to find 
> > the properties files - you would just need to set it to the right 
> > location but may not need to actually have a full install of Tomcat 
> > there.
> >
> > -- 
> > Jeremy
> >
> 

Re: Geronimo fails on startup when Jetty port set to 80

Posted by Scott Anderson <po...@gmail.com>.
Jeremy Boynes wrote:

>
> It has been a while but I think it may be using tomcat_home to find 
> the properties files - you would just need to set it to the right 
> location but may not need to actually have a full install of Tomcat 
> there.
>

It appears that it does not matter what the tomcat_home property is set 
to...at least not for my OS X/Apache 1.3 installation. I did not test if 
removing the property made any difference.

Connecting  Apache 1.3 to Geronimo on OS X was straight forward. The 
httpd.conf additions and the workers.properties file worked as advertised...

--- begin /private/etc/httpd/httpd.conf additions ---

LoadModule    jk_module  libexec/mod_jk.so
AddModule     mod_jk.c
JkWorkersFile /private/etc/httpd/workers.properties
JkLogFile     /private/var/log/httpd/mod_jk.log
JkLogLevel    info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]

JkMount /context_path/* ajp13

--- end /private/etc/httpd/httpd.conf additions ---

--- begin /private/etc/httpd/workers.properties ---

workers.tomcat_home=/tomcat
workers.java_home=/Library/Java/Home
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13

--- end /private/etc/httpd/workers.properties ---

I found a mod_jk.so binary for OS X using google and installed it at 
/usr/libexec/httpd/mod_jk.so. After restarting httpd, the connection to 
Geronimo was good to go.


Unfortunately my experience with installing the mod_jk2 connector on 
Apache 2 / Fedora Core 3 did not go as smoothly. I was planning on rely 
on information from the Jetty web site...

   http://jetty.mortbay.org/jetty/faq?s=700-Clustering&t=modjk

...but soon found that this information was out of date. The "native" 
ant target does not exist. I'd think it would be a very useful usability 
enhancement for Geronimo to have something like what Jetty once provided.

Anyway, after some further research I found an RPM for installing 
mod_jk2 for Fedora Core 3 and figured out the httpd.conf additions and 
what needs to be in the workers2.properties file...

--- begin /etc/httpd/conf/httpd.conf additions ---

LoadModule    jk2_module modules/mod_jk2.so

--- end /etc/httpd/conf/httpd.conf additions ---

The above directive could also be added to a file within the 
/etc/httpd/conf.d/ directory. The workers2.properties file is assumed to 
be located in the /etc/httpd/conf/ directory therefore no specification 
of its location was required. There seems to be a directive that might 
support a different location for this file, but I could not get it to 
work...

   JkSet config.file /etc/httpd/conf/workers2.properties

--- begin /etc/httpd/conf/workers2.properties ---

[logger]
level=DEBUG

[config:]
file=${serverRoot}/httpd/conf/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

# Alternate file logger
[logger.file:0]
level=DEBUG
file=${serverRoot}/logs/jk2.log

[shm:]
info=Scoreboard. Required for reconfiguration and status with 
multiprocess servers
file=${serverRoot}/logs/jk2.shm
size=1000000
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0
# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues
#logger=logger.file:0

[lb:lb]
info=Default load balancer.
debug=0

[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
debug=0
port=8009
host=127.0.0.1

[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
group=lb

[uri:/context_path/*]
group=lb

[status:]
info=Status worker, displays runtime informations

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

--- end /etc/httpd/workers2.properties ---

I added the mod_jk2.so binary I found on Google to the 
/etc/httpd/modules/ directory and it worked.

Scott


---

Jeremy Boynes wrote:

> Scott Anderson wrote:
>
>>
>> For a workers.properties file that might work with Geronimo/Jetty I 
>> found...
>>
>> workers.tomcat_home=/usr/local/jakarta-tomcat
>> workers.java_home=/usr/java
>> ps=/
>> worker.list=ajp13
>> worker.ajp13.port=8009
>> worker.ajp13.host=localhost
>> worker.ajp13.type=ajp13
>>  
>
>
> It has been a while but I think it may be using tomcat_home to find 
> the properties files - you would just need to set it to the right 
> location but may not need to actually have a full install of Tomcat 
> there.
>
> -- 
> Jeremy
>


Re: Geronimo fails on startup when Jetty port set to 80

Posted by Jeremy Boynes <jb...@apache.org>.
Scott Anderson wrote:
> 
> For a workers.properties file that might work with Geronimo/Jetty I 
> found...
> 
> workers.tomcat_home=/usr/local/jakarta-tomcat
> workers.java_home=/usr/java
> ps=/
> worker.list=ajp13
> worker.ajp13.port=8009
> worker.ajp13.host=localhost
> worker.ajp13.type=ajp13
>  

It has been a while but I think it may be using tomcat_home to find the 
properties files - you would just need to set it to the right location 
but may not need to actually have a full install of Tomcat there.

--
Jeremy

Re: Geronimo fails on startup when Jetty port set to 80

Posted by Scott Anderson <po...@gmail.com>.
Jeremy Boynes wrote:

> [...]

>> It looks like the least intrusive route that I could provide 
>> documentation for would be to get Geronimo working with Apache using 
>> mod_jk.
>>
>
> That should work - you should just need to change the listener to use 
> AJP and then configure HTTPD as usual.


By listener do you mean the JettyWebConnector gbean defined in 
j2ee-server-plan.xml?  Do I simply replace the HTTPConnector class 
specified in the gbean descriptor with AJP13Connector?

As far as configuring httpd goes it appears that I am going to need to 
add support in httpd.conf for a workers.properties file for Apache 1.3 
and a workers2.properties file for Apache 2. Here's what I found for 
httpd.conf/1.3...

LoadModule    jk_module  libexec/mod_jk.so
AddModule     mod_jk.c
JkWorkersFile /usr/local/jakarta-tomcat/conf/workers.properties
JkLogFile     /usr/local/apache/logs/mod_jk.log
JkLogLevel    info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]
  

I also will need to configure in httpd.conf some JkMount entries in a 
VirtualHost to use ajp13.

For a workers.properties file that might work with Geronimo/Jetty I found...

workers.tomcat_home=/usr/local/jakarta-tomcat
workers.java_home=/usr/java
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
  

I am assuming workers.tomcat_home gets ignored when running against 
Geronimo/Jetty. My hope is that I could simply reuse these 
configurations for Geronimo/Tomcat. I ignored the stuff I saw about 
supporting an inprocess JNI connector.

For Apache2 I found the following for httpd.conf...

LoadModule    jk_module  modules/mod_jk.so
AddModule     mod_jk.c
JkWorkersFile /usr/local/jakarta-tomcat/conf/workers2.properties
JkLogFile     /usr/local/apache/logs/mod_jk.log
JkLogLevel    info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]
  

...and there is this on the Jetty web site...

---- workers2.properties

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

# Uri mapping. This says that any incoming connection to any file
# under "/jetty/" should be handled the worker defined above

[uri:/jetty/*]
worker=ajp13:localhost:8009

# The same, but for /demo
[uri:/demo/*]
worker=ajp13:localhost:8009

---- end worker2.properties
  

This seems straight forward. It looks like Apache2/workers2 is enhanced 
with support for routing url patterns to different hosts.

I am going to take a break and then start testing the above on a Mac OS 
X powerbook (Apache 1.3) and a Fedora Core 3 box (Apache 2). I'll report 
back with any successes and/or failures.

Scott

Re: Geronimo fails on startup when Jetty port set to 80

Posted by Jeremy Boynes <jb...@apache.org>.
Scott Anderson wrote:
> 
> David Jencks wrote:
> 
>> isn't this because 80 is a privileged port and you have to be root to  
>> use it?
> 
> 
> Yep. Slipped my mind.
> 
>> I am far from being a sysadmin but I thought the usual practice was 
>> to  set up your firewall to forward to port 8080.
> 
> 
> I'd rather not put myself into the position of having to support my 
> customer's firewall issues. It looks like the least intrusive route that 
> I could provide documentation for would be to get Geronimo working with 
> Apache using mod_jk.
> 

That should work - you should just need to change the listener to use 
AJP and then configure HTTPD as usual.

--
Jeremy

Re: Geronimo fails on startup when Jetty port set to 80

Posted by Scott Anderson <po...@gmail.com>.
David Jencks wrote:

> isn't this because 80 is a privileged port and you have to be root to  
> use it?

Yep. Slipped my mind.

> I am far from being a sysadmin but I thought the usual practice was 
> to  set up your firewall to forward to port 8080.

I'd rather not put myself into the position of having to support my 
customer's firewall issues. It looks like the least intrusive route that 
I could provide documentation for would be to get Geronimo working with 
Apache using mod_jk.

Scott

Re: Geronimo fails on startup when Jetty port set to 80

Posted by David Jencks <da...@yahoo.com>.
isn't this because 80 is a privileged port and you have to be root to  
use it?

I am far from being a sysadmin but I thought the usual practice was to  
set up your firewall to forward to port 8080.

david jencks

On Apr 19, 2005, at 4:21 PM, Scott Anderson wrote:

>
> I went into modules/assembly/src/plan/j2ee-server-plan.xml and changed  
> the Jetty port from 8080 to 80, rebuilt the assembly module, and got  
> the following when I tried to start the server...
>
> 16:04:25,336 INFO  [Container] Started  
> org.apache.geronimo.jetty.JettyServer@4eb043
> 16:04:25,439 ERROR [GBeanInstance] Problem in doFail of  
> geronimo.server: 
> name=JettyWebConnector,J2EEServer=geronimo,J2EEApplication=null,j2eeTyp 
> e=GBean,J2EEModule=org/apache/geronimo/Server
> java.lang.NullPointerException
>        at org.mortbay.util.ThreadedServer.stop(ThreadedServer.java:544)
>        at org.mortbay.http.SocketListener.stop(SocketListener.java:211)
>        at  
> org.apache.geronimo.jetty.connector.JettyConnector.doFail(JettyConnecto 
> r.java:90)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanIns 
> tance.java:860)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(G 
> BeanInstanceState.java:331)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanc 
> eState.java:111)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.jav 
> a:477)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullStart 
> (GBeanSingleReference.java:149)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(GBea 
> nSingleReference.java:124)
>        at  
> org.apache.geronimo.gbean.runtime.AbstractGBeanReference.addTarget(Abst 
> ractGBeanReference.java:244)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(GBeanS 
> ingleReference.java:158)
>        at  
> org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.fireRunningE 
> vent(BasicLifecycleMonitor.java:153)
>        at  
> org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.access$300(B 
> asicLifecycleMonitor.java:36)
>        at  
> org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor$RawLifecycle 
> Broadcaster.fireRunningEvent(BasicLifecycleMonitor.java:229)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(G 
> BeanInstanceState.java:354)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanc 
> eState.java:111)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBe 
> anInstanceState.java:133)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanIns 
> tance.java:494)
>        at  
> org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBe 
> anInstanceState.java:141)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanIns 
> tance.java:494)
>        at  
> org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
>        at org.apache.geronimo.system.main.Daemon.main(Daemon.java:185)
> 16:04:25,447 ERROR [GBeanInstanceState] Error while starting; GBean is  
> now in the FAILED state:  
> objectName="geronimo.server: 
> name=JettyWebConnector,J2EEServer=geronimo,J2EEApplication=null,j2eeTyp 
> e=GBean,J2EEModule=org/apache/geronimo/Server"
> java.net.BindException: Permission denied
>        at java.net.PlainSocketImpl.socketBind(Native Method)
>        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
>        at java.net.ServerSocket.bind(ServerSocket.java:319)
>        at java.net.ServerSocket.<init>(ServerSocket.java:185)
>        at  
> org.mortbay.util.ThreadedServer.newServerSocket(ThreadedServer.java: 
> 391)
>        at org.mortbay.util.ThreadedServer.open(ThreadedServer.java:477)
>        at  
> org.apache.geronimo.jetty.connector.JettyConnector.doStart(JettyConnect 
> or.java:71)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanIns 
> tance.java:841)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(G 
> BeanInstanceState.java:331)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanc 
> eState.java:111)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.jav 
> a:477)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullStart 
> (GBeanSingleReference.java:149)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(GBea 
> nSingleReference.java:124)
>        at  
> org.apache.geronimo.gbean.runtime.AbstractGBeanReference.addTarget(Abst 
> ractGBeanReference.java:244)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(GBeanS 
> ingleReference.java:158)
>        at  
> org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.fireRunningE 
> vent(BasicLifecycleMonitor.java:153)
>        at  
> org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.access$300(B 
> asicLifecycleMonitor.java:36)
>        at  
> org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor$RawLifecycle 
> Broadcaster.fireRunningEvent(BasicLifecycleMonitor.java:229)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(G 
> BeanInstanceState.java:354)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanc 
> eState.java:111)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBe 
> anInstanceState.java:133)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanIns 
> tance.java:494)
>        at  
> org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBe 
> anInstanceState.java:141)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanIns 
> tance.java:494)
>        at  
> org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
>        at org.apache.geronimo.system.main.Daemon.main(Daemon.java:185)
> 16:04:25,448 WARN  [GBeanSingleReference] Exception occured while  
> attempting to fully start:  
> objectName=geronimo.server:J2EEApplication=null,J2EEModule=org/apache/ 
> geronimo/ 
> Server,J2EEServer=geronimo,j2eeType=GBean,name=JettyWebConnector
> java.lang.IllegalStateException: Cannot transition to running state  
> from failed
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.setStateInstance(G 
> BeanInstanceState.java:497)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(G 
> BeanInstanceState.java:353)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanc 
> eState.java:111)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.jav 
> a:477)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullStart 
> (GBeanSingleReference.java:149)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(GBea 
> nSingleReference.java:124)
>        at  
> org.apache.geronimo.gbean.runtime.AbstractGBeanReference.addTarget(Abst 
> ractGBeanReference.java:244)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(GBeanS 
> ingleReference.java:158)
>        at  
> org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.fireRunningE 
> vent(BasicLifecycleMonitor.java:153)
>        at  
> org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.access$300(B 
> asicLifecycleMonitor.java:36)
>        at  
> org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor$RawLifecycle 
> Broadcaster.fireRunningEvent(BasicLifecycleMonitor.java:229)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(G 
> BeanInstanceState.java:354)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanc 
> eState.java:111)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBe 
> anInstanceState.java:133)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanIns 
> tance.java:494)
>        at  
> org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBe 
> anInstanceState.java:141)
>        at  
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanIns 
> tance.java:494)
>        at  
> org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
>        at org.apache.geronimo.system.main.Daemon.main(Daemon.java:185)
> 16:04:25,529 INFO  [HOWLLog] Initiating transaction manager recovery
> 16:04:25,565 WARN  [HOWLLog] Received unexpected log record:  
> org.objectweb.howl.log.xa.XALogRecord@b6ef8
> 16:04:25,565 INFO  [HOWLLog] In doubt transactions recovered from log
>
> I ran into the above failure on OS X (10.3.9)/JDK 1.4.2 as well as on  
> Fedora Core 3/JDK 1.5.
>
> I am also interested in testing whether Geronimo/Jetty can work with  
> Apache 1.3 or 2.0 using mod_jk...
>
>    http://jetty.mortbay.org/jetty/faq?s=700-Clustering&t=modjk
>
> If anyone has tried this, I'd appreciate hearing if it worked and if  
> there were any gotchas that I would need to account for.
>
> Scott
>


Re: Geronimo fails on startup when Jetty port set to 80

Posted by si...@insession.com.
Scott Anderson <sc...@gmail.com> wrote on 20/04/2005 09:21:10 
AM:

> 
> I went into modules/assembly/src/plan/j2ee-server-plan.xml and changed 
> the Jetty port from 8080 to 80, rebuilt the assembly module, and got the 

> following when I tried to start the server...
> 
<SNIP>
> java.net.BindException: Permission denied
>         at java.net.PlainSocketImpl.socketBind(Native Method)
>         at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
>         at java.net.ServerSocket.bind(ServerSocket.java:319)
>         at java.net.ServerSocket.<init>(ServerSocket.java:185)
>         at 
> org.mortbay.util.ThreadedServer.newServerSocket(ThreadedServer.java:391)
>         at org.mortbay.util.ThreadedServer.open(ThreadedServer.java:477)
>         at 
<SNIP>> 
> I ran into the above failure on OS X (10.3.9)/JDK 1.4.2 as well as on 
> Fedora Core 3/JDK 1.5.

Could it be that your userid doesn't have privileges to bind to ports < 
1024?  Try a using a port outside the privileged range and see if it 
works.

John

> 
> I am also interested in testing whether Geronimo/Jetty can work with 
> Apache 1.3 or 2.0 using mod_jk...
> 
>     http://jetty.mortbay.org/jetty/faq?s=700-Clustering&t=modjk
> 
> If anyone has tried this, I'd appreciate hearing if it worked and if 
> there were any gotchas that I would need to account for.
> 
> Scott

This e-mail message and any attachments may contain confidential, 
proprietary or non-public information.  This information is intended 
solely for the designated recipient(s).  If an addressing or transmission 
error has misdirected this e-mail, please notify the sender immediately 
and destroy this e-mail.  Any review, dissemination, use or reliance upon 
this information by unintended recipients is prohibited.  Any opinions 
expressed in this e-mail are those of the author personally.