Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Resin

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-16-2011, 06:54 PM
theBlueSage theBlueSage is offline
Member
 
Join Date: Apr 2011
Posts: 33
Default adding different http ports to resin.properties does not work

according to your documentation here : http://caucho.com/resin-4.0/changes/resin-4.0.24.xtp

I should be able to change the http port for each of my servers defined in resin.properties, and use server-multi to set them up. Well, using the config below this is failing.

-------------resin.properties snip ---------------
setuid_user : orion
setuid_group : orion

app_tier : 192.168.2.252:6800 192.168.2.252:6801

http : 8080
app-0.http : 10880
app-1.http : 10881

--------------- end resin.properties snip ---------------

and here is the relevant part from the resin.xml file

---------- resin.xml snip -------------------------
<cluster id="app_tier">

<!-- sets the content root for the cluster, relative to resin.root -->
<root-directory>.</root-directory>

<!-- define the servers in the cluster -->
<server-multi id-prefix="app-" address-list="${app_tier}" port="6800" >
<http port="${rvar('http')}" />
<http port="${rvar('https')}">
<jsse-ssl self-signed-certificate-name="resin@localhost"/>
</http>
</server-multi>
...
</cluster>

I start the first server using this (yes I contrarily started app-1 before app-0, and yes I tried it the other way too with app-0 first and it made no difference) :

java -jar /home/orion/clusterResins/latest_resin/lib/resin.jar -resin-home /home/orion/resinB -log-directory /home/orion/resinB/log/ -root-directory /home/orion/resinB -server app-1 start

This part went well and I see my' hello world' at 192.168.2.252:10881/ . I then started the second serer with the following command :

java -jar /home/orion/clusterResins/latest_resin/lib/resin.jar -resin-home /home/orion/resin -log-directory /home/orion/resin/log/ -root-directory /home/orion/resin -server app-0 start

and although the start command rendered :

Resin/4.0.24 started -server 'app-0' for watchdog at 127.0.0.1:6600

the watchdog.log showed this :
[2011/12/16 14:29:13.402] {watchdog-app-1} WatchdogChild[app-1] starting
[2011/12/16 14:29:13.420] {watchdog-app-1} Watchdog starting Resin[app-1]
[2011/12/16 14:29:45.718] {watchdog-app-0} WatchdogChild[app-0] starting
[2011/12/16 14:29:45.731] {watchdog-app-0} Watchdog starting Resin[app-0]
[2011/12/16 14:29:50.863] {watchdog-app-0} java.io.IOException: Socket bind failed for null:10881 while running as orion. Check for other processes listening to the port and check for permissions (root on unix).
at com.caucho.vfs.JniServerSocketImpl.<init>(JniServe rSocketImpl.java:65)
at com.caucho.vfs.JniServerSocketImpl.create(JniServe rSocketImpl.java:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.caucho.vfs.QJniServerSocket.createJNI(QJniServ erSocket.java:146)
at com.caucho.network.listen.TcpSocketLinkListener.bi ndForWatchdog(TcpSocketLinkListener.java:1155)
at com.caucho.boot.WatchdogChildProcess.createProcess (WatchdogChildProcess.java:497)
at com.caucho.boot.WatchdogChildProcess.run(WatchdogC hildProcess.java:189)
at com.caucho.boot.WatchdogChildTask.run(WatchdogChil dTask.java:219)
at com.caucho.env.thread.ResinThread.runTasks(ResinTh read.java:164)
at com.caucho.env.thread.ResinThread.run(ResinThread. java:130)
[2011/12/16 14:29:50.866] {watchdog-app-0} com.caucho.config.ConfigException: <user-name> requires compiled JNI.
at com.caucho.boot.WatchdogChildProcess.createProcess (WatchdogChildProcess.java:548)
at com.caucho.boot.WatchdogChildProcess.run(WatchdogC hildProcess.java:189)
at com.caucho.boot.WatchdogChildTask.run(WatchdogChil dTask.java:219)
at com.caucho.env.thread.ResinThread.runTasks(ResinTh read.java:164)
at com.caucho.env.thread.ResinThread.run(ResinThread. java:130)


As you can see, the watchdog tried to start the app-0 server at the http port of 10881, which is the port for app-1. When I start app-0 first, the same clash happens but on port 10880. In other words the first startup does pick up the correct http port, but the second one does not.

Please let me know what I am doing wrong, I'd love to get this going before the end of next week ...

Thanks in advance for your time and support
Reply With Quote
 

Tags
dynamic http port, resin-pro 4.0.24, server-multi

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:57 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.