Mobile Client Connection Problems

I will begin by stating my excitement for the mobile client functionality. Now I will begin to describe my problems.

After much in office debate about purchasing an iPad or the Galaxy Tab to get our hands dirty with the mobile client, I went out and picked up a Galaxy. I returned home and fiercely installed 7.2 beta and scanned the barcode on the Ignition Homepage with my (android) phone. To no avail: there was no glee to be had, for the browser said the page was not available.

I admit my ignorance in networking and have few ideas in coercing these devices into communication.

I can however say that my phone is connected to the same wireless router that the Ignition software is installed on, my phone runs Android version 2.2, and I am using Dolphin Browser HD.

This all being said, I also attempted to connect with my housemates iPad, only to find the same problem. A small portion of me is hesitant to open the Galaxy until I can properly launch a mobile client.

Any advice is helpful,
Thank you.

I thought I had a similar problem with scanning the barcode off of the main gateway page. With over-excitement, I scanned it the first time I saw it and then it broke… Until I realized that you have to configure the web address that the QR barcode functions off of. Give that a shot, it’s on the mobile module config page.

Yeah, this is an unfortunate. You see, unless you teach it otherwise, the homepage assumes that the browser connecting to it is similar from a networking-sense to a mobile browser. As such, it takes the URL from the browser as the best-bet to give to the mobile phone through the QR code. If you launch a browser from the server, that URL will be “localhost”. When you zap the QR code, your mobile phone will try and connect to “localhost”, which is the phone itself. Not what you wanted.






I am having connection problems on my Droid X.

I have set the server address(192.168.1.101:8088) to my laptops IP (the computer that 7.2 is running) and it is connected to a wireless router. My phone is connected to the wireless router also with IP 192.168.1.106 . I went to the Home Page and used the Mobile Launch Bar code and the correct IP address is read into the phone (192.168.1.101:8088/main/system/mobile) but my phone always returns “Web page not found” I can also click on the link under Mobile Launch and it also will not take me to the project. I can click on the Project Name under the Launch Project tab and it will Launch it fine there.

The Project is set up as a Mobile Project in the Properties section.

Any Help???

If you open the Gateway in a browser (like Chrome) and just click on that link it won’t work? Sounds like the Mobile Module had some trouble starting up.

Take a look in your Gateway’s log. In particular, is there something about an error mounting a servlet?

Gateway Log indicated that the Mobile VM Manager started.

Also take a look at the Tread in “Ignition Problems” labeled Ignition Mobile .
I think my problem is related.

I am using IE explore and get the animation of Ignition mobile loading… but the page shows done with errors.

Line: 959
Char: 5
Error: ‘console’ is undefined
Code:0
URL:http/localhost:8088/main/system/mobile

Yep - same problem. It’ll be fixed in 7.2.2.

So… until 7.2.2 comes out… for me to get my Android X to connect… I need to run CHROME ??

I am confused a little… please forgive me… I just dont/didnt see the connection that I needed CHROME to allow connection for my Phone to connect to the wireless network.
Maybe I confused you all… by maybe having 2 problems.

Problem #1 was Android X not connecting to the Server… you asked if the Mobile Module started… yes it does… but it also closes… then restarts… I have reinstalled it… and no change… running XP and 7.2.1.

Problem #2 was the Mobile Link would not launch the “simulated” application for mobile. I think that is what you refer to as going to be fixed in 7.2.2

Am I close???

Thanks,

Tyler

Sorry for the confusion. I wanted you to use Chrome to test whether the mobile module had fully started up. The bug I was referring to have fixed was the “console” bug, which affected Firefox and IE.

I still don’t know why your Droid isn’t connecting, but you certainly don’t need Chrome for it.

You need to put “-Dmobile.debug=true” in your mobile options extra connection properties and then look for the err and out logfiles that will appear in %INSTALL_DIR%/contexts/main/mobile_wdir.

OK… installed the command… “-Dmobile.debug=true” (without the quote marks)
Looked in the context/main/mobile_wdir … and no other files there except 2 .jar files.
I then used the QR Dorid to read in the web address and was able to connect to the Home Page.
Then when i try to launch a project (any project) I get “java.lang.IllegalStateException: Client VM not initialized”

Here is the Gateway Log File…

05:28:14 AM INFO VMCreator starting 1 new client VMs. Modules.Mobile.VMManager Mobile-VM-Creator
Feb 1, 2011 05:28:16 AM INFO VMCreator starting 1 new client VMs. Modules.Mobile.VMManager Mobile-VM-Creator
Feb 1, 2011 05:28:17 AM INFO VMCreator starting 1 new client VMs. Modules.Mobile.VMManager Mobile-VM-Creator
Feb 1, 2011 05:28:19 AM INFO VMCreator starting 1 new client VMs. Modules.Mobile.VMManager Mobile-VM-Creator
Feb 1, 2011 05:28:20 AM INFO VMCreator starting 1 new client VMs. Modules.Mobile.VMManager Mobile-VM-Creator
Feb 1, 2011 05:28:22 AM INFO VMCreator starting 1 new client VMs. Modules.Mobile.VMManager Mobile-VM-Creator
Feb 1, 2011 05:28:23 AM INFO VMCreator starting 1 new client VMs. Modules.Mobile.VMManager Mobile-VM-Creator
Feb 1, 2011 05:28:25 AM WARN Timed-out waiting for new client VM. (Waited for 10 seconds) Modules.Mobile.VMManager http-8088-5
Feb 1, 2011 05:28:25 AM WARN Failure in mobiledata/initvm Modules.Mobile.DataServlet http-8088-5
java.lang.Exception: Timeout waiting for new VM.
at com.inductiveautomation.mobile.gateway.servlets.MobileSession.initializeVM(MobileSession.java:304)
at com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet$InitVM.handle(MobileDataServlet.java:493)
at com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet.doRequest(MobileDataServlet.java:139)
at com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet.doGet(MobileDataServlet.java:89)
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:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Feb 1, 2011 05:29:09 AM WARN Failure in mobiledata/mouse Modules.Mobile.DataServlet http-8088-5
java.lang.IllegalStateException: Client VM not initialized.
at com.inductiveautomation.mobile.gateway.servlets.MobileSession.ensureVMOpen(MobileSession.java:203)
at com.inductiveautomation.mobile.gateway.servlets.MobileSession.sendMouseEvent(MobileSession.java:222)
at com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet$Mouse.handle(MobileDataServlet.java:450)
at com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet.doRequest(MobileDataServlet.java:139)
at com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet.doPost(MobileDataServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
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:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Feb 1, 2011 05:29:09 AM WARN Failure in mobiledata/mouse Modules.Mobile.DataServlet http-8088-3
java.lang.IllegalStateException: Client VM not initialized.
at com.inductiveautomation.mobile.gateway.servlets.MobileSession.ensureVMOpen(MobileSession.java:203)
at com.inductiveautomation.mobile.gateway.servlets.MobileSession.sendMouseEvent(MobileSession.java:222)
at com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet$Mouse.handle(MobileDataServlet.java:450)
at com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet.doRequest(MobileDataServlet.java:139)
at com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet.doPost(MobileDataServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
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:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)

Ok I’m going to have you do the same thing I advised over on this thread:

From the Gateway’s Configuration section go to the Console, and then to the Levels tab. Find the logger named “Modules.Mobile.VMManager” and change it to Debug.

Now try and launch and look at the log. Assuming there are no obvious errors now, it should report exactly what command it is using to launch the mobile VM. You should be able to go into a console and run that command by hand. For example, it should be something like:

java -cp "/usr/local/bin/ignition/contexts/main/core/launch/launchclient.jar:/usr/local/bin/ignition/contexts/main/mobile_wdir/mobile-common.jar:/usr/local/bin/ignition/contexts/main/mobile_wdir/mobile-client-bootstrap.jar" -Dmobile.callback.interface=localhost -Dmobile.callback.port=45900 -Xmx256M com.inductiveautomation.mobile.MobileMain

Run that command in a console and report back with what happens.

Ok… I have the Debug Set… and I see the Code . Where do I find a console to run it in?? Are you talking about a Java Console outside of the Gateway Page??

Please forgive my ignorance. I am learning so so much from you guys… :prayer:

Here is the code I see that its trying to run in the Log.

java, -cp, C:\PROGRA~1\INDUCT~1\Ignition\contexts\main\core\launch\launchclient.jar;C:\PROGRA~1\INDUCT~1\Ignition\contexts\main\mobile_wdir\mobile-common.jar;C:\PROGRA~1\INDUCT~1\Ignition\contexts\main\mobile_wdir\mobile-client-bootstrap.jar, -Dmobile.callback.interface=null, -Dmobile.callback.port=45900, -Dmobile.debug=true, -Xmx256M, com.inductiveautomation.mobile.MobileMain

here is also other info that may help… From the Log Tab in the console.

2/1/11 3:29:46 PM DataServlet - Failure in mobiledata/mouse

2/1/11 3:29:46 PM DataServlet - Failure in mobiledata/mouse

2/1/11 3:29:46 PM DataServlet - Failure in mobiledata/initvm

2/1/11 3:29:46 PM VMManager - Timed-out waiting for new client VM. (Waited for 10 seconds)…

2/1/11 3:29:45 PM VMManager - Starting vm: [java, -cp, C:\PROGRA~1\INDUCT~1\Ignition\conte…

2/1/11 3:29:45 PM VMManager - VMCreator starting 1 new client VMs.

2/1/11 3:29:44 PM LocalDBManagerImpl - Created auto-backup of internal database “settings” in 7 sec…

2/1/11 3:29:43 PM VMManager - Starting vm: [java, -cp, C:\PROGRA~1\INDUCT~1\Ignition\conte…

2/1/11 3:29:43 PM VMManager - VMCreator starting 1 new client VMs.

By console I meant a command prompt (DOS) console.

But that latest snippet looks interesting - what are the details of failure in mobiledata/initvm?

Here is that info…

com.inductiveautomation.ignition.gateway.web.pages.config.systemconsole.LogViewer$SerializableLoggingEvent$ClonedThrowable: Timeout waiting for new VM.
com.inductiveautomation.mobile.gateway.servlets.MobileSession.initializeVM(MobileSession.java:304)
com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet$InitVM.handle(MobileDataServlet.java:493)
com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet.doRequest(MobileDataServlet.java:139)
com.inductiveautomation.mobile.gateway.servlets.MobileDataServlet.doGet(MobileDataServlet.java:89)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
com.inductiveautomation.ignition.gateway.bootstrap.MapServlet.service(MapServlet.java:85)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Unknown Source)

Oh of course. How about running the command above via DOS? (make sure to remove the commas between each argument)

Here is the code that you wanted before… ran in a console… and the results

C:\Documents and Settings\Tyler Tuttle>java -cp C:\PROGRA~1\INDUCT~1\Ignition\co
ntexts\main\core\launch\launchclient.jar;C:\PROGRA~1\INDUCT~1\Ignition\contexts
main\mobile_wdir\mobile-common.jar;C:\PROGRA~1\INDUCT~1\Ignition\contexts\main\m
obile_wdir\mobile-client-bootstrap.jar -Dmobile.callback.interface=null -Dmobile
.callback.port=45900 -Dmobile.debug=true -Xmx256M com.inductiveautomation.mobile
.MobileMain
Mobile client bootstrap v1.2.1.6516 starting.
Connecting to Gateway at null:45900…
Unable to connect to gateway.
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at com.inductiveautomation.mobile.MobileMain.main(MobileMain.java:91)

C:\Documents and Settings\Tyler Tuttle>

Hey Carl… I found out what the problem was… Man… I wish I was as smart as you guys…
But all this troubleshooting really helps me out.

The problem was the Callback Interface Setting.

It was left blank = default localhost… but since I was using a wireless router… I needed to use the IP address of my server…

I did that… and presto!!! :thumb_left: :thumb_left: :smiley:

Thanks for your Help… and sorry I took your time away from other task.

Tyler

Great! I’m glad you got it working.

The mobile module is particularly tricky to troubleshoot due to the way it creates separate JVMs - but persistence always wins.

Cheers,

1 Like