# Mobile client won't launch projects

**URL:** <https://forum.inductiveautomation.com/t/mobile-client-wont-launch-projects/8783>\
**Category:** Ignition\
**Created:** [July 24, 2014, 2:39pm UTC](https://forum.inductiveautomation.com/t/mobile-client-wont-launch-projects/8783 "2014-07-24T14:39:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erfritts](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/erfritts/32/3660_2.png) [@erfritts](https://forum.inductiveautomation.com/u/erfritts)\
**Post date:** [July 24, 2014, 2:39pm UTC](https://forum.inductiveautomation.com/t/mobile-client-wont-launch-projects/8783/1 "2014-07-24T14:39:44Z")

</div>

When I attempt to launch one of my mobile projects on an iPad using Safari I receive an error  
java.lang.Exception: Timeout waiting for new VM.  
and I found this log in the console  
Time Logger Message  
WARN 10:27:38 AM DataServlet Failure in mobiledata/initvm

java.lang.Exception: Timeout waiting for new VM.  
at com.inductiveautomation.mobile.gateway.servlets.MobileSession.initializeVM(MobileSession.java:382)  
at com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet$InitVM.handle(MobileDataServlet.java:835)  
at com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet.doRequest(MobileDataServlet.java:159)  
at com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet.doGet(MobileDataServlet.java:108)  
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)  
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)  
at com.inductiveautomation.ignition.gateway.bootstrap.MapServlet.service(MapServlet.java:85)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)  
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)  
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)  
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)  
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)  
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)  
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)  
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)  
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)  
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)  
at java.lang.Thread.run(Unknown Source)

I tried changing the idle VM to 1 instead of 0 but that gave me a warning every few seconds in the console.  
I tried specifying the callback interface but that had no effect at all. Please help

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/c985ea71ed53a8f212f3920ddf03fe05249170b8.png) [@system](https://forum.inductiveautomation.com/u/system)\
**Post date:** [August 14, 2014, 3:20pm UTC](https://forum.inductiveautomation.com/t/mobile-client-wont-launch-projects/8783/2 "2014-08-14T15:20:57Z")

</div>

I also tried restarting the module. Thanks again for any help

---

<div class="post-metadata">

**Author:** ![erfritts](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/erfritts/32/3660_2.png) [@erfritts](https://forum.inductiveautomation.com/u/erfritts)\
**Post date:** [August 15, 2014, 1:54pm UTC](https://forum.inductiveautomation.com/t/mobile-client-wont-launch-projects/8783/3 "2014-08-15T13:54:16Z")

</div>

## So I contacted Inductive Automation support and spoke to one of their engineers, Paul Scott, about my issue. Paul troubleshot my problem like a champ and solved it! Read on if you would like to know how we came to the solution:

Hello Erik,

The issue with the mobile clients be due to an issue with OpenJDK. We ran  
into a similar issue when working on a demo server here. It was using an  
OpenJDK as well. We started with the commands below,but can skip it if  
you want to keep the OpenJDK on the machine.I’m only listing it because  
these are the steps I took:

sudo apt-get purge openJDK\*  
sudo apt-get autoremove  
sudo apt-get install python-software-properties

Below is the part you should try first. These will install an instance of  
the Java 7 JRE and reboot the server:

sudo add-apt-repository ppa:webupd8team/java  
sudo apt-get update  
sudo apt-get install oracle-java7-installer  
sudo reboot

Next you’ll need to update the “Java Path” setting for the mobile module.  
It will most likely be /usr/lib/jvm/java-7-oracle/jre/bin/java, but you  
can find the exact path by running the following:

ls -l /etc/alternative/java

Enter that path into the "Java Path setting, and try launching a mobile  
client. Let me know if you see any new errors or have any troubles.

## Paul Scott

Thank you so much for all your help Paul,  
I am still unable to launch clients on mobile devices and I am still  
getting the exact same error:  
Timeout waiting for new VM  
I initially left the openJDK on the server and simply installed the jre  
per instructions from you and updated the path in the module settings to  
no avail. I checked the path and found it to be accurate. I restarted the  
module and the iPad along with refreshing the iPad¹s cache, still didn¹t  
work. So I restarted the OPC-UA module as well and it still didn¹t work.  
I finally went ahead and removed the openJDK just to make sure their were  
no conflicts. I checked to make sure the openJDK was gone and then  
restarted and refreshed the cache of all involved and tried again. Same  
ERROR!  
It is linked to the gateway because I get the ignition icon on the iPad  
and it launches the list of projects, but that is it I don¹t know if it  
will help any but I have attached the console logs.  
Please send me any questions that might help me help you help me 🙂

## Erik R Fritts

Hello Erik,

Thank you for the logs. I would like to try launching a mobile client on  
you computer (not an iPad)  
-Click the home tab of the gateway  
-Under Mobile Launch you’ll see a link to launch a mobile project. Click  
the link  
-Pick a project and log in.

Did you see the same error? Also, I’m curious if any client logs are  
being generated when attempting to launch a mobile project.

-Under the mobile settings type the following for the JVM Options field:  
-Dmobile.debug=true  
-Save the mobile settings  
-Try to launch a project  
-Do you see any new files generated in  
/var/lib/ignition/data/mobile\_wdir? Aside from  
mobile-client-bootstrap.jar and mobile-common.jar, you should see two new  
files: ClientVM-########-####-####-####-############-err.log and  
ClientVM-########-####-####-####-############-out.log. Are those files  
there?

If the ClientVM logs were not created, then it is still an issue with the  
version of Java the mobile module is trying to use. Try  
uninstalling/re-installing the version of Java I had you install in the  
last email, and try launching a project again.

If the ClientVM logs were created, then send them in so I can look at  
them.

## Paul Scott

Hello again Paul, I decided to give it another go this morning and spent  
my morning trying to get my Gateway unfaulted. Here is the rundown:  
I get the same error when trying to launch the clients from my desktop  
browser and there are still no files showing up in the mobile\_wdir¹  
directory in spite of the mobile module having the debug mode set to true.

The first time I followed your instructions I was logged in as root so I  
thought it unnecessary to use the SUDO portion of the commands, so this  
time I included that portion. I first uninstalled the oracle-java-7-jre  
gave it a reboot then followed your instructions to the letter. After  
following the original instructions I was left with a faulted gateway that  
I could not access. Since you noted that the openJDK was believed to be an  
issue I went ahead and replaced it with the oracle java8 JDK and after a  
reboot was able to use my gateway again.  
-Now I have no openJDK on my Ubuntu 12.04LTS 64bit  
-The oracle java7 JRE is installed at /usr/lib/jvm/java-7-oracle/jre/bin/  
and is set as the modules path  
-I have the oracle java8 JDK installed  
I set all the mobile module logs to debug in the gateway console and tried  
running the clients in my browser again. I exported the logs and included  
them with this email. Whatever is wrong it has to be happening before the  
JVM options can create the debug files. I was so desperate I even tried  
setting the module¹s path to java. I even tried searching the entire  
server for the clientvm log files and found no files that even had  
clientvm in them. Thanks for your help and hopefully I gave you a few new  
clues.

## Erik R Fritts

Hello Erik,

Let’s try an experiment. With the Mobile.VMManager set to debug, you’ll  
notice that when you try to launch a mobile project it will output a line  
like this:

Starting vm: /usr/lib/jvm/java-7-oracle/jre/bin/java -cp  
/usr/local/bin/ignition/lib/core/launch/launchclient.jar:/var/lib/ignition  
/data/mobile\_wdir/mobile-common.jar:/var/lib/ignition/data/mobile\_wdir/mob  
ile-client-bootstrap.jar -Dmobile.callback.interface=localhost  
-Dmobile.callback.port=45900 -DWebEncodingSocket.throttleThreshold=150  
-Dmobile.debug=true -Xmx512M com.inductiveautomation.mobile.MobileMain

Try running the above in a terminal (sans the "Starting vm: " part, of  
course). What happens?

Also, while the above process is running, what happens if you try to  
launch another mobile client from the gateway’s home page?

## Paul Scott

Sorry it took me so long to get back to you Paul. I am a multitasking  
worker ant. So I was finally able to do the little experiment you  
requested today and I believe I have some favorable results to return to  
you. As soon as I ran the terminal command I was able to launch the mobile  
client and interestingly enough as soon as I closed my terminal session it  
terminated the mobile client. The terminal also gave me directions to the  
debug files that were created. So I have sent you some screenshots and the  
debug files with this e mail. I look forward to hearing what this little  
test means.

## Erik R Fritts

Erik,

It might be a permissions issue. On the server, navigate to /usr/local/bin/ and display the ignition.sh file. Under the docommand()definition you should see a line that looks like the following:

start “$@”

This will be around line 1512 (give or take a line). Right above the ‘start “$@”’ line you should see the following:

/usr/local/bin/ignition/xvfbstart &

Is that line of code there? Also, make sure that the file in the path (xvfbstart) is at that location.

## Paul Scott

Indeed the line Paul asked about was missing from the ignition.sh file so I added it and tested with positive results.
