Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-21 Thread Eric Kemp
Problem resolved!  Thanks so much for all the helpful hints.  I had
been going to the end of the catalina.out file and seeing this error
message in the last ~60 lines of text, and thought it represented the
latest restart errors.  What I failed to notice, was that there WERE
previous errors above the "clean" looking lines.  They indicated
tomcat was unable to read the certificate files.  A quick "chmod"
fixed that, and now SSL works.  "Clear them first" was what got me to
see what I had been missing.  Thanks again.


On Mon, Nov 21, 2011 at 5:54 AM, Konstantin Kolinko
 wrote:
> 2011/11/21 Eric Kemp :
>> Below is my entire server.xml (minus commented lines)
>>
>
> Good to know.
>
> Can you post the logs? (catalina..log file). Clear them first
> then try starting Tomcat.
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-21 Thread Jeremy
I understand you want to use APR, but just for troubleshooting purposes,
try using the same server.xml but changing the SSL connector from

protocol="org.apache.coyote.http11.Http11AprProtocol"

to

protocol="org.apache.coyote.http11.Http11NioProtocol"

If that works, then your problem is with APR, most likely with the
installation rather than a bug in APR itself.  I'd try recompiling APR (and
installing the recompiled version).

=Jeremy=

On Sun, Nov 20, 2011 at 6:44 PM, Eric Kemp wrote:

> Below is my entire server.xml (minus commented lines)
>
> 
> 
>
>className="org.apache.catalina.core.AprLifecycleListener"
>  SSLEngine="on" />
>

[snip]


>  
>
>port="8080"
>  protocol="HTTP/1.1"
>  connectionTimeout="2"
>  URIEncoding="UTF-8"
>  redirectPort="8443" />
>
>  
> port="8443"
>  protocol="org.apache.coyote.http11.Http11AprProtocol"
>  maxThreads="150"
>  scheme="https"
>  secure="true"
>  clientAuth="false"
>  sslProtocol="TLS"
>  SSLEnabled="true"
>   SSLCertificateKeyFile="/etc/apache2/ssl/myDomain.com.key"
>  SSLCACertificateFile="/etc/apache2/ssl/myDomain.com.ca.crt" />
>
>  
>
>  className="org.apache.catalina.realm.UserDatabaseRealm"
>   resourceName="UserDatabase"/>
>
>  name="localhost"
>   appBase="webapps"
>   unpackWARs="true"
>   autoDeploy="true"
>   xmlValidation="false"
>   xmlNamespaceAware="false">
>   
>
>  
>  
> 
>
>
> Thanks
>
>
>
>


Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-21 Thread Konstantin Kolinko
2011/11/21 Eric Kemp :
> Below is my entire server.xml (minus commented lines)
>

Good to know.

Can you post the logs? (catalina..log file). Clear them first
then try starting Tomcat.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-21 Thread Pid *
On 21 Nov 2011, at 02:44, Eric Kemp  wrote:

> Below is my entire server.xml (minus commented lines)
>
> 
> 
>
>  className="org.apache.catalina.core.AprLifecycleListener"
> SSLEngine="on" />
>
>  className="org.apache.catalina.core.JasperListener" />
>
>  className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
>
>  className="org.apache.catalina.mbeans.ServerLifecycleListener" />
>
>  className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
>
> 
>
>type="org.apache.catalina.UserDatabase"
>  description="User database that can be updated and saved"
>  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>  pathname="conf/tomcat-users.xml" />
>
> 
>
> 
>
>port="8080"
>  protocol="HTTP/1.1"
>  connectionTimeout="2"
>  URIEncoding="UTF-8"
>  redirectPort="8443" />
>
>  

What happens if you use 8444 instead?


p

>port="8443"
>  protocol="org.apache.coyote.http11.Http11AprProtocol"
>  maxThreads="150"
>  scheme="https"
>  secure="true"
>  clientAuth="false"
>  sslProtocol="TLS"
>  SSLEnabled="true"
>  SSLCertificateKeyFile="/etc/apache2/ssl/myDomain.com.key"
>  SSLCACertificateFile="/etc/apache2/ssl/myDomain.com.ca.crt" />
>
>  
>
>      className="org.apache.catalina.realm.UserDatabaseRealm"
>   resourceName="UserDatabase"/>
>
>  name="localhost"
>   appBase="webapps"
>   unpackWARs="true"
>   autoDeploy="true"
>   xmlValidation="false"
>   xmlNamespaceAware="false">
>   
>
>  
> 
> 
>
>
> Thanks
>
>
>
> On Sun, Nov 20, 2011 at 4:18 PM, Caldarale, Charles R
>  wrote:
>>> From: Eric Kemp [mailto:cruisingat90...@gmail.com]
>>> Subject: Re: APR SSL error: "Socket bind failed: [98] Address already in 
>>> use"
>>
>>> Any other ideas would still be appreciated.
>>
>> As others have noted, the conflict is likely on some port other than 8443.  
>> Post your entire server.xml, preferably with comments removed, so we can see 
>> all of the ports declared there.
>>
>>  - Chuck
>>
>>
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
>> MATERIAL and is thus for use only by the intended recipient. If you received 
>> this in error, please contact the sender and delete the e-mail and its 
>> attachments from all computers.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-20 Thread Eric Kemp
Below is my entire server.xml (minus commented lines)




 

 

 

 

 

 

  

 

 

  

  
  

  

   

   
   

  
 



Thanks



On Sun, Nov 20, 2011 at 4:18 PM, Caldarale, Charles R
 wrote:
>> From: Eric Kemp [mailto:cruisingat90...@gmail.com]
>> Subject: Re: APR SSL error: "Socket bind failed: [98] Address already in use"
>
>> Any other ideas would still be appreciated.
>
> As others have noted, the conflict is likely on some port other than 8443.  
> Post your entire server.xml, preferably with comments removed, so we can see 
> all of the ports declared there.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-20 Thread Caldarale, Charles R
> From: Eric Kemp [mailto:cruisingat90...@gmail.com] 
> Subject: Re: APR SSL error: "Socket bind failed: [98] Address already in use"

> Any other ideas would still be appreciated.

As others have noted, the conflict is likely on some port other than 8443.  
Post your entire server.xml, preferably with comments removed, so we can see 
all of the ports declared there.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-20 Thread Eric Kemp
Changing from jdk1.7.0_01 to 1.6.0_20 still results in the same error.

I use the following commands to stop and start Tomcat:
sudo /etc/init.d/tomcat6 stop
sudo /etc/init.d/tomcat6 start

I have verified that the Tomcat process DOES shut down when initiating
a "stop" command via "ps -ef | grep java" only showing the current
"grep" command.

Ubuntu's "apt-get" put me at this current level (of Tomcat 6.0.24 and
APR from 1.1.19-1) which I assumed would be fine.  I'll see about
trying to upgrade to Tomcat 6.0.33 and possibly APR 1.1.20-1.

Any other ideas would still be appreciated.

Thanks


On Sun, Nov 20, 2011 at 5:09 AM, Pid *  wrote:
> On 19 Nov 2011, at 18:44, Eric Kemp  wrote:
>
>> Summary: I'm looking for ideas on how to resolve this "Address already
>> in use" error when configuring SSL in Tomcat APR.
>>
>> Environment:
>> Running Apache Tomcat/6.0.24
>> on OS is Ubuntu 10.04.2 LTS
>> with JVM 1.7.0_01-b08
>>
>> //
>> // Prior to configuring SSL, and after starting Tomcat I run "netstat
>> -tulpn" and see that port 8443 is not used:
>> //
>> Active Internet connections (only servers)
>> Proto Recv-Q Send-Q Local Address           Foreign Address
>> State       PID/Program name
>> tcp        0      0 127.0.0.1:3306          0.0.0.0:*
>> LISTEN      29002/mysqld
>> tcp        0      0 0.0.0.0:22              0.0.0.0:*
>> LISTEN      2136/sshd
>> tcp6       0      0 127.0.0.1:8005          :::*
>> LISTEN      12796/java
>> tcp6       0      0 :::8080                 :::*
>> LISTEN      12796/java
>> tcp6       0      0 :::22                   :::*
>> LISTEN      2136/sshd
>> udp        0      0 0.0.0.0:68              0.0.0.0:*
>>         2087/dhclient3
>>
>> //
>> // I stop Tomcat, and add the following to my server.xml file:
>> //
>> > SSLEngine="on" />
>> >           protocol="org.apache.coyote.http11.Http11AprProtocol"
>>           maxThreads="150"
>>           scheme="https"
>>           secure="true"
>>           clientAuth="false"
>>           sslProtocol="TLS"
>>           SSLEnabled="true"
>>           SSLCertificateKeyFile="/etc/apache2/ssl/myUniqueDomain.com.key"
>>           SSLCACertificateFile="/etc/apache2/ssl/myUniqueDomain.com.ca.crt" 
>> />
>>
>> //
>> // I restart Tomcat, and see the following in the catalina.out file:
>
> How are you start/stop/restarting Tomcat - bin/script or service?
>
> After calling stop, are you sure Tomcat has actually stopped?
>
>
> p
>
>
>
>> //
>> SEVERE: Error starting endpoint
>> java.lang.Exception: Socket bind failed: [98] Address already in use
>>        at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:646)
>>        at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:753)
>>        at 
>> org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
>>        at org.apache.catalina.connector.Connector.start(Connector.java:1080)
>>        at 
>> org.apache.catalina.core.StandardService.start(StandardService.java:531)
>>        at 
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>        at java.lang.reflect.Method.invoke(Method.java:601)
>>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>>
>> Nov 19, 2011 11:35:19 AM org.apache.catalina.startup.Catalina start
>> SEVERE: Catalina.start:
>> LifecycleException:  service.getName(): "Catalina";  Protocol handler
>> start failed: java.lang.Exception: Socket bind failed: [98] Address
>> already in use
>>        at org.apache.catalina.connector.Connector.start(Connector.java:1087)
>>        at 
>> org.apache.catalina.core.StandardService.start(StandardService.java:531)
>>        at 
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>        at java.lang.reflect.Method.invoke(Method.java:601)
>>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>>
>> //
>> // Running "netstat -tulpn" I see that port 8443 is now being used:
>> //
>> Active Internet connections (only servers)
>> Proto Recv-Q Send-Q Local Address           Foreign Address
>> State       PID/Program name
>> tcp        0      0 127.0.0.1:3306          0.0.0.0:*
>> LISTEN      29

Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-20 Thread Pid *
On 20 Nov 2011, at 12:49, Igor Cicimov  wrote:

> Isnt 8005 shutdown port for tomcat? I can see sshd bound to that port
> already.

I think that's the line above...
There is a java process holding 8005


> On Nov 20, 2011 6:33 PM, "Konstantin Kolinko" 
> wrote:
>
>> 2011/11/19 Eric Kemp :
>>> Summary: I'm looking for ideas on how to resolve this "Address already
>>> in use" error when configuring SSL in Tomcat APR.
>>>
>>> Environment:
>>> Running Apache Tomcat/6.0.24
>>
>> That one is old. Maybe you can upgrade to 6.0.33?
>>
>>> on OS is Ubuntu 10.04.2 LTS
>>> with JVM 1.7.0_01-b08
>>
>> There were severe issues with 1.7.0, such as "Loop unroll optimization
>> causes incorrect result". I do not know whether all of them are fixed
>> in 7u1.
>> http://tomcat.markmail.org/thread/oghpdg2whkrpnk7w
>>
>> Anyway, maybe you can try running with Java 6?
>>
>>> //
>>> // I restart Tomcat, and see the following in the catalina.out file:
>>> //
>>> SEVERE: Error starting endpoint
>>> java.lang.Exception: Socket bind failed: [98] Address already in use
>>>   at
>> org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:646)
>>>   at
>> org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:753)
>>>   at
>> org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
>>>   at
>> org.apache.catalina.connector.Connector.start(Connector.java:1080)
>>>   at
>> org.apache.catalina.core.StandardService.start(StandardService.java:531)
>>>   at
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>>   at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>>>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>   at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>   at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>   at java.lang.reflect.Method.invoke(Method.java:601)
>>>   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>>>   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>>
>> What INFO messages are before this one?
>> Maybe you can post your entire server.xml (without comments and passwords)?
>>
>>
>> Best regards,
>> Konstantin Kolinko
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-20 Thread Igor Cicimov
Isnt 8005 shutdown port for tomcat? I can see sshd bound to that port
already.
On Nov 20, 2011 6:33 PM, "Konstantin Kolinko" 
wrote:

> 2011/11/19 Eric Kemp :
> > Summary: I'm looking for ideas on how to resolve this "Address already
> > in use" error when configuring SSL in Tomcat APR.
> >
> > Environment:
> >  Running Apache Tomcat/6.0.24
>
> That one is old. Maybe you can upgrade to 6.0.33?
>
> >  on OS is Ubuntu 10.04.2 LTS
> >  with JVM 1.7.0_01-b08
>
> There were severe issues with 1.7.0, such as "Loop unroll optimization
> causes incorrect result". I do not know whether all of them are fixed
> in 7u1.
> http://tomcat.markmail.org/thread/oghpdg2whkrpnk7w
>
> Anyway, maybe you can try running with Java 6?
>
> > //
> > // I restart Tomcat, and see the following in the catalina.out file:
> > //
> > SEVERE: Error starting endpoint
> > java.lang.Exception: Socket bind failed: [98] Address already in use
> >at
> org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:646)
> >at
> org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:753)
> >at
> org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
> >at
> org.apache.catalina.connector.Connector.start(Connector.java:1080)
> >at
> org.apache.catalina.core.StandardService.start(StandardService.java:531)
> >at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> >at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >at java.lang.reflect.Method.invoke(Method.java:601)
> >at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> >at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>
> What INFO messages are before this one?
> Maybe you can post your entire server.xml (without comments and passwords)?
>
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-20 Thread Pid *
On 19 Nov 2011, at 18:44, Eric Kemp  wrote:

> Summary: I'm looking for ideas on how to resolve this "Address already
> in use" error when configuring SSL in Tomcat APR.
>
> Environment:
> Running Apache Tomcat/6.0.24
> on OS is Ubuntu 10.04.2 LTS
> with JVM 1.7.0_01-b08
>
> //
> // Prior to configuring SSL, and after starting Tomcat I run "netstat
> -tulpn" and see that port 8443 is not used:
> //
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address   Foreign Address
> State   PID/Program name
> tcp0  0 127.0.0.1:3306  0.0.0.0:*
> LISTEN  29002/mysqld
> tcp0  0 0.0.0.0:22  0.0.0.0:*
> LISTEN  2136/sshd
> tcp6   0  0 127.0.0.1:8005  :::*
> LISTEN  12796/java
> tcp6   0  0 :::8080 :::*
> LISTEN  12796/java
> tcp6   0  0 :::22   :::*
> LISTEN  2136/sshd
> udp0  0 0.0.0.0:68  0.0.0.0:*
> 2087/dhclient3
>
> //
> // I stop Tomcat, and add the following to my server.xml file:
> //
>  SSLEngine="on" />
>protocol="org.apache.coyote.http11.Http11AprProtocol"
>   maxThreads="150"
>   scheme="https"
>   secure="true"
>   clientAuth="false"
>   sslProtocol="TLS"
>   SSLEnabled="true"
>   SSLCertificateKeyFile="/etc/apache2/ssl/myUniqueDomain.com.key"
>   SSLCACertificateFile="/etc/apache2/ssl/myUniqueDomain.com.ca.crt" />
>
> //
> // I restart Tomcat, and see the following in the catalina.out file:

How are you start/stop/restarting Tomcat - bin/script or service?

After calling stop, are you sure Tomcat has actually stopped?


p



> //
> SEVERE: Error starting endpoint
> java.lang.Exception: Socket bind failed: [98] Address already in use
>at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:646)
>at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:753)
>at 
> org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
>at org.apache.catalina.connector.Connector.start(Connector.java:1080)
>at 
> org.apache.catalina.core.StandardService.start(StandardService.java:531)
>at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>at java.lang.reflect.Method.invoke(Method.java:601)
>at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>
> Nov 19, 2011 11:35:19 AM org.apache.catalina.startup.Catalina start
> SEVERE: Catalina.start:
> LifecycleException:  service.getName(): "Catalina";  Protocol handler
> start failed: java.lang.Exception: Socket bind failed: [98] Address
> already in use
>at org.apache.catalina.connector.Connector.start(Connector.java:1087)
>at 
> org.apache.catalina.core.StandardService.start(StandardService.java:531)
>at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>at java.lang.reflect.Method.invoke(Method.java:601)
>at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>
> //
> // Running "netstat -tulpn" I see that port 8443 is now being used:
> //
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address   Foreign Address
> State   PID/Program name
> tcp0  0 127.0.0.1:3306  0.0.0.0:*
> LISTEN  29002/mysqld
> tcp0  0 0.0.0.0:22  0.0.0.0:*
> LISTEN  2136/sshd
> tcp6   0  0 127.0.0.1:8005  :::*
> LISTEN  10696/java
> tcp6   0  0 :::8080 :::*
> LISTEN  10696/java
> tcp6   0  0 :::22   :::*
> LISTEN  2136/sshd
> tcp6   0  0 :::8443 :::*
> LISTEN  10696/java
> udp0  0 0.0.0.0:68  0.0.0.0:*
> 2087/dhclient3
>
> If I change  the same error message, and "netstat -tulpn" shows:
> tcp6   0  0 :::8445 :::*
> LISTEN  10696/java
>
> I have also tried adding the following to my server.xml as an
> attribute to " SSLCertificateFile="/etc/apache2/ssl/domain.com.crt"
>
> 

Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-19 Thread Konstantin Kolinko
2011/11/19 Eric Kemp :
> Summary: I'm looking for ideas on how to resolve this "Address already
> in use" error when configuring SSL in Tomcat APR.
>
> Environment:
>  Running Apache Tomcat/6.0.24

That one is old. Maybe you can upgrade to 6.0.33?

>  on OS is Ubuntu 10.04.2 LTS
>  with JVM 1.7.0_01-b08

There were severe issues with 1.7.0, such as "Loop unroll optimization
causes incorrect result". I do not know whether all of them are fixed
in 7u1.
http://tomcat.markmail.org/thread/oghpdg2whkrpnk7w

Anyway, maybe you can try running with Java 6?

> //
> // I restart Tomcat, and see the following in the catalina.out file:
> //
> SEVERE: Error starting endpoint
> java.lang.Exception: Socket bind failed: [98] Address already in use
>        at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:646)
>        at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:753)
>        at 
> org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
>        at org.apache.catalina.connector.Connector.start(Connector.java:1080)
>        at 
> org.apache.catalina.core.StandardService.start(StandardService.java:531)
>        at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>        at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:601)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

What INFO messages are before this one?
Maybe you can post your entire server.xml (without comments and passwords)?


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-19 Thread Eric Kemp
I've seen several places where people say [98] is the error message
number - not the port number.  Also, I'm not doing anything with port
98.

Thanks


On Sat, Nov 19, 2011 at 8:03 PM, Talal Rabaa  wrote:
> Looks like you have another service (not necessarily Tomcat) running on port 
> 98.
>
> On 2011-11-19, at 1:44 PM, Eric Kemp wrote:
>
>> Summary: I'm looking for ideas on how to resolve this "Address already
>> in use" error when configuring SSL in Tomcat APR.
>>
>> Environment:
>> Running Apache Tomcat/6.0.24
>> on OS is Ubuntu 10.04.2 LTS
>> with JVM 1.7.0_01-b08
>>
>> //
>> // Prior to configuring SSL, and after starting Tomcat I run "netstat
>> -tulpn" and see that port 8443 is not used:
>> //
>> Active Internet connections (only servers)
>> Proto Recv-Q Send-Q Local Address           Foreign Address
>> State       PID/Program name
>> tcp        0      0 127.0.0.1:3306          0.0.0.0:*
>> LISTEN      29002/mysqld
>> tcp        0      0 0.0.0.0:22              0.0.0.0:*
>> LISTEN      2136/sshd
>> tcp6       0      0 127.0.0.1:8005          :::*
>> LISTEN      12796/java
>> tcp6       0      0 :::8080                 :::*
>> LISTEN      12796/java
>> tcp6       0      0 :::22                   :::*
>> LISTEN      2136/sshd
>> udp        0      0 0.0.0.0:68              0.0.0.0:*
>>         2087/dhclient3
>>
>> //
>> // I stop Tomcat, and add the following to my server.xml file:
>> //
>> > SSLEngine="on" />
>> >           protocol="org.apache.coyote.http11.Http11AprProtocol"
>>           maxThreads="150"
>>           scheme="https"
>>           secure="true"
>>           clientAuth="false"
>>           sslProtocol="TLS"
>>           SSLEnabled="true"
>>           SSLCertificateKeyFile="/etc/apache2/ssl/myUniqueDomain.com.key"
>>           SSLCACertificateFile="/etc/apache2/ssl/myUniqueDomain.com.ca.crt" 
>> />
>>
>> //
>> // I restart Tomcat, and see the following in the catalina.out file:
>> //
>> SEVERE: Error starting endpoint
>> java.lang.Exception: Socket bind failed: [98] Address already in use
>>        at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:646)
>>        at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:753)
>>        at 
>> org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
>>        at org.apache.catalina.connector.Connector.start(Connector.java:1080)
>>        at 
>> org.apache.catalina.core.StandardService.start(StandardService.java:531)
>>        at 
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>        at java.lang.reflect.Method.invoke(Method.java:601)
>>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>>
>> Nov 19, 2011 11:35:19 AM org.apache.catalina.startup.Catalina start
>> SEVERE: Catalina.start:
>> LifecycleException:  service.getName(): "Catalina";  Protocol handler
>> start failed: java.lang.Exception: Socket bind failed: [98] Address
>> already in use
>>        at org.apache.catalina.connector.Connector.start(Connector.java:1087)
>>        at 
>> org.apache.catalina.core.StandardService.start(StandardService.java:531)
>>        at 
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>        at java.lang.reflect.Method.invoke(Method.java:601)
>>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>>
>> //
>> // Running "netstat -tulpn" I see that port 8443 is now being used:
>> //
>> Active Internet connections (only servers)
>> Proto Recv-Q Send-Q Local Address           Foreign Address
>> State       PID/Program name
>> tcp        0      0 127.0.0.1:3306          0.0.0.0:*
>> LISTEN      29002/mysqld
>> tcp        0      0 0.0.0.0:22              0.0.0.0:*
>> LISTEN      2136/sshd
>> tcp6       0      0 127.0.0.1:8005          :::*
>> LISTEN      10696/java
>> tcp6       0      0 :::8080                 :::*
>> LISTEN      10696/java
>> tcp6       0      0 :::22                   :::*
>> LISTEN      2136/sshd
>> tcp6       0      0 :::8443                 :::*
>> LISTEN      10696/java
>> udp        0      0 0.0.0.0:68              0.0.0.0:*
>>         2087/dhclient3
>>
>> If I cha

Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-19 Thread Talal Rabaa
Looks like you have another service (not necessarily Tomcat) running on port 98.

On 2011-11-19, at 1:44 PM, Eric Kemp wrote:

> Summary: I'm looking for ideas on how to resolve this "Address already
> in use" error when configuring SSL in Tomcat APR.
> 
> Environment:
> Running Apache Tomcat/6.0.24
> on OS is Ubuntu 10.04.2 LTS
> with JVM 1.7.0_01-b08
> 
> //
> // Prior to configuring SSL, and after starting Tomcat I run "netstat
> -tulpn" and see that port 8443 is not used:
> //
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address   Foreign Address
> State   PID/Program name
> tcp0  0 127.0.0.1:3306  0.0.0.0:*
> LISTEN  29002/mysqld
> tcp0  0 0.0.0.0:22  0.0.0.0:*
> LISTEN  2136/sshd
> tcp6   0  0 127.0.0.1:8005  :::*
> LISTEN  12796/java
> tcp6   0  0 :::8080 :::*
> LISTEN  12796/java
> tcp6   0  0 :::22   :::*
> LISTEN  2136/sshd
> udp0  0 0.0.0.0:68  0.0.0.0:*
> 2087/dhclient3
> 
> //
> // I stop Tomcat, and add the following to my server.xml file:
> //
>  SSLEngine="on" />
>protocol="org.apache.coyote.http11.Http11AprProtocol"
>   maxThreads="150"
>   scheme="https"
>   secure="true"
>   clientAuth="false"
>   sslProtocol="TLS"
>   SSLEnabled="true"
>   SSLCertificateKeyFile="/etc/apache2/ssl/myUniqueDomain.com.key"
>   SSLCACertificateFile="/etc/apache2/ssl/myUniqueDomain.com.ca.crt" />
> 
> //
> // I restart Tomcat, and see the following in the catalina.out file:
> //
> SEVERE: Error starting endpoint
> java.lang.Exception: Socket bind failed: [98] Address already in use
>at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:646)
>at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:753)
>at 
> org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
>at org.apache.catalina.connector.Connector.start(Connector.java:1080)
>at 
> org.apache.catalina.core.StandardService.start(StandardService.java:531)
>at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>at java.lang.reflect.Method.invoke(Method.java:601)
>at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> 
> Nov 19, 2011 11:35:19 AM org.apache.catalina.startup.Catalina start
> SEVERE: Catalina.start:
> LifecycleException:  service.getName(): "Catalina";  Protocol handler
> start failed: java.lang.Exception: Socket bind failed: [98] Address
> already in use
>at org.apache.catalina.connector.Connector.start(Connector.java:1087)
>at 
> org.apache.catalina.core.StandardService.start(StandardService.java:531)
>at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>at java.lang.reflect.Method.invoke(Method.java:601)
>at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> 
> //
> // Running "netstat -tulpn" I see that port 8443 is now being used:
> //
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address   Foreign Address
> State   PID/Program name
> tcp0  0 127.0.0.1:3306  0.0.0.0:*
> LISTEN  29002/mysqld
> tcp0  0 0.0.0.0:22  0.0.0.0:*
> LISTEN  2136/sshd
> tcp6   0  0 127.0.0.1:8005  :::*
> LISTEN  10696/java
> tcp6   0  0 :::8080 :::*
> LISTEN  10696/java
> tcp6   0  0 :::22   :::*
> LISTEN  2136/sshd
> tcp6   0  0 :::8443 :::*
> LISTEN  10696/java
> udp0  0 0.0.0.0:68  0.0.0.0:*
> 2087/dhclient3
> 
> If I change  the same error message, and "netstat -tulpn" shows:
> tcp6   0  0 :::8445 :::*
> LISTEN  10696/java
> 
> I have also tried adding the following to my server.xml as an
> attribute to " SSLCertificateFile="/etc/apache2/ssl/domain.com.crt"
> 
> It appears as if adding a single connector for