You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Branden Strickland <op...@gmail.com> on 2009/04/08 23:48:59 UTC

httpd (proxy) and tomcat "java.net.BindException: Address already in use:80"

I hope everyone is well!!   Any help on this would make me sane for a day!
Thanks!

I've read quite a bit about this... So I'm hoping I'm not missing something
utterly ridiculous!

I'm getting the error "java.net.BindException: Address already in use:80"
when I try to start up ofbiz on my new dedicated server.

As background info, I'm running apache not only to use the proxy feature for
ofbiz, but I'm running 2 other website apps on this server. (as virtual
servers SEE HTTPD BELOW).

I've edited url.properties and ofbiz-containers.xml to change the ports from
8080 to 80 and from 8443 to 443.
I thought tomcat and java would play nice with http but maybe I have to set
a different port number in url.properties, and ofbiz-containers.xml for a
port I don't use already?  and have the proxy point to it?

I don't think there is anything else on the OFBIZ end correct?  I'm running
the embedded tomcat and the build is from just last week (forgive me I don't
have the check out number)  I didn't think it mattered, becuase I'm 99.9%
certain it's my httpd.conf thats screwing me.


I have in my httpd.conf

(just posting important information if you'd like more let me know!)
***************************************************************
Listen 80

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule ssl_module modules/mod_ssl.so

ServerName www.buyunum.com:80

DocumentRoot "/var/www/html/joomla"
<Directory />
    Options None
    Deny from all
    Order Deny,Allow
    AllowOverride None
</Directory>

<Directory "/var/www/html/joomla">
Options -Includes -ExecCGI -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>



<IfModule mod_proxy.c>
<Proxy *>
    AddDefaultCharset off
    Order deny,allow
    Allow from all
</Proxy>
ProxyVia On
</IfModule>

NameVirtualHost *:80

<VirtualHost *:80>
        ServerName www.buyunum.com
        ServerAlias buyunum.com
        DocumentRoot /var/www/html/joomla
</VirtualHost>

<VirtualHost *:80>
        ServerName work.buyunum.com
        DocumentRoot /var/www/html/egroupware
        <Directory "/var/www/html/egroupware">
                AllowOverride FileInfo Options
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>

<VirtualHost *:80>
        ServerName order.buyunum.com
        DocumentRoot /var/www/html/ofbiz
        <Directory "/var/www/html/ofbiz">
                AllowOverride FileInfo Options
                Order allow,deny
                Allow from all
        </Directory>
        ProxyRequests Off
        ProxyPreserveHost On
        ProxyPass / ajp://localhost:8009/

        RewriteEngine On
        RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
</VirtualHost>
********************************************************************

I have the ssl stuff as well, but I'm not testing it yet.  One elefant at a
time!

the actual errors I'm getting (just incase):
2009-04-08 21:27:06,871 (main) [     Http11Protocol.java:178:ERROR] Error
initializing endpoint
java.net.BindException: Address already in use:80
    at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
    at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
    at
org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
    at
org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
    at
org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
    at
org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
    at
org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
    at org.ofbiz.base.start.Start.init(Start.java:89)
    at org.ofbiz.base.start.Start.main(Start.java:398)
org.ofbiz.base.start.StartupException: Cannot init() catalina-container
(LifecycleException:  Protocol handler initialization failed:
java.net.BindException: Address already in use:80 (Protocol handler
initialization failed: java.net.BindException: Address already in use:80))
    at
org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:192)
    at
org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
    at org.ofbiz.base.start.Start.init(Start.java:89)
    at org.ofbiz.base.start.Start.main(Start.java:398)
org.ofbiz.base.container.ContainerException: LifecycleException:  Protocol
handler initialization failed: java.net.BindException: Address already in
use:80 (Protocol handler initialization failed: java.net.BindException:
Address already in use:80)
    at
org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:216)
    at
org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
    at
org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
    at org.ofbiz.base.start.Start.init(Start.java:89)
    at org.ofbiz.base.start.Start.main(Start.java:398)
Caused by: LifecycleException:  Protocol handler initialization failed:
java.net.BindException: Address already in use:80
    at
org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
    at
org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
    at
org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
    ... 5 more
org.ofbiz.base.container.ContainerException: LifecycleException:  Protocol
handler initialization failed: java.net.BindException: Address already in
use:80 (Protocol handler initialization failed: java.net.BindException:
Address already in use:80)
    at
org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:216)
    at
org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
    at
org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
    at org.ofbiz.base.start.Start.init(Start.java:89)
    at org.ofbiz.base.start.Start.main(Start.java:398)
Caused by: LifecycleException:  Protocol handler initialization failed:
java.net.BindException: Address already in use:80
    at
org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
    at
org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
    at
org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)

Re: httpd (proxy) and tomcat "java.net.BindException: Address already in use:80"

Posted by Branden Strickland <op...@gmail.com>.
Interesting!

I'll make it a point to review this document.... Go figure after I get
really comfortable with the POS stuff, someone says "HEY! didn't you mention
that app had an eccommerce web site?"


THanks all!

On Thu, Apr 9, 2009 at 12:44 AM, David E Jones
<da...@hotwaxmedia.com>wrote:

>
> Please read the Technical Production Setup Guide for information about
> settings ports, especially for the url.properties and WebSite fields which
> don't do the same thing as the app server mount points (they represent the
> _external_ ports, not the local ones). Anyway, the document references above
> explains all of this.
>
> -David
>
>
>
> On Apr 8, 2009, at 9:45 PM, Todd Burdeinei wrote:
>
>  Heres what I learned: I set up a port redirect in the hosts file and did
>> use
>> 8080 and 8443 for production. This way I didnt have to run ofbiz as root
>> (ports that low have to be run by root on RH server). Another thing- the
>> port settings are in the config files you mentioned, but are also set in
>> the
>> content-> websites webapp.
>>
>> On Wed, Apr 8, 2009 at 8:12 PM, BJ Freeman <bj...@free-man.net> wrote:
>>
>>  -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> yup that is what I meant
>>> Now I know the pattern i will probably type it correct.
>>> thanks.
>>>
>>> David E Jones sent the following on 4/8/2009 7:32 PM:
>>>
>>>>
>>>> I don't know what OTTB means either, but he may have meant "OOTB" which
>>>> means "Out-Of-The-Box" and is a pretty commonly used acronym 'round
>>>> here.
>>>>
>>>> -David
>>>>
>>>>
>>>> On Apr 8, 2009, at 8:11 PM, Branden Strickland wrote:
>>>>
>>>>  NEVERMIND!!! I got it working... I still don't know what OTTB means,
>>>>> but I
>>>>> kept things 8080 and 8443 and then had 443 and 80 just proxy over to
>>>>> the
>>>>> 8080 and 8443... It's starting now...which is great... now If I can
>>>>> get my
>>>>> page to be more than a blank screen I'll be on my way!  I think I can
>>>>> handle
>>>>> that part though!
>>>>>
>>>>>
>>>>> Thanks BJ!!! You pointed me in the right direction.. I just had to
>>>>> think
>>>>> about what you were saying for a little bit.
>>>>>
>>>>>
>>>>> TATA!
>>>>>
>>>>> On Wed, Apr 8, 2009 at 6:09 PM, BJ Freeman <bj...@free-man.net>
>>>>> wrote:
>>>>>
>>>>>  if your server is Linux it probably has the apache httpd server
>>>> running.
>>>> if you don't plan on using the Apache httpd server then turn it off.
>>>> or you can use ajp connector and keep the OTTB ports but have them
>>>> access thru port 80.
>>>>
>>>>
>>>>
>>> http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD
>>>
>>>>
>>>>
>>>> Branden Strickland sent the following on 4/8/2009 2:48 PM:
>>>>
>>>>> I hope everyone is well!!   Any help on this would make me sane for a
>>>>>>>>
>>>>>>> day!
>>>>
>>>>> Thanks!
>>>>>>>>
>>>>>>>> I've read quite a bit about this... So I'm hoping I'm not missing
>>>>>>>>
>>>>>>> something
>>>>
>>>>> utterly ridiculous!
>>>>>>>>
>>>>>>>> I'm getting the error "java.net.BindException: Address already in
>>>>>>>> use:80"
>>>>>>>> when I try to start up ofbiz on my new dedicated server.
>>>>>>>>
>>>>>>>> As background info, I'm running apache not only to use the proxy
>>>>>>>> feature
>>>>>>>>
>>>>>>> for
>>>>
>>>>> ofbiz, but I'm running 2 other website apps on this server. (as
>>>>>>>>
>>>>>>> virtual
>>>
>>>> servers SEE HTTPD BELOW).
>>>>>>>>
>>>>>>>> I've edited url.properties and ofbiz-containers.xml to change the
>>>>>>>>
>>>>>>> ports
>>>
>>>> from
>>>>
>>>>> 8080 to 80 and from 8443 to 443.
>>>>>>>> I thought tomcat and java would play nice with http but maybe I have
>>>>>>>>
>>>>>>> to
>>>
>>>> set
>>>>
>>>>> a different port number in url.properties, and ofbiz-containers.xml
>>>>>>>> for a
>>>>>>>> port I don't use already?  and have the proxy point to it?
>>>>>>>>
>>>>>>>> I don't think there is anything else on the OFBIZ end correct?  I'm
>>>>>>>>
>>>>>>> running
>>>>
>>>>> the embedded tomcat and the build is from just last week (forgive me
>>>>>>>>
>>>>>>> I
>>>
>>>> don't
>>>>
>>>>> have the check out number)  I didn't think it mattered, becuase I'm
>>>>>>>> 99.9%
>>>>>>>> certain it's my httpd.conf thats screwing me.
>>>>>>>>
>>>>>>>>
>>>>>>>> I have in my httpd.conf
>>>>>>>>
>>>>>>>> (just posting important information if you'd like more let me know!)
>>>>>>>> ***************************************************************
>>>>>>>> Listen 80
>>>>>>>>
>>>>>>>> LoadModule proxy_module modules/mod_proxy.so
>>>>>>>> LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
>>>>>>>> LoadModule ssl_module modules/mod_ssl.so
>>>>>>>>
>>>>>>>> ServerName www.buyunum.com:80
>>>>>>>>
>>>>>>>> DocumentRoot "/var/www/html/joomla"
>>>>>>>> <Directory />
>>>>>>>>  Options None
>>>>>>>>  Deny from all
>>>>>>>>  Order Deny,Allow
>>>>>>>>  AllowOverride None
>>>>>>>> </Directory>
>>>>>>>>
>>>>>>>> <Directory "/var/www/html/joomla">
>>>>>>>> Options -Includes -ExecCGI -Indexes FollowSymLinks
>>>>>>>> AllowOverride All
>>>>>>>> Order allow,deny
>>>>>>>> Allow from all
>>>>>>>> </Directory>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> <IfModule mod_proxy.c>
>>>>>>>> <Proxy *>
>>>>>>>>  AddDefaultCharset off
>>>>>>>>  Order deny,allow
>>>>>>>>  Allow from all
>>>>>>>> </Proxy>
>>>>>>>> ProxyVia On
>>>>>>>> </IfModule>
>>>>>>>>
>>>>>>>> NameVirtualHost *:80
>>>>>>>>
>>>>>>>> <VirtualHost *:80>
>>>>>>>>      ServerName www.buyunum.com
>>>>>>>>      ServerAlias buyunum.com
>>>>>>>>      DocumentRoot /var/www/html/joomla
>>>>>>>> </VirtualHost>
>>>>>>>>
>>>>>>>> <VirtualHost *:80>
>>>>>>>>      ServerName work.buyunum.com
>>>>>>>>      DocumentRoot /var/www/html/egroupware
>>>>>>>>      <Directory "/var/www/html/egroupware">
>>>>>>>>              AllowOverride FileInfo Options
>>>>>>>>              Order allow,deny
>>>>>>>>              Allow from all
>>>>>>>>      </Directory>
>>>>>>>> </VirtualHost>
>>>>>>>>
>>>>>>>> <VirtualHost *:80>
>>>>>>>>      ServerName order.buyunum.com
>>>>>>>>      DocumentRoot /var/www/html/ofbiz
>>>>>>>>      <Directory "/var/www/html/ofbiz">
>>>>>>>>              AllowOverride FileInfo Options
>>>>>>>>              Order allow,deny
>>>>>>>>              Allow from all
>>>>>>>>      </Directory>
>>>>>>>>      ProxyRequests Off
>>>>>>>>      ProxyPreserveHost On
>>>>>>>>      ProxyPass / ajp://localhost:8009/
>>>>>>>>
>>>>>>>>      RewriteEngine On
>>>>>>>>      RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>>>>>>>> </VirtualHost>
>>>>>>>> ********************************************************************
>>>>>>>>
>>>>>>>> I have the ssl stuff as well, but I'm not testing it yet.  One
>>>>>>>> elefant at
>>>>>>>>
>>>>>>> a
>>>>
>>>>> time!
>>>>>>>>
>>>>>>>> the actual errors I'm getting (just incase):
>>>>>>>> 2009-04-08 21:27:06,871 (main) [     Http11Protocol.java:178:ERROR]
>>>>>>>> Error
>>>>>>>> initializing endpoint
>>>>>>>> java.net.BindException: Address already in use:80
>>>>>>>>  at
>>>>>>>>
>>>>>>> org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
>>>
>>>>  at
>>>>>>>>
>>>>>>> org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
>>>>
>>>>>  at
>>>>>>>>
>>>>>>>> org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
>>>
>>>>  at
>>>>>>>>
>>>>>>>>
>>>> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
>>>
>>>>
>>>>   at
>>>>>>>>
>>>>>>>>
>>>> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
>>>
>>>>
>>>>   at
>>>>>>>>
>>>>>>>>
>>>> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
>>>
>>>>
>>>>   at
>>>>>>>>
>>>>>>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>>>
>>>>  at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>>>>  at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>>>>  at org.ofbiz.base.start.Start.main(Start.java:398)
>>>>>>>> org.ofbiz.base.start.StartupException: Cannot init()
>>>>>>>>
>>>>>>> catalina-container
>>>
>>>> (LifecycleException:  Protocol handler initialization failed:
>>>>>>>> java.net.BindException: Address already in use:80 (Protocol handler
>>>>>>>> initialization failed: java.net.BindException: Address already in
>>>>>>>>
>>>>>>> use:80))
>>>>
>>>>>  at
>>>>>>>>
>>>>>>>>
>>>> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:192)
>>>
>>>>
>>>>   at
>>>>>>>>
>>>>>>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>>>
>>>>  at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>>>>  at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>>>>  at org.ofbiz.base.start.Start.main(Start.java:398)
>>>>>>>> org.ofbiz.base.container.ContainerException: LifecycleException:
>>>>>>>>
>>>>>>> Protocol
>>>>
>>>>> handler initialization failed: java.net.BindException: Address
>>>>>>>> already in
>>>>>>>> use:80 (Protocol handler initialization failed:
>>>>>>>>
>>>>>>> java.net.BindException:
>>>
>>>> Address already in use:80)
>>>>>>>>  at
>>>>>>>>
>>>>>>>>
>>>> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:216)
>>>
>>>>
>>>>   at
>>>>>>>>
>>>>>>>>
>>>> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
>>>
>>>>
>>>>   at
>>>>>>>>
>>>>>>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>>>
>>>>  at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>>>>  at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>>>>  at org.ofbiz.base.start.Start.main(Start.java:398)
>>>>>>>> Caused by: LifecycleException:  Protocol handler initialization
>>>>>>>>
>>>>>>> failed:
>>>
>>>> java.net.BindException: Address already in use:80
>>>>>>>>  at
>>>>>>>>
>>>>>>>> org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
>>>
>>>>  at
>>>>>>>>
>>>>>>>>
>>>> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
>>>
>>>>
>>>>   at
>>>>>>>>
>>>>>>>>
>>>> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
>>>
>>>>
>>>>   ... 5 more
>>>>>>>> org.ofbiz.base.container.ContainerException: LifecycleException:
>>>>>>>>
>>>>>>> Protocol
>>>>
>>>>> handler initialization failed: java.net.BindException: Address
>>>>>>>> already in
>>>>>>>> use:80 (Protocol handler initialization failed:
>>>>>>>>
>>>>>>> java.net.BindException:
>>>
>>>> Address already in use:80)
>>>>>>>>  at
>>>>>>>>
>>>>>>>>
>>>> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:216)
>>>
>>>>
>>>>   at
>>>>>>>>
>>>>>>>>
>>>> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
>>>
>>>>
>>>>   at
>>>>>>>>
>>>>>>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>>>
>>>>  at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>>>>  at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>>>>  at org.ofbiz.base.start.Start.main(Start.java:398)
>>>>>>>> Caused by: LifecycleException:  Protocol handler initialization
>>>>>>>>
>>>>>>> failed:
>>>
>>>> java.net.BindException: Address already in use:80
>>>>>>>>  at
>>>>>>>>
>>>>>>>> org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
>>>
>>>>  at
>>>>>>>>
>>>>>>>>
>>>> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
>>>
>>>>
>>>>   at
>>>>>>>>
>>>>>>>>
>>>> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
>>>
>>>>
>>>>
>>>>>>>>
>>>>>>
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.6 (MingW32)
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>>
>>> iD8DBQFJ3WeBrP3NbaWWqE4RArdvAKCmmResYVFokWXviIaywUazS8d8lgCbB9Qj
>>> 7rQRP0vgAcBIvCI5o7azfsc=
>>> =qP4z
>>> -----END PGP SIGNATURE-----
>>>
>>>
>>
>>
>> --
>> Todd Burdeinei
>> Web Developer
>> Burdeinei Corp
>> 702-259-3273 office / fax number
>> 702-372-9920 cell
>> Todd@burdeinei.com
>>
>
>

Re: httpd (proxy) and tomcat "java.net.BindException: Address already in use:80"

Posted by David E Jones <da...@hotwaxmedia.com>.
Please read the Technical Production Setup Guide for information about  
settings ports, especially for the url.properties and WebSite fields  
which don't do the same thing as the app server mount points (they  
represent the _external_ ports, not the local ones). Anyway, the  
document references above explains all of this.

-David


On Apr 8, 2009, at 9:45 PM, Todd Burdeinei wrote:

> Heres what I learned: I set up a port redirect in the hosts file and  
> did use
> 8080 and 8443 for production. This way I didnt have to run ofbiz as  
> root
> (ports that low have to be run by root on RH server). Another thing-  
> the
> port settings are in the config files you mentioned, but are also  
> set in the
> content-> websites webapp.
>
> On Wed, Apr 8, 2009 at 8:12 PM, BJ Freeman <bj...@free-man.net>  
> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> yup that is what I meant
>> Now I know the pattern i will probably type it correct.
>> thanks.
>>
>> David E Jones sent the following on 4/8/2009 7:32 PM:
>>>
>>> I don't know what OTTB means either, but he may have meant "OOTB"  
>>> which
>>> means "Out-Of-The-Box" and is a pretty commonly used acronym  
>>> 'round here.
>>>
>>> -David
>>>
>>>
>>> On Apr 8, 2009, at 8:11 PM, Branden Strickland wrote:
>>>
>>>> NEVERMIND!!! I got it working... I still don't know what OTTB  
>>>> means,
>>>> but I
>>>> kept things 8080 and 8443 and then had 443 and 80 just proxy over  
>>>> to the
>>>> 8080 and 8443... It's starting now...which is great... now If I can
>>>> get my
>>>> page to be more than a blank screen I'll be on my way!  I think I  
>>>> can
>>>> handle
>>>> that part though!
>>>>
>>>>
>>>> Thanks BJ!!! You pointed me in the right direction.. I just had  
>>>> to think
>>>> about what you were saying for a little bit.
>>>>
>>>>
>>>> TATA!
>>>>
>>>> On Wed, Apr 8, 2009 at 6:09 PM, BJ Freeman <bj...@free-man.net>  
>>>> wrote:
>>>>
>>> if your server is Linux it probably has the apache httpd server  
>>> running.
>>> if you don't plan on using the Apache httpd server then turn it off.
>>> or you can use ajp connector and keep the OTTB ports but have them
>>> access thru port 80.
>>>
>>>
>> http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD
>>>
>>>
>>> Branden Strickland sent the following on 4/8/2009 2:48 PM:
>>>>>>> I hope everyone is well!!   Any help on this would make me  
>>>>>>> sane for a
>>> day!
>>>>>>> Thanks!
>>>>>>>
>>>>>>> I've read quite a bit about this... So I'm hoping I'm not  
>>>>>>> missing
>>> something
>>>>>>> utterly ridiculous!
>>>>>>>
>>>>>>> I'm getting the error "java.net.BindException: Address already  
>>>>>>> in
>>>>>>> use:80"
>>>>>>> when I try to start up ofbiz on my new dedicated server.
>>>>>>>
>>>>>>> As background info, I'm running apache not only to use the proxy
>>>>>>> feature
>>> for
>>>>>>> ofbiz, but I'm running 2 other website apps on this server. (as
>> virtual
>>>>>>> servers SEE HTTPD BELOW).
>>>>>>>
>>>>>>> I've edited url.properties and ofbiz-containers.xml to change  
>>>>>>> the
>> ports
>>> from
>>>>>>> 8080 to 80 and from 8443 to 443.
>>>>>>> I thought tomcat and java would play nice with http but maybe  
>>>>>>> I have
>> to
>>> set
>>>>>>> a different port number in url.properties, and ofbiz- 
>>>>>>> containers.xml
>>>>>>> for a
>>>>>>> port I don't use already?  and have the proxy point to it?
>>>>>>>
>>>>>>> I don't think there is anything else on the OFBIZ end  
>>>>>>> correct?  I'm
>>> running
>>>>>>> the embedded tomcat and the build is from just last week  
>>>>>>> (forgive me
>> I
>>> don't
>>>>>>> have the check out number)  I didn't think it mattered,  
>>>>>>> becuase I'm
>>>>>>> 99.9%
>>>>>>> certain it's my httpd.conf thats screwing me.
>>>>>>>
>>>>>>>
>>>>>>> I have in my httpd.conf
>>>>>>>
>>>>>>> (just posting important information if you'd like more let me  
>>>>>>> know!)
>>>>>>> ***************************************************************
>>>>>>> Listen 80
>>>>>>>
>>>>>>> LoadModule proxy_module modules/mod_proxy.so
>>>>>>> LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
>>>>>>> LoadModule ssl_module modules/mod_ssl.so
>>>>>>>
>>>>>>> ServerName www.buyunum.com:80
>>>>>>>
>>>>>>> DocumentRoot "/var/www/html/joomla"
>>>>>>> <Directory />
>>>>>>>   Options None
>>>>>>>   Deny from all
>>>>>>>   Order Deny,Allow
>>>>>>>   AllowOverride None
>>>>>>> </Directory>
>>>>>>>
>>>>>>> <Directory "/var/www/html/joomla">
>>>>>>> Options -Includes -ExecCGI -Indexes FollowSymLinks
>>>>>>> AllowOverride All
>>>>>>> Order allow,deny
>>>>>>> Allow from all
>>>>>>> </Directory>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> <IfModule mod_proxy.c>
>>>>>>> <Proxy *>
>>>>>>>   AddDefaultCharset off
>>>>>>>   Order deny,allow
>>>>>>>   Allow from all
>>>>>>> </Proxy>
>>>>>>> ProxyVia On
>>>>>>> </IfModule>
>>>>>>>
>>>>>>> NameVirtualHost *:80
>>>>>>>
>>>>>>> <VirtualHost *:80>
>>>>>>>       ServerName www.buyunum.com
>>>>>>>       ServerAlias buyunum.com
>>>>>>>       DocumentRoot /var/www/html/joomla
>>>>>>> </VirtualHost>
>>>>>>>
>>>>>>> <VirtualHost *:80>
>>>>>>>       ServerName work.buyunum.com
>>>>>>>       DocumentRoot /var/www/html/egroupware
>>>>>>>       <Directory "/var/www/html/egroupware">
>>>>>>>               AllowOverride FileInfo Options
>>>>>>>               Order allow,deny
>>>>>>>               Allow from all
>>>>>>>       </Directory>
>>>>>>> </VirtualHost>
>>>>>>>
>>>>>>> <VirtualHost *:80>
>>>>>>>       ServerName order.buyunum.com
>>>>>>>       DocumentRoot /var/www/html/ofbiz
>>>>>>>       <Directory "/var/www/html/ofbiz">
>>>>>>>               AllowOverride FileInfo Options
>>>>>>>               Order allow,deny
>>>>>>>               Allow from all
>>>>>>>       </Directory>
>>>>>>>       ProxyRequests Off
>>>>>>>       ProxyPreserveHost On
>>>>>>>       ProxyPass / ajp://localhost:8009/
>>>>>>>
>>>>>>>       RewriteEngine On
>>>>>>>       RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>>>>>>> </VirtualHost>
>>>>>>> ********************************************************************
>>>>>>>
>>>>>>> I have the ssl stuff as well, but I'm not testing it yet.  One
>>>>>>> elefant at
>>> a
>>>>>>> time!
>>>>>>>
>>>>>>> the actual errors I'm getting (just incase):
>>>>>>> 2009-04-08 21:27:06,871 (main) [     Http11Protocol.java: 
>>>>>>> 178:ERROR]
>>>>>>> Error
>>>>>>> initializing endpoint
>>>>>>> java.net.BindException: Address already in use:80
>>>>>>>   at
>> org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
>>>>>>>   at
>>> org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java: 
>>> 176)
>>>>>>>   at
>>>>>>>
>> org.apache.catalina.connector.Connector.initialize(Connector.java: 
>> 1058)
>>>>>>>   at
>>>>>>>
>>>
>> org 
>> .apache 
>> .catalina.core.StandardService.initialize(StandardService.java:677)
>>>
>>>>>>>   at
>>>>>>>
>>>
>> org 
>> .ofbiz 
>> .catalina.container.CatalinaContainer.init(CatalinaContainer.java: 
>> 214)
>>>
>>>>>>>   at
>>>>>>>
>>>
>> org 
>> .ofbiz 
>> .base.container.ContainerLoader.loadContainer(ContainerLoader.java: 
>> 190)
>>>
>>>>>>>   at
>>>>>>>
>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java: 
>> 66)
>>>>>>>   at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>>>   at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>>>   at org.ofbiz.base.start.Start.main(Start.java:398)
>>>>>>> org.ofbiz.base.start.StartupException: Cannot init()
>> catalina-container
>>>>>>> (LifecycleException:  Protocol handler initialization failed:
>>>>>>> java.net.BindException: Address already in use:80 (Protocol  
>>>>>>> handler
>>>>>>> initialization failed: java.net.BindException: Address already  
>>>>>>> in
>>> use:80))
>>>>>>>   at
>>>>>>>
>>>
>> org 
>> .ofbiz 
>> .base.container.ContainerLoader.loadContainer(ContainerLoader.java: 
>> 192)
>>>
>>>>>>>   at
>>>>>>>
>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java: 
>> 66)
>>>>>>>   at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>>>   at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>>>   at org.ofbiz.base.start.Start.main(Start.java:398)
>>>>>>> org.ofbiz.base.container.ContainerException: LifecycleException:
>>> Protocol
>>>>>>> handler initialization failed: java.net.BindException: Address
>>>>>>> already in
>>>>>>> use:80 (Protocol handler initialization failed:
>> java.net.BindException:
>>>>>>> Address already in use:80)
>>>>>>>   at
>>>>>>>
>>>
>> org 
>> .ofbiz 
>> .catalina.container.CatalinaContainer.init(CatalinaContainer.java: 
>> 216)
>>>
>>>>>>>   at
>>>>>>>
>>>
>> org 
>> .ofbiz 
>> .base.container.ContainerLoader.loadContainer(ContainerLoader.java: 
>> 190)
>>>
>>>>>>>   at
>>>>>>>
>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java: 
>> 66)
>>>>>>>   at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>>>   at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>>>   at org.ofbiz.base.start.Start.main(Start.java:398)
>>>>>>> Caused by: LifecycleException:  Protocol handler initialization
>> failed:
>>>>>>> java.net.BindException: Address already in use:80
>>>>>>>   at
>>>>>>>
>> org.apache.catalina.connector.Connector.initialize(Connector.java: 
>> 1060)
>>>>>>>   at
>>>>>>>
>>>
>> org 
>> .apache 
>> .catalina.core.StandardService.initialize(StandardService.java:677)
>>>
>>>>>>>   at
>>>>>>>
>>>
>> org 
>> .ofbiz 
>> .catalina.container.CatalinaContainer.init(CatalinaContainer.java: 
>> 214)
>>>
>>>>>>>   ... 5 more
>>>>>>> org.ofbiz.base.container.ContainerException: LifecycleException:
>>> Protocol
>>>>>>> handler initialization failed: java.net.BindException: Address
>>>>>>> already in
>>>>>>> use:80 (Protocol handler initialization failed:
>> java.net.BindException:
>>>>>>> Address already in use:80)
>>>>>>>   at
>>>>>>>
>>>
>> org 
>> .ofbiz 
>> .catalina.container.CatalinaContainer.init(CatalinaContainer.java: 
>> 216)
>>>
>>>>>>>   at
>>>>>>>
>>>
>> org 
>> .ofbiz 
>> .base.container.ContainerLoader.loadContainer(ContainerLoader.java: 
>> 190)
>>>
>>>>>>>   at
>>>>>>>
>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java: 
>> 66)
>>>>>>>   at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>>>   at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>>>   at org.ofbiz.base.start.Start.main(Start.java:398)
>>>>>>> Caused by: LifecycleException:  Protocol handler initialization
>> failed:
>>>>>>> java.net.BindException: Address already in use:80
>>>>>>>   at
>>>>>>>
>> org.apache.catalina.connector.Connector.initialize(Connector.java: 
>> 1060)
>>>>>>>   at
>>>>>>>
>>>
>> org 
>> .apache 
>> .catalina.core.StandardService.initialize(StandardService.java:677)
>>>
>>>>>>>   at
>>>>>>>
>>>
>> org 
>> .ofbiz 
>> .catalina.container.CatalinaContainer.init(CatalinaContainer.java: 
>> 214)
>>>
>>>>>>>
>>>>>
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.6 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFJ3WeBrP3NbaWWqE4RArdvAKCmmResYVFokWXviIaywUazS8d8lgCbB9Qj
>> 7rQRP0vgAcBIvCI5o7azfsc=
>> =qP4z
>> -----END PGP SIGNATURE-----
>>
>
>
>
> -- 
> Todd Burdeinei
> Web Developer
> Burdeinei Corp
> 702-259-3273 office / fax number
> 702-372-9920 cell
> Todd@burdeinei.com


Re: httpd (proxy) and tomcat "java.net.BindException: Address already in use:80"

Posted by Todd Burdeinei <tb...@gmail.com>.
Heres what I learned: I set up a port redirect in the hosts file and did use
8080 and 8443 for production. This way I didnt have to run ofbiz as root
(ports that low have to be run by root on RH server). Another thing- the
port settings are in the config files you mentioned, but are also set in the
content-> websites webapp.

On Wed, Apr 8, 2009 at 8:12 PM, BJ Freeman <bj...@free-man.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> yup that is what I meant
> Now I know the pattern i will probably type it correct.
> thanks.
>
> David E Jones sent the following on 4/8/2009 7:32 PM:
> >
> > I don't know what OTTB means either, but he may have meant "OOTB" which
> > means "Out-Of-The-Box" and is a pretty commonly used acronym 'round here.
> >
> > -David
> >
> >
> > On Apr 8, 2009, at 8:11 PM, Branden Strickland wrote:
> >
> >> NEVERMIND!!! I got it working... I still don't know what OTTB means,
> >> but I
> >> kept things 8080 and 8443 and then had 443 and 80 just proxy over to the
> >> 8080 and 8443... It's starting now...which is great... now If I can
> >> get my
> >> page to be more than a blank screen I'll be on my way!  I think I can
> >> handle
> >> that part though!
> >>
> >>
> >> Thanks BJ!!! You pointed me in the right direction.. I just had to think
> >> about what you were saying for a little bit.
> >>
> >>
> >> TATA!
> >>
> >> On Wed, Apr 8, 2009 at 6:09 PM, BJ Freeman <bj...@free-man.net> wrote:
> >>
> > if your server is Linux it probably has the apache httpd server running.
> > if you don't plan on using the Apache httpd server then turn it off.
> > or you can use ajp connector and keep the OTTB ports but have them
> > access thru port 80.
> >
> >
> http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD
> >
> >
> > Branden Strickland sent the following on 4/8/2009 2:48 PM:
> >>>>> I hope everyone is well!!   Any help on this would make me sane for a
> > day!
> >>>>> Thanks!
> >>>>>
> >>>>> I've read quite a bit about this... So I'm hoping I'm not missing
> > something
> >>>>> utterly ridiculous!
> >>>>>
> >>>>> I'm getting the error "java.net.BindException: Address already in
> >>>>> use:80"
> >>>>> when I try to start up ofbiz on my new dedicated server.
> >>>>>
> >>>>> As background info, I'm running apache not only to use the proxy
> >>>>> feature
> > for
> >>>>> ofbiz, but I'm running 2 other website apps on this server. (as
> virtual
> >>>>> servers SEE HTTPD BELOW).
> >>>>>
> >>>>> I've edited url.properties and ofbiz-containers.xml to change the
> ports
> > from
> >>>>> 8080 to 80 and from 8443 to 443.
> >>>>> I thought tomcat and java would play nice with http but maybe I have
> to
> > set
> >>>>> a different port number in url.properties, and ofbiz-containers.xml
> >>>>> for a
> >>>>> port I don't use already?  and have the proxy point to it?
> >>>>>
> >>>>> I don't think there is anything else on the OFBIZ end correct?  I'm
> > running
> >>>>> the embedded tomcat and the build is from just last week (forgive me
> I
> > don't
> >>>>> have the check out number)  I didn't think it mattered, becuase I'm
> >>>>> 99.9%
> >>>>> certain it's my httpd.conf thats screwing me.
> >>>>>
> >>>>>
> >>>>> I have in my httpd.conf
> >>>>>
> >>>>> (just posting important information if you'd like more let me know!)
> >>>>> ***************************************************************
> >>>>> Listen 80
> >>>>>
> >>>>> LoadModule proxy_module modules/mod_proxy.so
> >>>>> LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
> >>>>> LoadModule ssl_module modules/mod_ssl.so
> >>>>>
> >>>>> ServerName www.buyunum.com:80
> >>>>>
> >>>>> DocumentRoot "/var/www/html/joomla"
> >>>>> <Directory />
> >>>>>    Options None
> >>>>>    Deny from all
> >>>>>    Order Deny,Allow
> >>>>>    AllowOverride None
> >>>>> </Directory>
> >>>>>
> >>>>> <Directory "/var/www/html/joomla">
> >>>>> Options -Includes -ExecCGI -Indexes FollowSymLinks
> >>>>> AllowOverride All
> >>>>> Order allow,deny
> >>>>> Allow from all
> >>>>> </Directory>
> >>>>>
> >>>>>
> >>>>>
> >>>>> <IfModule mod_proxy.c>
> >>>>> <Proxy *>
> >>>>>    AddDefaultCharset off
> >>>>>    Order deny,allow
> >>>>>    Allow from all
> >>>>> </Proxy>
> >>>>> ProxyVia On
> >>>>> </IfModule>
> >>>>>
> >>>>> NameVirtualHost *:80
> >>>>>
> >>>>> <VirtualHost *:80>
> >>>>>        ServerName www.buyunum.com
> >>>>>        ServerAlias buyunum.com
> >>>>>        DocumentRoot /var/www/html/joomla
> >>>>> </VirtualHost>
> >>>>>
> >>>>> <VirtualHost *:80>
> >>>>>        ServerName work.buyunum.com
> >>>>>        DocumentRoot /var/www/html/egroupware
> >>>>>        <Directory "/var/www/html/egroupware">
> >>>>>                AllowOverride FileInfo Options
> >>>>>                Order allow,deny
> >>>>>                Allow from all
> >>>>>        </Directory>
> >>>>> </VirtualHost>
> >>>>>
> >>>>> <VirtualHost *:80>
> >>>>>        ServerName order.buyunum.com
> >>>>>        DocumentRoot /var/www/html/ofbiz
> >>>>>        <Directory "/var/www/html/ofbiz">
> >>>>>                AllowOverride FileInfo Options
> >>>>>                Order allow,deny
> >>>>>                Allow from all
> >>>>>        </Directory>
> >>>>>        ProxyRequests Off
> >>>>>        ProxyPreserveHost On
> >>>>>        ProxyPass / ajp://localhost:8009/
> >>>>>
> >>>>>        RewriteEngine On
> >>>>>        RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> >>>>> </VirtualHost>
> >>>>> ********************************************************************
> >>>>>
> >>>>> I have the ssl stuff as well, but I'm not testing it yet.  One
> >>>>> elefant at
> > a
> >>>>> time!
> >>>>>
> >>>>> the actual errors I'm getting (just incase):
> >>>>> 2009-04-08 21:27:06,871 (main) [     Http11Protocol.java:178:ERROR]
> >>>>> Error
> >>>>> initializing endpoint
> >>>>> java.net.BindException: Address already in use:80
> >>>>>    at
> org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
> >>>>>    at
> > org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
> >>>>>    at
> >>>>>
> org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
> >>>>>    at
> >>>>>
> >
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
> >
> >>>>>    at
> >>>>>
> >
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
> >
> >>>>>    at
> >>>>>
> >
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
> >
> >>>>>    at
> >>>>>
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
> >>>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
> >>>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
> >>>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
> >>>>> org.ofbiz.base.start.StartupException: Cannot init()
> catalina-container
> >>>>> (LifecycleException:  Protocol handler initialization failed:
> >>>>> java.net.BindException: Address already in use:80 (Protocol handler
> >>>>> initialization failed: java.net.BindException: Address already in
> > use:80))
> >>>>>    at
> >>>>>
> >
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:192)
> >
> >>>>>    at
> >>>>>
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
> >>>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
> >>>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
> >>>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
> >>>>> org.ofbiz.base.container.ContainerException: LifecycleException:
> > Protocol
> >>>>> handler initialization failed: java.net.BindException: Address
> >>>>> already in
> >>>>> use:80 (Protocol handler initialization failed:
> java.net.BindException:
> >>>>> Address already in use:80)
> >>>>>    at
> >>>>>
> >
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:216)
> >
> >>>>>    at
> >>>>>
> >
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
> >
> >>>>>    at
> >>>>>
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
> >>>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
> >>>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
> >>>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
> >>>>> Caused by: LifecycleException:  Protocol handler initialization
> failed:
> >>>>> java.net.BindException: Address already in use:80
> >>>>>    at
> >>>>>
> org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
> >>>>>    at
> >>>>>
> >
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
> >
> >>>>>    at
> >>>>>
> >
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
> >
> >>>>>    ... 5 more
> >>>>> org.ofbiz.base.container.ContainerException: LifecycleException:
> > Protocol
> >>>>> handler initialization failed: java.net.BindException: Address
> >>>>> already in
> >>>>> use:80 (Protocol handler initialization failed:
> java.net.BindException:
> >>>>> Address already in use:80)
> >>>>>    at
> >>>>>
> >
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:216)
> >
> >>>>>    at
> >>>>>
> >
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
> >
> >>>>>    at
> >>>>>
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
> >>>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
> >>>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
> >>>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
> >>>>> Caused by: LifecycleException:  Protocol handler initialization
> failed:
> >>>>> java.net.BindException: Address already in use:80
> >>>>>    at
> >>>>>
> org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
> >>>>>    at
> >>>>>
> >
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
> >
> >>>>>    at
> >>>>>
> >
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
> >
> >>>>>
> >>>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFJ3WeBrP3NbaWWqE4RArdvAKCmmResYVFokWXviIaywUazS8d8lgCbB9Qj
> 7rQRP0vgAcBIvCI5o7azfsc=
> =qP4z
> -----END PGP SIGNATURE-----
>



-- 
Todd Burdeinei
Web Developer
Burdeinei Corp
702-259-3273 office / fax number
702-372-9920 cell
Todd@burdeinei.com

Re: httpd (proxy) and tomcat "java.net.BindException: Address already in use:80"

Posted by BJ Freeman <bj...@free-man.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

yup that is what I meant
Now I know the pattern i will probably type it correct.
thanks.

David E Jones sent the following on 4/8/2009 7:32 PM:
> 
> I don't know what OTTB means either, but he may have meant "OOTB" which
> means "Out-Of-The-Box" and is a pretty commonly used acronym 'round here.
> 
> -David
> 
> 
> On Apr 8, 2009, at 8:11 PM, Branden Strickland wrote:
> 
>> NEVERMIND!!! I got it working... I still don't know what OTTB means,
>> but I
>> kept things 8080 and 8443 and then had 443 and 80 just proxy over to the
>> 8080 and 8443... It's starting now...which is great... now If I can
>> get my
>> page to be more than a blank screen I'll be on my way!  I think I can
>> handle
>> that part though!
>>
>>
>> Thanks BJ!!! You pointed me in the right direction.. I just had to think
>> about what you were saying for a little bit.
>>
>>
>> TATA!
>>
>> On Wed, Apr 8, 2009 at 6:09 PM, BJ Freeman <bj...@free-man.net> wrote:
>>
> if your server is Linux it probably has the apache httpd server running.
> if you don't plan on using the Apache httpd server then turn it off.
> or you can use ajp connector and keep the OTTB ports but have them
> access thru port 80.
> 
> http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD
> 
> 
> Branden Strickland sent the following on 4/8/2009 2:48 PM:
>>>>> I hope everyone is well!!   Any help on this would make me sane for a
> day!
>>>>> Thanks!
>>>>>
>>>>> I've read quite a bit about this... So I'm hoping I'm not missing
> something
>>>>> utterly ridiculous!
>>>>>
>>>>> I'm getting the error "java.net.BindException: Address already in
>>>>> use:80"
>>>>> when I try to start up ofbiz on my new dedicated server.
>>>>>
>>>>> As background info, I'm running apache not only to use the proxy
>>>>> feature
> for
>>>>> ofbiz, but I'm running 2 other website apps on this server. (as virtual
>>>>> servers SEE HTTPD BELOW).
>>>>>
>>>>> I've edited url.properties and ofbiz-containers.xml to change the ports
> from
>>>>> 8080 to 80 and from 8443 to 443.
>>>>> I thought tomcat and java would play nice with http but maybe I have to
> set
>>>>> a different port number in url.properties, and ofbiz-containers.xml
>>>>> for a
>>>>> port I don't use already?  and have the proxy point to it?
>>>>>
>>>>> I don't think there is anything else on the OFBIZ end correct?  I'm
> running
>>>>> the embedded tomcat and the build is from just last week (forgive me I
> don't
>>>>> have the check out number)  I didn't think it mattered, becuase I'm
>>>>> 99.9%
>>>>> certain it's my httpd.conf thats screwing me.
>>>>>
>>>>>
>>>>> I have in my httpd.conf
>>>>>
>>>>> (just posting important information if you'd like more let me know!)
>>>>> ***************************************************************
>>>>> Listen 80
>>>>>
>>>>> LoadModule proxy_module modules/mod_proxy.so
>>>>> LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
>>>>> LoadModule ssl_module modules/mod_ssl.so
>>>>>
>>>>> ServerName www.buyunum.com:80
>>>>>
>>>>> DocumentRoot "/var/www/html/joomla"
>>>>> <Directory />
>>>>>    Options None
>>>>>    Deny from all
>>>>>    Order Deny,Allow
>>>>>    AllowOverride None
>>>>> </Directory>
>>>>>
>>>>> <Directory "/var/www/html/joomla">
>>>>> Options -Includes -ExecCGI -Indexes FollowSymLinks
>>>>> AllowOverride All
>>>>> Order allow,deny
>>>>> Allow from all
>>>>> </Directory>
>>>>>
>>>>>
>>>>>
>>>>> <IfModule mod_proxy.c>
>>>>> <Proxy *>
>>>>>    AddDefaultCharset off
>>>>>    Order deny,allow
>>>>>    Allow from all
>>>>> </Proxy>
>>>>> ProxyVia On
>>>>> </IfModule>
>>>>>
>>>>> NameVirtualHost *:80
>>>>>
>>>>> <VirtualHost *:80>
>>>>>        ServerName www.buyunum.com
>>>>>        ServerAlias buyunum.com
>>>>>        DocumentRoot /var/www/html/joomla
>>>>> </VirtualHost>
>>>>>
>>>>> <VirtualHost *:80>
>>>>>        ServerName work.buyunum.com
>>>>>        DocumentRoot /var/www/html/egroupware
>>>>>        <Directory "/var/www/html/egroupware">
>>>>>                AllowOverride FileInfo Options
>>>>>                Order allow,deny
>>>>>                Allow from all
>>>>>        </Directory>
>>>>> </VirtualHost>
>>>>>
>>>>> <VirtualHost *:80>
>>>>>        ServerName order.buyunum.com
>>>>>        DocumentRoot /var/www/html/ofbiz
>>>>>        <Directory "/var/www/html/ofbiz">
>>>>>                AllowOverride FileInfo Options
>>>>>                Order allow,deny
>>>>>                Allow from all
>>>>>        </Directory>
>>>>>        ProxyRequests Off
>>>>>        ProxyPreserveHost On
>>>>>        ProxyPass / ajp://localhost:8009/
>>>>>
>>>>>        RewriteEngine On
>>>>>        RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>>>>> </VirtualHost>
>>>>> ********************************************************************
>>>>>
>>>>> I have the ssl stuff as well, but I'm not testing it yet.  One
>>>>> elefant at
> a
>>>>> time!
>>>>>
>>>>> the actual errors I'm getting (just incase):
>>>>> 2009-04-08 21:27:06,871 (main) [     Http11Protocol.java:178:ERROR]
>>>>> Error
>>>>> initializing endpoint
>>>>> java.net.BindException: Address already in use:80
>>>>>    at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
>>>>>    at
> org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
>>>>>    at
>>>>> org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
>>>>>    at
>>>>>
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
> 
>>>>>    at
>>>>>
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
> 
>>>>>    at
>>>>>
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
> 
>>>>>    at
>>>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>>>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
>>>>> org.ofbiz.base.start.StartupException: Cannot init() catalina-container
>>>>> (LifecycleException:  Protocol handler initialization failed:
>>>>> java.net.BindException: Address already in use:80 (Protocol handler
>>>>> initialization failed: java.net.BindException: Address already in
> use:80))
>>>>>    at
>>>>>
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:192)
> 
>>>>>    at
>>>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>>>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
>>>>> org.ofbiz.base.container.ContainerException: LifecycleException:
> Protocol
>>>>> handler initialization failed: java.net.BindException: Address
>>>>> already in
>>>>> use:80 (Protocol handler initialization failed: java.net.BindException:
>>>>> Address already in use:80)
>>>>>    at
>>>>>
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:216)
> 
>>>>>    at
>>>>>
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
> 
>>>>>    at
>>>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>>>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
>>>>> Caused by: LifecycleException:  Protocol handler initialization failed:
>>>>> java.net.BindException: Address already in use:80
>>>>>    at
>>>>> org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
>>>>>    at
>>>>>
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
> 
>>>>>    at
>>>>>
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
> 
>>>>>    ... 5 more
>>>>> org.ofbiz.base.container.ContainerException: LifecycleException:
> Protocol
>>>>> handler initialization failed: java.net.BindException: Address
>>>>> already in
>>>>> use:80 (Protocol handler initialization failed: java.net.BindException:
>>>>> Address already in use:80)
>>>>>    at
>>>>>
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:216)
> 
>>>>>    at
>>>>>
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
> 
>>>>>    at
>>>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>>>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
>>>>> Caused by: LifecycleException:  Protocol handler initialization failed:
>>>>> java.net.BindException: Address already in use:80
>>>>>    at
>>>>> org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
>>>>>    at
>>>>>
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
> 
>>>>>    at
>>>>>
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
> 
>>>>>
>>>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ3WeBrP3NbaWWqE4RArdvAKCmmResYVFokWXviIaywUazS8d8lgCbB9Qj
7rQRP0vgAcBIvCI5o7azfsc=
=qP4z
-----END PGP SIGNATURE-----

Re: httpd (proxy) and tomcat "java.net.BindException: Address already in use:80"

Posted by David E Jones <da...@hotwaxmedia.com>.
I don't know what OTTB means either, but he may have meant "OOTB"  
which means "Out-Of-The-Box" and is a pretty commonly used acronym  
'round here.

-David


On Apr 8, 2009, at 8:11 PM, Branden Strickland wrote:

> NEVERMIND!!! I got it working... I still don't know what OTTB means,  
> but I
> kept things 8080 and 8443 and then had 443 and 80 just proxy over to  
> the
> 8080 and 8443... It's starting now...which is great... now If I can  
> get my
> page to be more than a blank screen I'll be on my way!  I think I  
> can handle
> that part though!
>
>
> Thanks BJ!!! You pointed me in the right direction.. I just had to  
> think
> about what you were saying for a little bit.
>
>
> TATA!
>
> On Wed, Apr 8, 2009 at 6:09 PM, BJ Freeman <bj...@free-man.net>  
> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> if your server is Linux it probably has the apache httpd server  
>> running.
>> if you don't plan on using the Apache httpd server then turn it off.
>> or you can use ajp connector and keep the OTTB ports but have them
>> access thru port 80.
>>
>> http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD
>>
>> Branden Strickland sent the following on 4/8/2009 2:48 PM:
>>> I hope everyone is well!!   Any help on this would make me sane  
>>> for a
>> day!
>>> Thanks!
>>>
>>> I've read quite a bit about this... So I'm hoping I'm not missing
>> something
>>> utterly ridiculous!
>>>
>>> I'm getting the error "java.net.BindException: Address already in  
>>> use:80"
>>> when I try to start up ofbiz on my new dedicated server.
>>>
>>> As background info, I'm running apache not only to use the proxy  
>>> feature
>> for
>>> ofbiz, but I'm running 2 other website apps on this server. (as  
>>> virtual
>>> servers SEE HTTPD BELOW).
>>>
>>> I've edited url.properties and ofbiz-containers.xml to change the  
>>> ports
>> from
>>> 8080 to 80 and from 8443 to 443.
>>> I thought tomcat and java would play nice with http but maybe I  
>>> have to
>> set
>>> a different port number in url.properties, and ofbiz- 
>>> containers.xml for a
>>> port I don't use already?  and have the proxy point to it?
>>>
>>> I don't think there is anything else on the OFBIZ end correct?  I'm
>> running
>>> the embedded tomcat and the build is from just last week (forgive  
>>> me I
>> don't
>>> have the check out number)  I didn't think it mattered, becuase  
>>> I'm 99.9%
>>> certain it's my httpd.conf thats screwing me.
>>>
>>>
>>> I have in my httpd.conf
>>>
>>> (just posting important information if you'd like more let me know!)
>>> ***************************************************************
>>> Listen 80
>>>
>>> LoadModule proxy_module modules/mod_proxy.so
>>> LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
>>> LoadModule ssl_module modules/mod_ssl.so
>>>
>>> ServerName www.buyunum.com:80
>>>
>>> DocumentRoot "/var/www/html/joomla"
>>> <Directory />
>>>    Options None
>>>    Deny from all
>>>    Order Deny,Allow
>>>    AllowOverride None
>>> </Directory>
>>>
>>> <Directory "/var/www/html/joomla">
>>> Options -Includes -ExecCGI -Indexes FollowSymLinks
>>> AllowOverride All
>>> Order allow,deny
>>> Allow from all
>>> </Directory>
>>>
>>>
>>>
>>> <IfModule mod_proxy.c>
>>> <Proxy *>
>>>    AddDefaultCharset off
>>>    Order deny,allow
>>>    Allow from all
>>> </Proxy>
>>> ProxyVia On
>>> </IfModule>
>>>
>>> NameVirtualHost *:80
>>>
>>> <VirtualHost *:80>
>>>        ServerName www.buyunum.com
>>>        ServerAlias buyunum.com
>>>        DocumentRoot /var/www/html/joomla
>>> </VirtualHost>
>>>
>>> <VirtualHost *:80>
>>>        ServerName work.buyunum.com
>>>        DocumentRoot /var/www/html/egroupware
>>>        <Directory "/var/www/html/egroupware">
>>>                AllowOverride FileInfo Options
>>>                Order allow,deny
>>>                Allow from all
>>>        </Directory>
>>> </VirtualHost>
>>>
>>> <VirtualHost *:80>
>>>        ServerName order.buyunum.com
>>>        DocumentRoot /var/www/html/ofbiz
>>>        <Directory "/var/www/html/ofbiz">
>>>                AllowOverride FileInfo Options
>>>                Order allow,deny
>>>                Allow from all
>>>        </Directory>
>>>        ProxyRequests Off
>>>        ProxyPreserveHost On
>>>        ProxyPass / ajp://localhost:8009/
>>>
>>>        RewriteEngine On
>>>        RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>>> </VirtualHost>
>>> ********************************************************************
>>>
>>> I have the ssl stuff as well, but I'm not testing it yet.  One  
>>> elefant at
>> a
>>> time!
>>>
>>> the actual errors I'm getting (just incase):
>>> 2009-04-08 21:27:06,871 (main) [     Http11Protocol.java: 
>>> 178:ERROR] Error
>>> initializing endpoint
>>> java.net.BindException: Address already in use:80
>>>    at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java: 
>>> 501)
>>>    at
>> org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
>>>    at
>>> org.apache.catalina.connector.Connector.initialize(Connector.java: 
>>> 1058)
>>>    at
>>>
>> org 
>> .apache 
>> .catalina.core.StandardService.initialize(StandardService.java:677)
>>>    at
>>>
>> org 
>> .ofbiz 
>> .catalina.container.CatalinaContainer.init(CatalinaContainer.java: 
>> 214)
>>>    at
>>>
>> org 
>> .ofbiz 
>> .base.container.ContainerLoader.loadContainer(ContainerLoader.java: 
>> 190)
>>>    at
>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java: 
>>> 66)
>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
>>> org.ofbiz.base.start.StartupException: Cannot init() catalina- 
>>> container
>>> (LifecycleException:  Protocol handler initialization failed:
>>> java.net.BindException: Address already in use:80 (Protocol handler
>>> initialization failed: java.net.BindException: Address already in
>> use:80))
>>>    at
>>>
>> org 
>> .ofbiz 
>> .base.container.ContainerLoader.loadContainer(ContainerLoader.java: 
>> 192)
>>>    at
>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java: 
>>> 66)
>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
>>> org.ofbiz.base.container.ContainerException: LifecycleException:
>> Protocol
>>> handler initialization failed: java.net.BindException: Address  
>>> already in
>>> use:80 (Protocol handler initialization failed:  
>>> java.net.BindException:
>>> Address already in use:80)
>>>    at
>>>
>> org 
>> .ofbiz 
>> .catalina.container.CatalinaContainer.init(CatalinaContainer.java: 
>> 216)
>>>    at
>>>
>> org 
>> .ofbiz 
>> .base.container.ContainerLoader.loadContainer(ContainerLoader.java: 
>> 190)
>>>    at
>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java: 
>>> 66)
>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
>>> Caused by: LifecycleException:  Protocol handler initialization  
>>> failed:
>>> java.net.BindException: Address already in use:80
>>>    at
>>> org.apache.catalina.connector.Connector.initialize(Connector.java: 
>>> 1060)
>>>    at
>>>
>> org 
>> .apache 
>> .catalina.core.StandardService.initialize(StandardService.java:677)
>>>    at
>>>
>> org 
>> .ofbiz 
>> .catalina.container.CatalinaContainer.init(CatalinaContainer.java: 
>> 214)
>>>    ... 5 more
>>> org.ofbiz.base.container.ContainerException: LifecycleException:
>> Protocol
>>> handler initialization failed: java.net.BindException: Address  
>>> already in
>>> use:80 (Protocol handler initialization failed:  
>>> java.net.BindException:
>>> Address already in use:80)
>>>    at
>>>
>> org 
>> .ofbiz 
>> .catalina.container.CatalinaContainer.init(CatalinaContainer.java: 
>> 216)
>>>    at
>>>
>> org 
>> .ofbiz 
>> .base.container.ContainerLoader.loadContainer(ContainerLoader.java: 
>> 190)
>>>    at
>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java: 
>>> 66)
>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
>>> Caused by: LifecycleException:  Protocol handler initialization  
>>> failed:
>>> java.net.BindException: Address already in use:80
>>>    at
>>> org.apache.catalina.connector.Connector.initialize(Connector.java: 
>>> 1060)
>>>    at
>>>
>> org 
>> .apache 
>> .catalina.core.StandardService.initialize(StandardService.java:677)
>>>    at
>>>
>> org 
>> .ofbiz 
>> .catalina.container.CatalinaContainer.init(CatalinaContainer.java: 
>> 214)
>>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.6 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFJ3SCGrP3NbaWWqE4RAhTMAKDJSkuTvAiatHz59Sg18NAsJvAjIwCfQMr2
>> 4VmM7xVBmXns4+Ov8Q+alO8=
>> =lWjw
>> -----END PGP SIGNATURE-----
>>


Re: httpd (proxy) and tomcat "java.net.BindException: Address already in use:80"

Posted by Branden Strickland <op...@gmail.com>.
NEVERMIND!!! I got it working... I still don't know what OTTB means, but I
kept things 8080 and 8443 and then had 443 and 80 just proxy over to the
8080 and 8443... It's starting now...which is great... now If I can get my
page to be more than a blank screen I'll be on my way!  I think I can handle
that part though!


Thanks BJ!!! You pointed me in the right direction.. I just had to think
about what you were saying for a little bit.


TATA!

On Wed, Apr 8, 2009 at 6:09 PM, BJ Freeman <bj...@free-man.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> if your server is Linux it probably has the apache httpd server running.
> if you don't plan on using the Apache httpd server then turn it off.
> or you can use ajp connector and keep the OTTB ports but have them
> access thru port 80.
>
> http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD
>
> Branden Strickland sent the following on 4/8/2009 2:48 PM:
> > I hope everyone is well!!   Any help on this would make me sane for a
> day!
> > Thanks!
> >
> > I've read quite a bit about this... So I'm hoping I'm not missing
> something
> > utterly ridiculous!
> >
> > I'm getting the error "java.net.BindException: Address already in use:80"
> > when I try to start up ofbiz on my new dedicated server.
> >
> > As background info, I'm running apache not only to use the proxy feature
> for
> > ofbiz, but I'm running 2 other website apps on this server. (as virtual
> > servers SEE HTTPD BELOW).
> >
> > I've edited url.properties and ofbiz-containers.xml to change the ports
> from
> > 8080 to 80 and from 8443 to 443.
> > I thought tomcat and java would play nice with http but maybe I have to
> set
> > a different port number in url.properties, and ofbiz-containers.xml for a
> > port I don't use already?  and have the proxy point to it?
> >
> > I don't think there is anything else on the OFBIZ end correct?  I'm
> running
> > the embedded tomcat and the build is from just last week (forgive me I
> don't
> > have the check out number)  I didn't think it mattered, becuase I'm 99.9%
> > certain it's my httpd.conf thats screwing me.
> >
> >
> > I have in my httpd.conf
> >
> > (just posting important information if you'd like more let me know!)
> > ***************************************************************
> > Listen 80
> >
> > LoadModule proxy_module modules/mod_proxy.so
> > LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
> > LoadModule ssl_module modules/mod_ssl.so
> >
> > ServerName www.buyunum.com:80
> >
> > DocumentRoot "/var/www/html/joomla"
> > <Directory />
> >     Options None
> >     Deny from all
> >     Order Deny,Allow
> >     AllowOverride None
> > </Directory>
> >
> > <Directory "/var/www/html/joomla">
> > Options -Includes -ExecCGI -Indexes FollowSymLinks
> > AllowOverride All
> > Order allow,deny
> > Allow from all
> > </Directory>
> >
> >
> >
> > <IfModule mod_proxy.c>
> > <Proxy *>
> >     AddDefaultCharset off
> >     Order deny,allow
> >     Allow from all
> > </Proxy>
> > ProxyVia On
> > </IfModule>
> >
> > NameVirtualHost *:80
> >
> > <VirtualHost *:80>
> >         ServerName www.buyunum.com
> >         ServerAlias buyunum.com
> >         DocumentRoot /var/www/html/joomla
> > </VirtualHost>
> >
> > <VirtualHost *:80>
> >         ServerName work.buyunum.com
> >         DocumentRoot /var/www/html/egroupware
> >         <Directory "/var/www/html/egroupware">
> >                 AllowOverride FileInfo Options
> >                 Order allow,deny
> >                 Allow from all
> >         </Directory>
> > </VirtualHost>
> >
> > <VirtualHost *:80>
> >         ServerName order.buyunum.com
> >         DocumentRoot /var/www/html/ofbiz
> >         <Directory "/var/www/html/ofbiz">
> >                 AllowOverride FileInfo Options
> >                 Order allow,deny
> >                 Allow from all
> >         </Directory>
> >         ProxyRequests Off
> >         ProxyPreserveHost On
> >         ProxyPass / ajp://localhost:8009/
> >
> >         RewriteEngine On
> >         RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> > </VirtualHost>
> > ********************************************************************
> >
> > I have the ssl stuff as well, but I'm not testing it yet.  One elefant at
> a
> > time!
> >
> > the actual errors I'm getting (just incase):
> > 2009-04-08 21:27:06,871 (main) [     Http11Protocol.java:178:ERROR] Error
> > initializing endpoint
> > java.net.BindException: Address already in use:80
> >     at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
> >     at
> org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
> >     at
> > org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
> >     at
> >
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
> >     at
> >
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
> >     at
> >
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
> >     at
> > org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
> >     at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
> >     at org.ofbiz.base.start.Start.init(Start.java:89)
> >     at org.ofbiz.base.start.Start.main(Start.java:398)
> > org.ofbiz.base.start.StartupException: Cannot init() catalina-container
> > (LifecycleException:  Protocol handler initialization failed:
> > java.net.BindException: Address already in use:80 (Protocol handler
> > initialization failed: java.net.BindException: Address already in
> use:80))
> >     at
> >
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:192)
> >     at
> > org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
> >     at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
> >     at org.ofbiz.base.start.Start.init(Start.java:89)
> >     at org.ofbiz.base.start.Start.main(Start.java:398)
> > org.ofbiz.base.container.ContainerException: LifecycleException:
>  Protocol
> > handler initialization failed: java.net.BindException: Address already in
> > use:80 (Protocol handler initialization failed: java.net.BindException:
> > Address already in use:80)
> >     at
> >
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:216)
> >     at
> >
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
> >     at
> > org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
> >     at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
> >     at org.ofbiz.base.start.Start.init(Start.java:89)
> >     at org.ofbiz.base.start.Start.main(Start.java:398)
> > Caused by: LifecycleException:  Protocol handler initialization failed:
> > java.net.BindException: Address already in use:80
> >     at
> > org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
> >     at
> >
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
> >     at
> >
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
> >     ... 5 more
> > org.ofbiz.base.container.ContainerException: LifecycleException:
>  Protocol
> > handler initialization failed: java.net.BindException: Address already in
> > use:80 (Protocol handler initialization failed: java.net.BindException:
> > Address already in use:80)
> >     at
> >
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:216)
> >     at
> >
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
> >     at
> > org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
> >     at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
> >     at org.ofbiz.base.start.Start.init(Start.java:89)
> >     at org.ofbiz.base.start.Start.main(Start.java:398)
> > Caused by: LifecycleException:  Protocol handler initialization failed:
> > java.net.BindException: Address already in use:80
> >     at
> > org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
> >     at
> >
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
> >     at
> >
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFJ3SCGrP3NbaWWqE4RAhTMAKDJSkuTvAiatHz59Sg18NAsJvAjIwCfQMr2
> 4VmM7xVBmXns4+Ov8Q+alO8=
> =lWjw
> -----END PGP SIGNATURE-----
>

Re: httpd (proxy) and tomcat "java.net.BindException: Address already in use:80"

Posted by BJ Freeman <bj...@free-man.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

if your server is Linux it probably has the apache httpd server running.
if you don't plan on using the Apache httpd server then turn it off.
or you can use ajp connector and keep the OTTB ports but have them
access thru port 80.
http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD

Branden Strickland sent the following on 4/8/2009 2:48 PM:
> I hope everyone is well!!   Any help on this would make me sane for a day!
> Thanks!
> 
> I've read quite a bit about this... So I'm hoping I'm not missing something
> utterly ridiculous!
> 
> I'm getting the error "java.net.BindException: Address already in use:80"
> when I try to start up ofbiz on my new dedicated server.
> 
> As background info, I'm running apache not only to use the proxy feature for
> ofbiz, but I'm running 2 other website apps on this server. (as virtual
> servers SEE HTTPD BELOW).
> 
> I've edited url.properties and ofbiz-containers.xml to change the ports from
> 8080 to 80 and from 8443 to 443.
> I thought tomcat and java would play nice with http but maybe I have to set
> a different port number in url.properties, and ofbiz-containers.xml for a
> port I don't use already?  and have the proxy point to it?
> 
> I don't think there is anything else on the OFBIZ end correct?  I'm running
> the embedded tomcat and the build is from just last week (forgive me I don't
> have the check out number)  I didn't think it mattered, becuase I'm 99.9%
> certain it's my httpd.conf thats screwing me.
> 
> 
> I have in my httpd.conf
> 
> (just posting important information if you'd like more let me know!)
> ***************************************************************
> Listen 80
> 
> LoadModule proxy_module modules/mod_proxy.so
> LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
> LoadModule ssl_module modules/mod_ssl.so
> 
> ServerName www.buyunum.com:80
> 
> DocumentRoot "/var/www/html/joomla"
> <Directory />
>     Options None
>     Deny from all
>     Order Deny,Allow
>     AllowOverride None
> </Directory>
> 
> <Directory "/var/www/html/joomla">
> Options -Includes -ExecCGI -Indexes FollowSymLinks
> AllowOverride All
> Order allow,deny
> Allow from all
> </Directory>
> 
> 
> 
> <IfModule mod_proxy.c>
> <Proxy *>
>     AddDefaultCharset off
>     Order deny,allow
>     Allow from all
> </Proxy>
> ProxyVia On
> </IfModule>
> 
> NameVirtualHost *:80
> 
> <VirtualHost *:80>
>         ServerName www.buyunum.com
>         ServerAlias buyunum.com
>         DocumentRoot /var/www/html/joomla
> </VirtualHost>
> 
> <VirtualHost *:80>
>         ServerName work.buyunum.com
>         DocumentRoot /var/www/html/egroupware
>         <Directory "/var/www/html/egroupware">
>                 AllowOverride FileInfo Options
>                 Order allow,deny
>                 Allow from all
>         </Directory>
> </VirtualHost>
> 
> <VirtualHost *:80>
>         ServerName order.buyunum.com
>         DocumentRoot /var/www/html/ofbiz
>         <Directory "/var/www/html/ofbiz">
>                 AllowOverride FileInfo Options
>                 Order allow,deny
>                 Allow from all
>         </Directory>
>         ProxyRequests Off
>         ProxyPreserveHost On
>         ProxyPass / ajp://localhost:8009/
> 
>         RewriteEngine On
>         RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> </VirtualHost>
> ********************************************************************
> 
> I have the ssl stuff as well, but I'm not testing it yet.  One elefant at a
> time!
> 
> the actual errors I'm getting (just incase):
> 2009-04-08 21:27:06,871 (main) [     Http11Protocol.java:178:ERROR] Error
> initializing endpoint
> java.net.BindException: Address already in use:80
>     at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
>     at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
>     at
> org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
>     at
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
>     at
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
>     at
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
>     at
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>     at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>     at org.ofbiz.base.start.Start.init(Start.java:89)
>     at org.ofbiz.base.start.Start.main(Start.java:398)
> org.ofbiz.base.start.StartupException: Cannot init() catalina-container
> (LifecycleException:  Protocol handler initialization failed:
> java.net.BindException: Address already in use:80 (Protocol handler
> initialization failed: java.net.BindException: Address already in use:80))
>     at
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:192)
>     at
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>     at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>     at org.ofbiz.base.start.Start.init(Start.java:89)
>     at org.ofbiz.base.start.Start.main(Start.java:398)
> org.ofbiz.base.container.ContainerException: LifecycleException:  Protocol
> handler initialization failed: java.net.BindException: Address already in
> use:80 (Protocol handler initialization failed: java.net.BindException:
> Address already in use:80)
>     at
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:216)
>     at
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
>     at
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>     at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>     at org.ofbiz.base.start.Start.init(Start.java:89)
>     at org.ofbiz.base.start.Start.main(Start.java:398)
> Caused by: LifecycleException:  Protocol handler initialization failed:
> java.net.BindException: Address already in use:80
>     at
> org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
>     at
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
>     at
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
>     ... 5 more
> org.ofbiz.base.container.ContainerException: LifecycleException:  Protocol
> handler initialization failed: java.net.BindException: Address already in
> use:80 (Protocol handler initialization failed: java.net.BindException:
> Address already in use:80)
>     at
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:216)
>     at
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
>     at
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>     at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>     at org.ofbiz.base.start.Start.init(Start.java:89)
>     at org.ofbiz.base.start.Start.main(Start.java:398)
> Caused by: LifecycleException:  Protocol handler initialization failed:
> java.net.BindException: Address already in use:80
>     at
> org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
>     at
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
>     at
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ3SCGrP3NbaWWqE4RAhTMAKDJSkuTvAiatHz59Sg18NAsJvAjIwCfQMr2
4VmM7xVBmXns4+Ov8Q+alO8=
=lWjw
-----END PGP SIGNATURE-----