<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: Alpha2 sporadic deployment problems
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/jskovjyskebankdk">Jesper Skov</a> in <i>JBoss Tools</i> - <a href="https://community.jboss.org/message/767045#767045">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>The other issue is related to the start/stop of the server.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>We had problems starting EAP511 with the JBossTools4 defaults, so we changed (both) state detectors to JMX.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The server would start fine, but a stop always causes this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: 0.0.0.0:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server /0.0.0.0:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /0.0.0.0:1099 [Root exception is java.net.ConnectException: Connection refused: connect]!
 ]]
&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
&#160;&#160;&#160; at javax.naming.InitialContext.lookup(Unknown Source)
&#160;&#160;&#160; at org.jboss.Shutdown.main(Shutdown.java:219)
Caused by: javax.naming.CommunicationException: Failed to connect to server /0.0.0.0:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /0.0.0.0:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
&#160;&#160;&#160; ... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /0.0.0.0:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
&#160;&#160;&#160; ... 5 more
Caused by: java.net.ConnectException: Connection refused: connect
&#160;&#160;&#160; at java.net.PlainSocketImpl.socketConnect(Native Method)
&#160;&#160;&#160; at java.net.PlainSocketImpl.doConnect(Unknown Source)
&#160;&#160;&#160; at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
&#160;&#160;&#160; at java.net.PlainSocketImpl.connect(Unknown Source)
&#160;&#160;&#160; at java.net.SocksSocketImpl.connect(Unknown Source)
&#160;&#160;&#160; at java.net.Socket.connect(Unknown Source)
&#160;&#160;&#160; at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
&#160;&#160;&#160; at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
&#160;&#160;&#160; ... 5 more
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>And looking in one of the logs, we saw the below (note third entry):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">!ENTRY org.jboss.ide.eclipse.as.core 4 16973826 2012-10-18 10:44:30.447
 !MESSAGE The server was shutdown forcefully. All processes were terminated.

!ENTRY org.jboss.ide.eclipse.as.core 4 16842768 2012-10-18 10:44:30.525
 !MESSAGE Server Shutdown Failed

!ENTRY org.jboss.ide.eclipse.as.core 4 33816577 2012-10-18 10:44:32.447
 !MESSAGE Error adding deployment folder to deployment scanner

!STACK 0
 javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
&#160;&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
&#160;&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
&#160;&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
&#160;&#160;&#160;&#160; at javax.naming.InitialContext.lookup(Unknown Source)
&#160;&#160;&#160;&#160; at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.createConnection(JBossServerConnection.java:159)
&#160;&#160;&#160;&#160; at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:138)
&#160;&#160;&#160;&#160; at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:122)
&#160;&#160;&#160;&#160; at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:105)
&#160;&#160;&#160;&#160; at org.jboss.ide.eclipse.as.jmx.integration.JBossJMXConnectionProviderModel.run(JBossJMXConnectionProviderModel.java:79)
&#160;&#160;&#160;&#160; at org.jboss.ide.eclipse.as.jmx.integration.JMXServerLifecycleListener.ensureScannersAdded(JMXServerLifecycleListener.java:65)
&#160;&#160;&#160;&#160; at org.jboss.ide.eclipse.as.jmx.integration.JMXServerLifecycleListener.modifyDeploymentScanners(JMXServerLifecycleListener.java:54)
&#160;&#160;&#160;&#160; at org.jboss.ide.eclipse.as.core.server.internal.v7.LocalJBoss7DeploymentScannerAdditions$1.run(LocalJBoss7DeploymentScannerAdditions.java:127)
&#160;&#160;&#160;&#160; at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
&#160;&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
&#160;&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
&#160;&#160;&#160;&#160; ... 12 more

Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
&#160;&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
&#160;&#160;&#160;&#160; ... 13 more

Caused by: java.net.ConnectException: Connection refused: connect
&#160;&#160;&#160;&#160; at java.net.PlainSocketImpl.socketConnect(Native Method)
&#160;&#160;&#160;&#160; at java.net.PlainSocketImpl.doConnect(Unknown Source)
&#160;&#160;&#160;&#160; at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
&#160;&#160;&#160;&#160; at java.net.PlainSocketImpl.connect(Unknown Source)
&#160;&#160;&#160;&#160; at java.net.SocksSocketImpl.connect(Unknown Source)
&#160;&#160;&#160;&#160; at java.net.Socket.connect(Unknown Source)
&#160;&#160;&#160;&#160; at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
&#160;&#160;&#160;&#160; at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
&#160;&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
&#160;&#160;&#160;&#160; ... 13 more

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So this happened as part of a server restart.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It may not be a full explanation, since some of the other developers don't restart unless they already see deployment problems....</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I've asked them all to switch Shutdown Poller to 'Process Terminated' which I suspect will fix the problem when caused as a side effect of a bad shutdown.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/767045#767045">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Tools at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>