Mantis - Resin
Viewing Issue Advanced Details
2646 major always 05-02-08 08:31 06-18-08 21:04
mauricev  
ferg  
normal  
closed 3.1.5  
no change required  
none    
none 3.1.6  
0002646: Resin does not work when it's run in the background
Starting resin in the background with "start" does not work because it does not bind to port 6800. It does work when it's launched in the foreground without "start".
When executing the following command on my Linux 2.6.25 x64 system as the resin user, resin does not bind to port 6800 and hence does not function.

/opt/sun-jdk-1.6.0.06/bin/java -jar /usr/share/resin/lib/resin.jar
-conf /etc/resin/resin.conf -resin-home /usr/lib/resin -verbose start

It does bind to the watchdog port, 6600.

When it's run without "start", it does bind to 6800 and works fine. Here it does not bind to 6600.

Notes
(0003079)
ferg   
05-19-08 11:03   
Checked with Linux x64 with pro and non-pro and both start up correctly with "start" and non-"start"
(0003210)
nam   
06-18-08 21:02   
There may be a 6800 port conflict if trying to run the load-balance servers on the same machine.

By default, Resin's load-balance <cluster> listens on port 6800. This can be changed with <cluster-port>. If trying to start Resin up as a service with multiple servers in a load-balance configuration, then the servers would need to use a different address than the one used by the cluster itself.

Example port conflict:

<resin xmlns="http://caucho.com/ns/resin"> [^]
<cluster id="web-tier">
  <!-- implied default port, conflicts with server 'app-a' -->
  <cluster-port>6800</cluster-port>
  <server id="web-a" address="127.0.0.1">
    <http port="8080"/>
  </server>

  <host id="">
    <web-app id="/">
      <!-- balance all requests to cluster app-tier -->
      <rewrite-dispatch>
        <load-balance regexp="" cluster="app-tier"/>
      </rewrite-dispatch>
    </web-app>
  </host>
</cluster>

<cluster id="app-tier">
  <server id="app-a" address="127.0.0.1" port="6800"/>
  <server id="app-b" address="127.0.0.1" port="6801"/>
</cluster>
</resin>

Here, the default cluster port conflicts with app-a server. Either the <cluster-port> or app-a's port needs to be changed.

See: http://www.caucho.com/resin/doc/port-tags.xtp#cluster-port [^]