geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v3.0 > Runtime issues
Date Fri, 15 Jul 2011 03:18:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/4/_/styles/combined.css?spaceKey=GMOxDOC30&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Runtime+issues">Runtime
issues</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~chirunhua@gmail.com">Runhua
Chi</a>
    </h4>
        <br/>
                         <h4>Changes (6)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>h2. JVM arguments <br></td></tr>
            <tr><td class="diff-changed-lines" >Apache Geronimo <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">v2.2</span>
<span class="diff-added-words"style="background-color: #dfd;">v3.0</span> is Java
EE <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">certified.</span>
<span class="diff-added-words"style="background-color: #dfd;">6 compliant.</span>
With that said, it will likely run on different JVM versions however the results may be unpredictable.
Whenever possible use jdk <span class="diff-changed-words">1.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">5</span><span
class="diff-added-chars"style="background-color: #dfd;">6</span></span> or
above. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>Another common problem
related to Java is that, sometimes, certain environment variables are not defined at Java
installation time. For instance, Geronimo requires *JAVA_HOME* and *JRE_HOME* to be defined
before running the server. As a convenience, make sure you also add {{&lt;JAVA_HOME&gt;/bin}}
directory to the system *PATH*. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >#* set JAVA_OPTS environment variable:
<br>{noformat:borderStyle=solid} <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">jeffchi@Local:~/geronimo-tomcat6-javaee5-2.2-SNAPSHOT$</span>
<span class="diff-added-words"style="background-color: #dfd;">jeffchi@Local:~/geronimo-tomcat7-javaee6-3.0-SNAPSHOT$</span>
export JAVA_OPTS=&quot;-Xmx256m -XX:MaxPermSize=128m -XX:+HeapDumpOnOutOfMemoryError&quot;
<br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">jeffchi@Local:~/geronimo-tomcat6-javaee5-2.2-SNAPSHOT$./bin/geronimo.sh</span>
<span class="diff-added-words"style="background-color: #dfd;">jeffchi@Local:~/geronimo-tomcat7-javaee6-3.0-SNAPSHOT$./bin/geronimo.sh</span>
run <br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br>#* and/or append
the following code to {{&lt;Geronimo_Home&gt;/bin/setjavaenv.sh(bat)}} file: <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >#* or use *-J* flag: <br>{noformat:BorderStyle=Solid}
<br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">jeffchi@Local:~/geronimo-tomcat6-javaee5-2.2-SNAPSHOT$./bin/gsh</span>
<span class="diff-added-words"style="background-color: #dfd;">jeffchi@Local:~/geronimo-tomcat7-javaee6-3.0-SNAPSHOT$./bin/gsh</span>
geronimo/start-server -J &quot;-Xmx256m -XX:MaxPermSize=128m -XX:+HeapDumpOnOutOfMemoryError&quot;
<br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h2.
Server hang due to low entropy on Linux <br>When starting a Geronimo server on a Linux
system, the server start seems to hang. However, if you&#39;re patient, the server will
eventually start. If you&#39;re inquisitive, and dump the stack traces of the java process,
you&#39;ll see something like: <br>{code} <br>&quot;main&quot; prio=10
tid=0x0000000040c0d800 nid=0xa79 runnable [0x00007f57a04fb000] <br>  java.lang.Thread.State:
RUNNABLE <br>       at java.io.FileInputStream.readBytes(Native Method) <br> 
     at java.io.FileInputStream.read(FileInputStream.java:220) <br>       at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:185)
<br>       at sun.security.provider.NativePRNG$RandomIO.implGenerateSeed(NativePRNG.java:202)
<br>       - locked &lt;0x00000000daad63e0&gt; (a java.lang.Object) <br>
      at sun.security.provider.NativePRNG$RandomIO.access$300(NativePRNG.java:108) <br>
      at sun.security.provider.NativePRNG.engineGenerateSeed(NativePRNG.java:102) <br>
      at java.security.SecureRandom.generateSeed(SecureRandom.java:495) <br>       at
com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore.getSalt(PKCS12KeyStore.java:477) <br>
      at com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore.calculateMac(PKCS12KeyStore.java:834)
<br>       at com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore.engineStore(PKCS12KeyStore.java:788)
<br>       - locked &lt;0x00000000d3b5a768&gt; (a com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore)
<br>       at java.security.KeyStore.store(KeyStore.java:1117) <br>... <br>{code}
<br>This problem isn&#39;t Geronimo specific.  <br> <br>The Sun/Oracle-based
JVM is attempting to generate a pseudo-random number to be used as a seed for an SSL server
socket. To generate the pseudo-random number, the JVM is reading from the /dev/random device
to obtain some random information for the seed. The problem is that reads from the /dev/random
device will block if the system does not have a good source of random events. So, the Geronimo
server startup is blocked waiting for enough random information to be returned from /dev/random.
This article may be help understand the basic issue -- [http://en.wikipedia.org/wiki//dev/random#Linux]
<br> <br>To avoid the problem, you can choose to use the /dev/urandom device,
instead of /dev/random, by specifying the following java property {{-Djava.security.egd=file:/dev/./urandom}}.
For exmaple, start the server using the following command: <br>{panel} <br>$ GERONIMO_OPTS=&quot;-Djava.security.egd=file:/dev/./urandom&quot;
./geronimo run --long <br>{panel} <br> <br></td></tr>
            <tr><td class="diff-unchanged" >h2. Port conflicts <br>The second
most common startup issue is associated to port conflicts, check no other application is using
or blocking Geronimo&#39;s default ports: <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >To use multicasting properly in a
clustered enviornment, you will need to set the system property {{java.net.preferIPv4Stack}}
to {{true}} when starting Geronimo. <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h2.
Administration console unaccessbile by HTTPs in Internet Explorer 6  <br>If you navigate
your browser Internet Explorer (IE) 6 to the console via https://_hostname_:8443/console where
_hostname_ is replaced with the host name where the Geronimo server is running, you will get
an error &quot;The page cannot be displayed&quot;. To remedy this problem, click *Tools-&gt;Internet
Options*, and select the *Advanced* tab. In the *Security* section, select the checkbox *TLS
1.0*, and you will be prompted with a Security Alert. Click *Yes* to view the administrative
console. If you want to see information about the certificate, click *View Certificate*. If
you want IE to accept WASCE CA permanently, you can install the certification in IE. <br>
<br></td></tr>
            <tr><td class="diff-unchanged" >h2. java.io.IOException of remote
EJB on Windows <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/GMOxDOC30/Development+issues"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/GMOxDOC30/Development+issues">Development
issues</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/GMOxDOC30/Debugging+and+Troubleshooting"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/GMOxDOC30/Debugging+and+Troubleshooting">Debugging and Troubleshooting</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/GMOxDOC30/Web+Services+issues">Web
Services issues</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC30/Web+Services+issues"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<p>Most of the issues you may find when running Geronimo will be at start up time; and
most likely driven by some conflicting resources from the environment where Geronimo is set
up.</p>
<div>
<ul>
    <li><a href='#Runtimeissues-JVMarguments'>JVM arguments</a></li>
    <li><a href='#Runtimeissues-ServerhangduetolowentropyonLinux'>Server hang
due to low entropy on Linux</a></li>
    <li><a href='#Runtimeissues-Portconflicts'>Port conflicts</a></li>
    <li><a href='#Runtimeissues-Springversionconflicts'>Spring version conflicts</a></li>
    <li><a href='#Runtimeissues-java.lang.UnsatisfiedLinkError%3Alic%28LibraryisalreadyloadedinanotherClassLoader%29'>java.lang.UnsatisfiedLinkError:
lic (Library is already loaded in another ClassLoader)</a></li>
    <li><a href='#Runtimeissues-EnablemulticastingforIPv4network'>Enable multicasting
for IPv4 network</a></li>
    <li><a href='#Runtimeissues-java.io.IOExceptionofremoteEJBonWindows'>java.io.IOException
of remote EJB on Windows</a></li>
</ul></div>

<h2><a name="Runtimeissues-JVMarguments"></a>JVM arguments</h2>
<p>Apache Geronimo v3.0 is Java EE 6 compliant. With that said, it will likely run on
different JVM versions however the results may be unpredictable. Whenever possible use jdk
1.6 or above.</p>

<p>Another common problem related to Java is that, sometimes, certain environment variables
are not defined at Java installation time. For instance, Geronimo requires <b>JAVA_HOME</b>
and <b>JRE_HOME</b> to be defined before running the server. As a convenience,
make sure you also add <tt>&lt;JAVA_HOME&gt;/bin</tt> directory to the
system <b>PATH</b>.</p>

<p>You can choose one of following options to use JVM arguments depending on how you're
starting Geronimo</p>
<ol>
	<li>startup.sh or geronimo.sh run
	<ul>
		<li>set JAVA_OPTS environment variable:
<div class="preformatted panel" style="border-style: solid;border-width: 1px;"><div
class="preformattedContent panelContent">
<pre>jeffchi@Local:~/geronimo-tomcat7-javaee6-3.0-SNAPSHOT$ export JAVA_OPTS="-Xmx256m
-XX:MaxPermSize=128m -XX:+HeapDumpOnOutOfMemoryError" 
jeffchi@Local:~/geronimo-tomcat7-javaee6-3.0-SNAPSHOT$./bin/geronimo.sh run
</pre>
</div></div></li>
		<li>and/or append the following code to <tt>&lt;Geronimo_Home&gt;/bin/setjavaenv.sh(bat)</tt>
file:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
       <span class="code-keyword">if</span> [ -z <span class="code-quote">"$JAVA_OPTS"</span>
]; then
          JAVA_OPTS=<span class="code-quote">"-Xmx256m -XX:MaxPermSize=128m -XX:+HeapDumpOnOutOfMemoryError"</span>
       fi
</pre>
</div></div></li>
	</ul>
	</li>
	<li>start-server or gsh geronimo/start-server
	<ul>
		<li>edit <tt>&lt;Geronimo_Home&gt;/etc/rc.d/start-server,default.groovy</tt>
file:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
       <span class="code-comment">// Append some reasonable java flags <span class="code-keyword">if</span>
none were configured already
</span>       <span class="code-keyword">if</span> (command.javaFlags.empty)
{
           command.javaFlags &lt;&lt; '-Xmx256m'
           command.javaFlags &lt;&lt; '-XX:MaxPermSize=128m'
           command.javaFlags &lt;&lt; '-XX:+HeapDumpOnOutOfMemoryError'
       }
</pre>
</div></div></li>
		<li>or use <b>-J</b> flag:
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>jeffchi@Local:~/geronimo-tomcat7-javaee6-3.0-SNAPSHOT$./bin/gsh geronimo/start-server
-J "-Xmx256m -XX:MaxPermSize=128m -XX:+HeapDumpOnOutOfMemoryError"
</pre>
</div></div></li>
	</ul>
	</li>
</ol>


<h2><a name="Runtimeissues-ServerhangduetolowentropyonLinux"></a>Server
hang due to low entropy on Linux</h2>
<p>When starting a Geronimo server on a Linux system, the server start seems to hang.
However, if you're patient, the server will eventually start. If you're inquisitive, and dump
the stack traces of the java process, you'll see something like:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
<span class="code-quote">"main"</span> prio=10 tid=0x0000000040c0d800 nid=0xa79
runnable [0x00007f57a04fb000]
  java.lang.<span class="code-object">Thread</span>.State: RUNNABLE
       at java.io.FileInputStream.readBytes(Native Method)
       at java.io.FileInputStream.read(FileInputStream.java:220)
       at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:185)
       at sun.security.provider.NativePRNG$RandomIO.implGenerateSeed(NativePRNG.java:202)
       - locked &lt;0x00000000daad63e0&gt; (a java.lang.<span class="code-object">Object</span>)
       at sun.security.provider.NativePRNG$RandomIO.access$300(NativePRNG.java:108)
       at sun.security.provider.NativePRNG.engineGenerateSeed(NativePRNG.java:102)
       at java.security.SecureRandom.generateSeed(SecureRandom.java:495)
       at com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore.getSalt(PKCS12KeyStore.java:477)
       at com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore.calculateMac(PKCS12KeyStore.java:834)
       at com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore.engineStore(PKCS12KeyStore.java:788)
       - locked &lt;0x00000000d3b5a768&gt; (a com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore)
       at java.security.KeyStore.store(KeyStore.java:1117)
...
</pre>
</div></div>
<p>This problem isn't Geronimo specific. </p>

<p>The Sun/Oracle-based JVM is attempting to generate a pseudo-random number to be used
as a seed for an SSL server socket. To generate the pseudo-random number, the JVM is reading
from the /dev/random device to obtain some random information for the seed. The problem is
that reads from the /dev/random device will block if the system does not have a good source
of random events. So, the Geronimo server startup is blocked waiting for enough random information
to be returned from /dev/random. This article may be help understand the basic issue &#8211;
<a href="http://en.wikipedia.org/wiki//dev/random#Linux" class="external-link" rel="nofollow">http://en.wikipedia.org/wiki//dev/random#Linux</a></p>

<p>To avoid the problem, you can choose to use the /dev/urandom device, instead of /dev/random,
by specifying the following java property <tt>-Djava.security.egd=<a href="file:/dev/./urandom"
class="external-link" rel="nofollow">file:/dev/./urandom</a></tt>. For exmaple,
start the server using the following command:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>$ GERONIMO_OPTS="-Djava.security.egd=<a href="file:/dev/./urandom" class="external-link"
rel="nofollow">file:/dev/./urandom</a>" ./geronimo run --long</p>
</div></div>

<h2><a name="Runtimeissues-Portconflicts"></a>Port conflicts</h2>
<p>The second most common startup issue is associated to port conflicts, check no other
application is using or blocking Geronimo's default ports:</p>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Service</th>
<th class='confluenceTh'> Port</th>
</tr>
<tr>
<td class='confluenceTd'>SMTPPort</td>
<td class='confluenceTd'>		25</td>
</tr>
<tr>
<td class='confluenceTd'>COSNamingPort</td>
<td class='confluenceTd'>		1050</td>
</tr>
<tr>
<td class='confluenceTd'>NamingPort</td>
<td class='confluenceTd'>		1099</td>
</tr>
<tr>
<td class='confluenceTd'>ORBSSLPort</td>
<td class='confluenceTd'>		2001</td>
</tr>
<tr>
<td class='confluenceTd'>OpenEJBPort</td>
<td class='confluenceTd'>		4201</td>
</tr>
<tr>
<td class='confluenceTd'>ORBPort</td>
<td class='confluenceTd'>		6882</td>
</tr>
<tr>
<td class='confluenceTd'>AJPPort</td>
<td class='confluenceTd'>		8009</td>
</tr>
<tr>
<td class='confluenceTd'>HTTPPort</td>
<td class='confluenceTd'>		8080</td>
</tr>
<tr>
<td class='confluenceTd'>HTTPSPort</td>
<td class='confluenceTd'>		8443</td>
</tr>
<tr>
<td class='confluenceTd'>JMXPort</td>
<td class='confluenceTd'>		9999</td>
</tr>
<tr>
<td class='confluenceTd'>ActiveMQStompPort</td>
<td class='confluenceTd'>	61613</td>
</tr>
<tr>
<td class='confluenceTd'>ActiveMQPort</td>
<td class='confluenceTd'>		61616</td>
</tr>
</tbody></table>
</div>


<p>If you identify port conflicts you can use the <tt>&lt;GERONIMO_HOME&gt;/var/config/config-substitutions.properties</tt>
to change any of these ports. From this configuration file you can also set a port offset
and have all these increased by that amount.</p>

<p>Keep also in mind that personal firewalls, anti virus and spyware protection products
may block some of these ports as well, even if you turn off such software sometimes those
"rules" are still in effect.</p>

<p>Refer to the <a href="/confluence/display/GMOxDOC30/Initial+configuration" title="Initial
configuration">Initial configuration</a> section for additional details on prerequisites
and different configurations.</p>

<h2><a name="Runtimeissues-Springversionconflicts"></a>Spring version conflicts</h2>

<p>If your application contains its own version of Spring you might see some problems
deploying or running the application on the Jetty assembly. The Jetty assembly is by default
configured with Apache CXF as the JAX-WS provider. Apache CXF uses Spring to configure itself.
Sometimes, the Spring version used by CXF conflicts with the Spring version supplied with
your application. To prevent these conflicts add the following &lt;hidden-classes&gt;
entry to the Geronimo deployment descriptor:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml"> 
<span class="code-tag">&lt;hidden-classes&gt;</span>    
    <span class="code-tag">&lt;filter&gt;</span>org.springframework<span
class="code-tag">&lt;/filter&gt;</span>
    <span class="code-tag">&lt;filter&gt;</span>META-INF/spring<span
class="code-tag">&lt;/filter&gt;</span>
<span class="code-tag">&lt;/hidden-classes&gt;</span>
</pre>
</div></div>

<h2><a name="Runtimeissues-java.lang.UnsatisfiedLinkError%3Alic%28LibraryisalreadyloadedinanotherClassLoader%29"></a>java.lang.UnsatisfiedLinkError:
lic (Library is already loaded in another ClassLoader)</h2>

<p>This can be caused by the same jar (such as an Oracle Driver using OCI) being loaded
in two separate class loaders, each trying to load a system library.</p>

<p>To avoid the problem, you may try <a href="/confluence/display/GMOxDOC30/Adding+JARs+to+the+Geronimo+repository"
title="Adding JARs to the Geronimo repository">Adding JARs to the Geronimo repository</a>
and define the dependency in your deployment plan. <br/>
See Also : <a href="https://issues.apache.org/jira/browse/GERONIMO-4629" class="external-link"
rel="nofollow">https://issues.apache.org/jira/browse/GERONIMO-4629</a></p>

<h2><a name="Runtimeissues-EnablemulticastingforIPv4network"></a>Enable
multicasting for IPv4 network</h2>

<p>To use multicasting properly in a clustered enviornment, you will need to set the
system property <tt>java.net.preferIPv4Stack</tt> to <tt>true</tt>
when starting Geronimo.</p>

<h2><a name="Runtimeissues-java.io.IOExceptionofremoteEJBonWindows"></a>java.io.IOException
of remote EJB on Windows</h2>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
javax.naming.NamingException: Cannot lookup'/MyBeanRemote'. 
[Root exception is java.rmi.RemoteException: Cannot connect to server 'ejbd:<span class="code-comment">//localhost:4201";

</span>nested exception is: java.io.IOException: Cannot connect to server: 'ejbd:<span
class="code-comment">//localhost:4201'.  
</span>Exception: java.net.BindException : Address already in use: connect]
	at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:214)
	at javax.naming.InitialContext.lookup(Unknown Source)
	at MyClientScalabilityTest$MyClientTest.call(MyClientScalabilityTest.java:86)
	at MyClientScalabilityTest$MyClientTest.call(MyClientScalabilityTest.java:1)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.<span class="code-object">Thread</span>.run(Unknown Source)
Caused by: java.rmi.RemoteException: Cannot connect to server 'ejbd:<span class="code-comment">//localhost:4201";
nested exception is:
</span>	java.io.IOException: Cannot connect to server: 'ejbd:<span class="code-comment">//localhost:4201'.
 
</span>        Exception: java.net.BindException : Address already in use: connect
</pre>
</div></div>

<p>One possibility is that the available user port numbers are being exhausted.  On
Windows, when a socket is closed, it goes into a TIME_WAIT state and isn't actually closed
until some delay time.  By default, the max user port address is 5000 and the TIME_WAIT delay
is 4 minutes. So, it's not too difficult to exhaust all possible user port addresses.</p>

<p>You have to update the Windows Registry to change these values. Here's a Windows
2000 doc on the registry settings &#8211; <a href="http://technet.microsoft.com/en-us/library/bb726981.aspx"
class="external-link" rel="nofollow">http://technet.microsoft.com/en-us/library/bb726981.aspx</a></p>

<ul class="alternate" type="square">
	<li>MaxUserPorts controls the upper range for user ports.</li>
	<li>TcpTimedWaitDelay controls the TIME_WAIT delay.</li>
</ul>


<p>Increasing MaxUserPorts (e.g. 65534) and decreasing TcpTimedWaitDelay (e.g. 30) may
fix the problem.</p>


    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Runtime+issues">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=20645289&revisedVersion=2&originalVersion=1">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Runtime+issues?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message