title: glassfish 4.1 and cluster with JMS
body: <p>I have create the cluster "mycluster", two local instance and the resources jms/Queue1, jms/Queue2  and jms/Topic with target server and cluster.</p>
  
  <p>So in this way I created the cluster:</p>
  
  <ul>
  <li><p>create-cluster mycluster</p></li>
  <li><p>create-instance --node localhost-domain1 --cluster mycluster instance01</p></li>
  <li><p>create-instance --node localhost-domain1 --cluster mycluster instance02</p></li>
  </ul>
  
  <p>[...]</p>
  
  <ul>
  <li><p>start-cluster mycluster</p></li>
  <li><p>deploy --target mycluster Coo.ear</p></li>
  </ul>
  
  <p>Application deployed with name Coo.</p>
  
  <p>Warning: Command _deploy did not complete successfully on server instance instance01: remote failure: Failed to load the application on instance instance01. The application will not run properly. Please fix your application and redeploy.</p>
  
  <p>Exception while loading the app : EJB Container initialization error. Please see server.log for more details.</p>
  
  <p>Warning: Command _deploy did not complete successfully on server instance instance02: remote failure: Failed to load the application on instance instance02. The application will not run properly. Please fix your application and redeploy.</p>
  
  <p>Exception while loading the app : EJB Container initialization error. Please see server.log for more details.
  Command deploy completed with warnings.</p>
  
  <p>[...]</p>
  
  <p>On [server]: hostname:8080/FE-war/ all right.</p>
  
  <p>On [instance01 the cluster] hostname:28080/FE-war</p>
  
  <p>and</p>
  
  <p>On [instance02 the cluster] hostname:28081/FE-war</p>
  
  <p>I get this desperate HTTP status 404 - Not Found ((((</p>
  
  <p>Complete logs file server, instance01, instance02, [...]:</p>
  
  <p><a href="https://drive.google.com/folderview?id=0B7CqU8774DG8RGx0VkRVeEZXclE&amp;usp=sharing" rel="nofollow">https://drive.google.com/folderview?id=0B7CqU8774DG8RGx0VkRVeEZXclE&amp;usp=sharing</a></p>
  
  <p>2016-02-06T17:00:24.593+0100] [glassfish 4.1] [SEVERE] [] [org.eclipse.persistence.session./file:/home/glassfish/glassfish4/glassfish/nodes/localhost-domain1/Coo1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.ejb] [tid: _ThreadID=22 _ThreadName=RunLevelControllerThread-1454774410800] [timeMillis: 1454774424593] [levelValue: 1000] [[</p>
  
  <p>Local Exception Stack: 
  Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException
  Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException: Errore di connessione al server localhost sulla porta 1527 con messaggio Connessione rifiutata.
  Error Code: 0
  [...]</p>