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