tanukisoftware.wrapper initialization problem

79 views
Skip to first unread message

Gigon Philippe

unread,
Jun 19, 2013, 7:02:53 AM6/19/13
to sapia-...@googlegroups.com
Hello,

I've just tried to install sapia-corus on my ubuntu machine.

The tanuki wrapper failed to init :

java.lang.ExceptionInInitializerError
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at java.nio.file.FileSystems.getDefault(FileSystems.java:176)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at sun.util.calendar.ZoneInfoFile$1.run(ZoneInfoFile.java:483)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at sun.util.calendar.ZoneInfoFile$1.run(ZoneInfoFile.java:478)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at sun.util.calendar.ZoneInfoFile.<clinit>(ZoneInfoFile.java:477)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at sun.util.calendar.ZoneInfo.getTimeZone(ZoneInfo.java:663)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at java.util.TimeZone.getTimeZone(TimeZone.java:571)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at java.util.TimeZone.setDefaultZone(TimeZone.java:668)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at java.util.TimeZone.getDefaultRef(TimeZone.java:635)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at java.util.Calendar.getInstance(Calendar.java:968)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at org.tanukisoftware.wrapper.WrapperInfo.<clinit>(WrapperInfo.java:63)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at org.tanukisoftware.wrapper.WrapperManager.getVersion(WrapperManager.java:1373)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at org.tanukisoftware.wrapper.WrapperManager.privilegedClassInit(WrapperManager.java:378)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at org.tanukisoftware.wrapper.WrapperManager.access$000(WrapperManager.java:103)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at org.tanukisoftware.wrapper.WrapperManager$1.run(WrapperManager.java:328)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at org.tanukisoftware.wrapper.WrapperManager.<clinit>(WrapperManager.java:325)
INFO   | jvm 5    | 2013/06/19 12:31:40 |     at org.sapia.corus.core.CorusServiceWrapper.main(CorusServiceWrapper.java:29)
INFO   | jvm 5    | 2013/06/19 12:31:40 | Caused by: java.lang.RuntimeException: default directory must be absolute
...

It seems that sun.util.calendar.ZoneInfoFile have a problem with the JVM in some way :
/usr/lib/jvm/java-7-oracle

java version "1.7.0_13"
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

Is corus comiled for java 6 or 7 ?

Thanks
Phil







Gigon Philippe

unread,
Jun 19, 2013, 9:04:16 AM6/19/13
to sapia-...@googlegroups.com
hi
,
Changing JVM to version 6 :

java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-1ubuntu1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

It runs.
for information, I have another problem  :
java.lang.IllegalStateException: Could not access properties /opt/sapia-corus/current/config/corus_33000.properties
INFO   | jvm 1    | 2013/06/19 15:00:51 |     at org.sapia.corus.core.CorusPropertiesLoader$2.get(CorusPropertiesLoader.java:59)
INFO   | jvm 1    | 2013/06/19 15:00:51 |     at org.sapia.corus.core.CorusPropertiesLoader$2.get(CorusPropertiesLoader.java:53)
INFO   | jvm 1    | 2013/06/19 15:00:51 |     at org.sapia.corus.core.CorusPropertiesLoader.doLoad(CorusPropertiesLoader.java:72)
INFO   | jvm 1    | 2013/06/19 15:00:51 |     at org.sapia.corus.core.CorusPropertiesLoader.load(CorusPropertiesLoader.java:65)
INFO   | jvm 1    | 2013/06/19 15:00:51 |     at org.sapia.corus.core.CorusServer.main(CorusServer.java:167)
INFO   | jvm 1    | 2013/06/19 15:00:51 |     at org.sapia.corus.core.CorusServiceWrapper.run(CorusServiceWrapper.java:91)
INFO   | jvm 1    | 2013/06/19 15:00:51 |     at java.lang.Thread.run(Thread.java:679)
INFO   | jvm 1    | 2013/06/19 15:00:51 | Caused by: java.io.FileNotFoundException: /opt/sapia-corus/current/config/corus_33000.properties (No such file or directory)
INFO   | jvm 1    | 2013/06/19 15:00:51 |     at java.io.FileInputStream.open(Native Method)
INFO   | jvm 1    | 2013/06/19 15:00:51 |     at java.io.FileInputStream.<init>(FileInputStream.java:137)
INFO   | jvm 1    | 2013/06/19 15:00:51 |     at org.sapia.corus.core.CorusPropertiesLoader$2.get(CorusPropertiesLoader.java:57)
INFO   | jvm 1    | 2013/06/19 15:00:51 |     ... 6 more

effectively, only corus_properties exists

Gigon Philippe

unread,
Jun 19, 2013, 9:20:31 AM6/19/13
to sapia-...@googlegroups.com


Corus is runnning now ...

but coruscli gives me an error :

corus@peg-VPCS:/opt/sapia-corus/sapia_corus_server-4.0$ bin/coruscli
No server listening at 192.168.1.11:33000
org.sapia.corus.client.exceptions.cli.ConnectionException: Could not reconnect to Corus server
    at org.sapia.corus.client.facade.CorusConnectionContext.reconnect(CorusConnectionContext.java:169)
    at org.sapia.corus.client.facade.CorusConnectionContext.reconnect(CorusConnectionContext.java:149)
    at org.sapia.corus.client.facade.CorusConnectionContext.<init>(CorusConnectionContext.java:70)
    at org.sapia.corus.client.facade.CorusConnectionContext.<init>(CorusConnectionContext.java:78)
    at org.sapia.corus.client.cli.CorusCli.main(CorusCli.java:117)
Caused by: java.rmi.RemoteException: Error connecting to remote server http://192.168.1.11:33000/ubik; nested exception is:
    org.apache.http.NoHttpResponseException: The target server failed to respond
    at org.sapia.ubik.rmi.server.Hub.connect(Hub.java:190)
    at org.sapia.corus.client.facade.CorusConnectionContext.reconnect(CorusConnectionContext.java:159)
    ... 4 more
Caused by: org.apache.http.NoHttpResponseException: The target server failed to respond
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:95)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:62)
    at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254)
...
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
    at org.sapia.ubik.rmi.server.transport.http.HttpRmiClientConnection.send(HttpRmiClientConnection.java:96)
    at org.sapia.ubik.rmi.server.transport.http.HttpRmiClientConnection.send(HttpRmiClientConnection.java:148)
    at org.sapia.ubik.rmi.server.Hub.connect(Hub.java:172)
    ... 5 more

on Firefox :
http://192.168.1.11:33000/ IS OK
http://192.168.1.11:33000/ubik  IS aborted

some tips ?
thanks






Yanick

unread,
Jun 19, 2013, 10:29:00 PM6/19/13
to sapia-...@googlegroups.com
Hi Phillipe,

We've experienced that indeed, seems like the combination of JSW (Java Service Wrapper) and Java 7 doesn't work in some cases. We could not pin-point the exact cause.


It basically consists of a custom init.d script that you copy under /etc/init.d.

We've been working like this in production for months now, without issues. Quite frankly, we prefer that setup, it's easier.

Yanick

unread,
Jun 19, 2013, 10:55:24 PM6/19/13
to sapia-...@googlegroups.com
Hi Phillipe,

seems like the Corus server has not bound itself to the network address that you are expecting. The most likely cause is that the computer on which Corus runs has multiple network interfaces. Corus relies on Ubik, which avoids picking the localhost address when binding to the network - it will attempt to pick the first non-localhost address that comes up. See http://www.sapia-oss.org/projects/ubik/tutorial.html#bindaddr  . How to specify the actual address that Corus should use is described in the Corus guide too.  

Basically, with Corus, it involves setting the ubik.rmi.address-pattern property in corus.properties (under $CORUS_HOME/config). Here are example values (taken from the link above):

\\d{3}\\.\\d{3}\\.\\d{3}\\.\\d{3}
10\\.10\\.\\d+\\.\\d+
192\\.168\\.\\d+\\.\\d+

FYI, the Ubik path (http://192.168.1.11:33000/ubik) is strictly used my Ubik RMI, which is how the Corus CLI communicates with the Corus daemon. So it's normal that you can't connect properly to that endpoint using your browser, under that path.

I find it strange though, that you can connect to http://192.168.1.11:33000/ using your browser, but that the CLI can't seem to be able to connect to that address...

Can you try the above config and see if it changes anything?

Yanick

unread,
Jun 19, 2013, 11:03:11 PM6/19/13
to sapia-...@googlegroups.com
Hmmm, thinking about it: 

you could check the Corus daemon log file too, under $CORUS_HOME/logs...

Due to the exception you've got (org.apache.http.NoHttpResponseException), something tells me that a problem has occurred on the server-side and no proper HTTP response could be generated.

Quite frankly, I think you should proceed with the generic install in order to be able to run under Java 7: we've been using that setup in production and it's the one we could help you with (let alone the fact that we've run that setup in prod for months now).

Keep us posted.

Gigon Philippe

unread,
Jun 20, 2013, 7:14:48 AM6/20/13
to sapia-...@googlegroups.com
Thanks. It works well.

Gigon Philippe

unread,
Jun 20, 2013, 7:16:27 AM6/20/13
to sapia-...@googlegroups.com

I did the generic install. without any real problem.
Thanks a lot for corus ;-)
Reply all
Reply to author
Forward
0 new messages