IBM工作灯6.1 - 服务器连接问题 [英] IBM Worklight 6.1 - Server connection Issue

查看:174
本文介绍了IBM工作灯6.1 - 服务器连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一台IBM工作灯混合应用POC。我现在面临与应用程序连接到WL服务器的问题。

一旦部署工作灯控制台上,当我在浏览器中查看它,它能够连接到托管我的本地机器上的工作灯服务器(即使该应用程序是由移动Chrome浏览器访问)。

后,但是加入了Android环境和封装在科尔多瓦容器中的应用,并从我的Andr​​oid设备(编译和Eclipse中运行),我无法连接到托管在我的机器上工作灯服务器上运行的apk。

无论是设备和我的笔记本电脑都在同一网络上(我访问从设备Chrome浏览器的工作灯控制台应用程序,正常工作)。

我已经验证下面


  1. 的wlclient.properties指向我的本地机器IP

  2. 我的工作灯服务器被绑定到IP

  3. 是我在端口80上运行的服务器工作灯(以避免任何防火墙的问题,其实我也把我的本地防火墙关闭)

  4. 我使用招捕获的数据包,根本看不清请求击中服务器。


解决方案

如果您的应用程序设置为连接到在启动服务器,它是不成功的,你应该看到下面的对话框中的应用程序未能连接到服务。为了确保它正在尝试连接到正确的地址和上下​​文根点击详细信息按钮。

:那么您将在下面的页面服务URL,显示的URL如见

的http://地址:口/上下文根/..​​..

确认这些设置,您试图连接到服务器的地址,端口和上下文根相匹配。如果他们尝试连接到的http://地址:口/上下文根/控制台中的设备浏览器,以确保该设备访问服务器。最后,您可以检查错误code和错误信息部分的详细信息页面内同时给我们提供进一步的诊断信息。

请注意:如果您没有看到详细信息按钮,上面解释请确保您已设置在applicationDescriptor为每个特定的环境下(在iOS和Android提供):

 < worklightSettings包括=真/>

更多信息可以在这里找到:
<一href=\"https://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.dev.doc%2Fdev%2Fc_setting_page.html&resultof%3D%2522worklight%2522%2520%2522settings%2522%2520%2522set%2522\" rel=\"nofollow\">https://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.dev.doc%2Fdev%2Fc_setting_page.html&resultof%3D%2522worklight%2522%2520%2522settings%2522%2520%2522set%2522

I am working on a IBM Worklight hybrid app POC. I am facing an issue with connecting an app to the WL server.

Once deployed on worklight console, when i view it in the browser, it's able to connect to the worklight server hosted on my local machine (even when the app is accessed from mobile chrome browser).

However after adding the Android environment and package the application in cordova container, and run the apk from my android device(build and run from eclipse), i am unable to connect to the worklight server hosted on my machine.

Both the device and my laptop are on the same network ( i accessed the worklight console app from device chrome browser, works fine).

I have verified the below

  1. that wlclient.properties points to my local machine IP
  2. that my worklight server is bound to that IP
  3. that i am running worklight server on port 80(to avoid any firewall issues, in fact i also turned my local firewall off)
  4. I captured packets using fiddler, could not see the request hitting the server.

解决方案

If your application is set to connect to the server on startup and it is unsuccessful you should see the following dialog box "The application failed connecting to the service". To make sure it is attempting to connect to the correct address and context root click the "Details" button. You will then see in the following page a "Service URL" that shows the URL such as:

http://"address":"port"/"context root"/....

Make sure these settings match the address, port and context root of the server you are attempting to connect to. If they do attempt to connect to http://"address":"port"/"context root"/console in the devices browser to make sure the device has access to the server. Finally you can check the "Error Code" and "Error Message" portions inside the details page as well to provide us further diagnostic information.

Note: If you do not see the "Details" button explained above please make sure you have set the following in your applicationDescriptor for each specific environment (available on iOS and Android):

 <worklightSettings include="true"/>

More information can be found here: https://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.dev.doc%2Fdev%2Fc_setting_page.html&resultof%3D%2522worklight%2522%2520%2522settings%2522%2520%2522set%2522

这篇关于IBM工作灯6.1 - 服务器连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆