cancel
Showing results for 
Search instead for 
Did you mean: 

Can't run 'ant demo.start'

opensourcelover
Champ in-the-making
Champ in-the-making
Hello,

I'm using this guide (http://forums.activiti.org/en/viewtopic.php?f=6&t=458&start=30) to install the latest Activiti on Ubuntu 10.10. I successfully went through the steps, but when I issue the command

ant demo.start

or

sudo ant demo.start

I get the below error, and thus sites http://domain.com:8080/activiti-explorer/, (or http://<IP-address>:8080/activiti-explorer/)etc. don't work.


Buildfile: /root/activiti-5.2/setup/build.xml

demo.install:

internal.classpath.libs:

internal.taskdef.launch:

h2.start:
   [launch] launching cmd '/root/activiti-5.2/apps/h2/h2.start.sh ' in dir '/root/activiti-5.2/apps/h2'
   [launch] waiting for launch completion msg 'TCP server running on'…
   [launch]   TCP server running on tcp://**.*.***.***:9092 (others can connect)

tomcat.start:
   [launch] launching cmd '/root/activiti-5.2/apps/apache-tomcat-6.0.29/bin/startup.sh ' in dir '/root/activiti-5.2/apps/apache-tomcat-6.0.29/bin'
   [launch] waiting for launch completion msg 'Using CLASSPATH:'…
   [launch] Exception in thread "Thread-1" couldn't launch /root/activiti-5.2/apps/apache-tomcat-6.0.29/bin/startup.sh
   [launch]    at org.activiti.engine.impl.ant.LaunchThread.run(LaunchThread.java:94)
   [launch] Caused by: java.io.IOException: Cannot run program "/root/activiti-5.2/apps/apache-tomcat-6.0.29/bin/startup.sh" (in directory "/root/activiti-5.2/apps/apache-tomcat-6.0.29/bin"): java.io.IOException: error=13, Permission denied
   [launch]    at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
   [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:148)
   [launch]    at java.lang.ProcessImpl.start(ProcessImpl.java:65)
   [launch]    at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
   [launch]    … 1 more

explorer.browser.open:
     [exec] Error: no display specified
     [exec] Result: 1
     [exec] Error: no display specified
     [exec] Result: 1
     [exec] Error: no display specified
     [exec] Result: 1
     [exec] Error: no display specified
     [exec] Result: 1
     [exec] Error: no display specified
     [exec] Result: 1

demo.start:

BUILD SUCCESSFUL
Total time: 6 seconds

How can I fix this?
6 REPLIES 6

frederikherema1
Star Contributor
Star Contributor
Hi,

Can you check who's the owner of the ${distro home}/apps/apache-tomcat-…/. It should be the same as the user that is trying to start the demo. If not, you should grant permissions or change owner for this folder. Maybe this is cause by running the setup the first time using sudo?

opensourcelover
Champ in-the-making
Champ in-the-making
Hi,

Can you check who's the owner of the ${distro home}/apps/apache-tomcat-…/. It should be the same as the user that is trying to start the demo. If not, you should grant permissions or change owner for this folder. Maybe this is cause by running the setup the first time using sudo?

Thank you for your reply. Everything inside /root/activiti directory is setup for user root and group root, which is the user I'm using to start the demo. I've tried to run this first a couple of times without sudo, but the log is the same.

frederikherema1
Star Contributor
Star Contributor
Is the startup.sh and shutdown.sh executable? If now chmod it Smiley Wink

opensourcelover
Champ in-the-making
Champ in-the-making
Is the startup.sh and shutdown.sh executable? If now chmod it Smiley Wink

OK, I've done that. Now I get this:


# ant demo.start
Buildfile: /root/activiti-5.2/setup/build.xml

demo.install:

internal.classpath.libs:

internal.taskdef.launch:

h2.start:
   [launch] launching cmd '/root/activiti-5.2/apps/h2/h2.start.sh ' in dir '/root/activiti-5.2/apps/h2'
   [launch] waiting for launch completion msg 'TCP server running on'…
   [launch] Exception in thread "Thread-0" couldn't launch /root/activiti-5.2/apps/h2/h2.start.sh
   [launch]  at org.activiti.engine.impl.ant.LaunchThread.run(LaunchThread.java:94)
   [launch] Caused by: java.io.IOException: Cannot run program "/root/activiti-5.2/apps/h2/h2.start.sh" (in directory "/root/activiti-5.2/apps/h2"): java.io.IOException: error=12, Cannot allocate memory
   [launch]  at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
   [launch]  at org.activiti.engine.impl.ant.LaunchThread.run(LaunchThread.java:77)
   [launch] Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory
   [launch]  at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
   [launch]  at java.lang.ProcessImpl.start(ProcessImpl.java:65)
   [launch]  at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
   [launch]  … 1 more

tomcat.start:
   [launch] launching cmd '/root/activiti-5.2/apps/apache-tomcat-6.0.29/bin/startup.sh ' in dir '/root/activiti-5.2/apps/apache-tomcat-6.0.29/bin'
   [launch] waiting for launch completion msg 'Using CLASSPATH:'…
   [launch] Exception in thread "Thread-1" couldn't launch /root/activiti-5.2/apps/apache-tomcat-6.0.29/bin/startup.sh
   [launch]  at org.activiti.engine.impl.ant.LaunchThread.run(LaunchThread.java:94)
   [launch] Caused by: java.io.IOException: Cannot run program "/root/activiti-5.2/apps/apache-tomcat-6.0.29/bin/startup.sh" (in directory "/root/activiti-5.2/apps/apache-tomcat-6.0.29/bin"): java.io.IOException: error=12, Cannot allocate memory
   [launch]  at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
   [launch]  at org.activiti.engine.impl.ant.LaunchThread.run(LaunchThread.java:77)
   [launch] Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory
   [launch]  at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
   [launch]  at java.lang.ProcessImpl.start(ProcessImpl.java:65)
   [launch]  at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
   [launch]  … 1 more

explorer.browser.open:
     [exec] Execute failed: java.io.IOException: Cannot run program "firefox": java.io.IOException: error=12, Cannot allocate memory
     [exec] Execute failed: java.io.IOException: Cannot run program "firefox": java.io.IOException: error=12, Cannot allocate memory
     [exec] Execute failed: java.io.IOException: Cannot run program "firefox": java.io.IOException: error=12, Cannot allocate memory
     [exec] Execute failed: java.io.IOException: Cannot run program "firefox": java.io.IOException: error=12, Cannot allocate memory
     [exec] Execute failed: java.io.IOException: Cannot run program "firefox": java.io.IOException: error=12, Cannot allocate memory

demo.start:

BUILD SUCCESSFUL
Total time: 6 seconds

It looks as if there's no enough RAM on my VPS Smiley Sad I have 4GB of RAM, but only about 1GB used, so perhaps JAVA needs more than 3GB in my case. Thanks for your help anyway. It's a pity that Activity is so memory-consuming.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
It's a pity that Activity is so memory-consuming.

I can run Activiti in a 512 MB virtual linux box where there is only 384MB available for Tomcat. Runs without a problem here. So I do not think that Activiti is memory consuming. The error occurs when the setup tries to startup firefox and it is not an out of memory, but a 'cannot allocate memory'. I'd suggest *not* running al this as root since an OS might have deliberate limitations on that account.

frederikherema1
Star Contributor
Star Contributor
Ronald is right,

Activiti doesn't require a lot of memory at all, looks like root-account doesn't allow allocating that much memory. Try lowering the -Xms and -Xmx values in the catalina.sh. These are set when demo-setup is installed to have a smoother feel to the demo. or just don't run as root as Ronald suggests Smiley Wink

Cheers
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.