cancel
Showing results for 
Search instead for 
Did you mean: 

demo.start script stuck

littlechameleon
Champ in-the-making
Champ in-the-making
PROBLEM UPDATED, JUMP TO POST #3 PLEASE

Hello Community!

I'm just getting started with Activiti as I saw many different implementations of it, I thought I'd give it a try.

Here's my setup:

PC: Core i5 650 (with Intel grahics), 4Gb RAM, Intel SSD X-25M

OS: OpenSUSE 12.1 (latest ditribution) x86_64

Software: ant 1.8.2-26.1, tomcat 6 + 7, eclipse IDE 3.4 –> all from official OSS repro noarch

I see that my version of eclipse ist not 3.6 as recommended.

When I fire up a terminal and launch the 'ant demo.start' script, it gest stuck after a few lines. The following is all that it does:

Buildfile: /home/username/bin/activiti-5.8/setup/build.xml

demo.install:

internal.cfg.create:
     [copy] Copying 1 file to /home/username/bin/activiti-5.8/setup/build/activiti-cfg
      [zip] Building zip: /home/username/bin/activiti-5.8/setup/build/activiti-cfg.jar
     [echo] copying configuration to ../workspace/activiti-engine-examples/src/main/config
    [unzip] Expanding: /home/username/bin/activiti-5.8/setup/build/activiti-cfg.jar into /home/daniel/bin/activiti-5.8/workspace/activiti-engine-examples/src/main/config

internal.classpath.libs:

internal.taskdef.launch:

h2.start:
     [echo] starting H2 database…
   [launch] launching cmd '/home/username/bin/activiti-5.8/apps/h2/h2.start.sh ' in dir '/home/daniel/bin/activiti-5.8/apps/h2'
   [launch] waiting for launch completion msg 'TCP server running on'…
   [launch]   Exception in thread "main" org.h2.jdbc.JdbcSQLException: Exception opening port "H2 TCP Server (tcp://192.168.1.234:9092)" (port may be in use), cause: "timeout" [90061-132]
   [launch]      at org.h2.message.DbException.getJdbcSQLException(DbException.java:316)
   [launch]      at org.h2.message.DbException.get(DbException.java:167)
   [launch]      at org.h2.tools.Server.start(Server.java:344)
   [launch]      at org.h2.tools.Server.runTool(Server.java:216)
   [launch]      at org.h2.tools.Server.main(Server.java:106)

Can someone help and tell why it's not getting any further? I tried that script with both USER and ROOT priviledge, same behavior…
6 REPLIES 6

littlechameleon
Champ in-the-making
Champ in-the-making
Hi,

I've gotten a little further!

In fact my variables JAVA_HOME and ANT_HOME were not set. Once exported to the right PATH the H2 and Tomcat6 Servers were able to start.

Now I got another error:

tomcat.start:
   [launch] launching cmd '/home/username/bin/activiti-5.8/apps/apache-tomcat-6.0.32/bin/startup.sh ' in dir '/home/username/bin/activiti-5.8/apps/apache-tomcat-6.0.32/bin'
   [launch] waiting for launch completion msg 'Using CLASSPATH:'…
   [launch] Exception in thread "Thread-1" couldn't launch /home/username/bin/activiti-5.8/apps/apache-tomcat-6.0.32/bin/startup.sh
   [launch]  at org.activiti.engine.impl.ant.LaunchThread.run(LaunchThread.java:94)
   [launch] Caused by: java.io.IOException: Cannot run program "/home/username/bin/activiti-5.8/apps/apache-tomcat-6.0.32/bin/startup.sh" (in directory "/home/username/bin/activiti-5.8/apps/apache-tomcat-6.0.32/bin"): java.io.IOException: error=13, Permission denied
   [launch]  at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
   [launch]  at org.activiti.engine.impl.ant.LaunchThread.run(LaunchThread.java:77)
   [launch] Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
   [launch]  at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
   [launch]  at java.lang.ProcessImpl.start(ProcessImpl.java:81)
   [launch]  at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
   [launch]  … 1 more

explorer.browser.open:

demo.start:

BUILD SUCCESSFUL
Total time: 6 seconds

Can someone tell me what this java.io.exception means and why it occures?

littlechameleon
Champ in-the-making
Champ in-the-making
I'm discussing with myself here, but helps anyway.

Fond this threat: http://forums.activiti.org/en/viewtopic.php?f=6&t=1058&start=0

And therefore did a chmod on the files catalina.sh, startup.sh and shutdown.sh

it still won't work:

ant demo.start
Buildfile: /home/username/bin/activiti-5.8/setup/build.xml

demo.install:

internal.cfg.create:
     [copy] Copying 1 file to /home/username/bin/activiti-5.8/setup/build/activiti-cfg
      [zip] Building zip: /home/username/bin/activiti-5.8/setup/build/activiti-cfg.jar
     [echo] copying configuration to ../workspace/activiti-engine-examples/src/main/config
    [unzip] Expanding: /home/username/bin/activiti-5.8/setup/build/activiti-cfg.jar into /home/username/bin/activiti-5.8/workspace/activiti-engine-examples/src/main/config

internal.classpath.libs:

internal.taskdef.launch:

h2.start:
     [echo] starting H2 database…
   [launch] launching cmd '/home/username/bin/activiti-5.8/apps/h2/h2.start.sh ' in dir '/home/username/bin/activiti-5.8/apps/h2'
   [launch] waiting for launch completion msg 'TCP server running on'…
   [launch]   Exception in thread "main" org.h2.jdbc.JdbcSQLException: Exception opening port "9092" (port may be in use), cause: "java.net.BindException: Address already in use" [90061-132]
   [launch]    at org.h2.message.DbException.getJdbcSQLException(DbException.java:316)
   [launch]    at org.h2.message.DbException.get(DbException.java:156)
   [launch]    at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:175)
   [launch]    at org.h2.util.NetUtils.createServerSocket(NetUtils.java:141)
   [launch]    at org.h2.server.TcpServer.start(TcpServer.java:200)
   [launch]    at org.h2.tools.Server.start(Server.java:330)
   [launch]    at org.h2.tools.Server.runTool(Server.java:216)
   [launch]    at org.h2.tools.Server.main(Server.java:106)
   [launch]   Caused by: java.net.BindException: Address already in use
   [launch]    at java.net.PlainSocketImpl.socketBind(Native Method)
   [launch]    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
   [launch]    at java.net.ServerSocket.bind(ServerSocket.java:336)
   [launch]    at java.net.ServerSocket.<init>(ServerSocket.java:202)
   [launch]    at java.net.ServerSocket.<init>(ServerSocket.java:114)
   [launch]    at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:171)
   [launch]    … 5 more
   [launch] launched process completed
     [echo] H2 database started

tomcat.start:
   [launch] launching cmd '/home/username/bin/activiti-5.8/apps/apache-tomcat-6.0.32/bin/startup.sh ' in dir '/home/username/bin/activiti-5.8/apps/apache-tomcat-6.0.32/bin'
   [launch] waiting for launch completion msg 'Using CLASSPATH:'…
   [launch]   The BASEDIR environment variable is not defined correctly
   [launch]   This environment variable is needed to run this program
   [launch] launched process completed

explorer.browser.open:

demo.start:

BUILD SUCCESSFUL
Total time: 6 seconds

any help?

lisama
Champ in-the-making
Champ in-the-making
Well did you make sure that there is nothing else running that requires the port 9092? Maybe another instance of the h2 database that wasn't terminated correctly?

littlechameleon
Champ in-the-making
Champ in-the-making
Well, I hope there's nothing else using that port. The tests I did here are always just right after booting computer. I assume it's all idle before I start…

lisama
Champ in-the-making
Champ in-the-making
To be sure try opening a console/terminal and type in

netstat | grep 9092

littlechameleon
Champ in-the-making
Champ in-the-making
Thank you for your answeres LisaMa and my appologies for late feedback.

In the meantime I changed the linux distribution. I left Suse for Linux Mint 12. Now everything works out of the box. On Mint everything is allready exiting (ant, tomcat, root rights for applications, etc…).

This topic can be closed.

Cheers