0
我从IBM网站下载的pushnotification例子,在我的Eclipse运行它连接装置,工作灯控制台
06-29 11:12:45.952: W/System.err(8871): org.apache.http.conn.HttpHostConnectException: Connection to http://10.90.33.127:10080 refused
06-29 11:12:45.952: W/System.err(8871): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)
06-29 11:12:45.952: W/System.err(8871): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
06-29 11:12:45.952: W/System.err(8871): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
06-29 11:12:45.952: W/System.err(8871): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
06-29 11:12:45.952: W/System.err(8871): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
06-29 11:12:45.962: W/System.err(8871): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
06-29 11:12:45.962: W/System.err(8871): at com.worklight.wlclient.WLRequestSender.run(WLRequestSender.java:47)
06-29 11:12:45.962: W/System.err(8871): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
06-29 11:12:45.962: W/System.err(8871): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
06-29 11:12:45.962: W/System.err(8871): at java.lang.Thread.run(Thread.java:856)
06-29 11:12:45.962: W/System.err(8871): Caused by: java.net.ConnectException: failed to connect to /10.90.33.127 (port 10080) after 10000ms: connect failed: ENETUNREACH (Network is unreachable)
06-29 11:12:45.962: W/System.err(8871): at libcore.io.IoBridge.connect(IoBridge.java:114)
06-29 11:12:45.962: W/System.err(8871): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
06-29 11:12:45.962: W/System.err(8871): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:460)
06-29 11:12:45.962: W/System.err(8871): at java.net.Socket.connect(Socket.java:832)
06-29 11:12:45.962: W/System.err(8871): at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
06-29 11:12:45.962: W/System.err(8871): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
06-29 11:12:45.962: W/System.err(8871): ... 9 more
06-29 11:12:45.962: W/System.err(8871): Caused by: libcore.io.ErrnoException: connect failed: ENETUNREACH (Network is unreachable)
06-29 11:12:45.972: W/System.err(8871): at libcore.io.Posix.connect(Native Method)
06-29 11:12:45.972: W/System.err(8871): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)
06-29 11:12:45.972: W/System.err(8871): at libcore.io.IoBridge.connectErrno(IoBridge.java:144)
06-29 11:12:45.972: W/System.err(8871): at libcore.io.IoBridge.connect(IoBridge.java:112)
06-29 11:12:45.972: W/System.err(8871): ... 14 more
06-29 11:12:46.032: D/wl.certManager(8871): WLCertManager.clearKeystore in WLCertManager.java:258 :: Key store cleared.
06-29 11:12:46.072: W/PluginManager(8871): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.deleteAllAuthData blocked the main thread for 36ms. Plugin should use CordovaInterface.getThreadPool().
06-29 11:12:46.082: D/wl.certManager(8871): WLCertManager.clearKeystore in WLCertManager.java:258 :: Key store cleared.
06-29 11:12:46.162: W/PluginManager(8871): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.getClientInstanceIdHeader blocked the main thread for 87ms. Plugin should use CordovaInterface.getThreadPool().
06-29 11:12:46.172: W/System.err(8871): org.apache.http.conn.HttpHostConnectException: Connection to http://10.90.33.127:10080 refused
06-29 11:12:46.172: D/wl.request(8871): WLRequestSender.run in WLRequestSender.java:40 :: Sending request http://10.90.33.127:10080/PushNotifications/authorization/v1/clients/instance
06-29 11:12:46.172: W/System.err(8871): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)
06-29 11:12:46.172: W/System.err(8871): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
06-29 11:12:46.172: W/System.err(8871): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
06-29 11:12:46.172: W/System.err(8871): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
06-29 11:12:46.172: W/System.err(8871): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
06-29 11:12:46.172: W/System.err(8871): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
06-29 11:12:46.172: W/System.err(8871): at com.worklight.wlclient.WLRequestSender.run(WLRequestSender.java:47)
06-29 11:12:46.172: W/System.err(8871): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
06-29 11:12:46.182: W/System.err(8871): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
06-29 11:12:46.182: W/System.err(8871): at java.lang.Thread.run(Thread.java:856)
06-29 11:12:46.182: W/System.err(8871): Caused by: java.net.ConnectException: failed to connect to /10.90.33.127 (port 10080) after 10000ms: connect failed: ENETUNREACH (Network is unreachable)
06-29 11:12:46.182: W/System.err(8871): at libcore.io.IoBridge.connect(IoBridge.java:114)
06-29 11:12:46.182: W/System.err(8871): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
06-29 11:12:46.182: W/System.err(8871): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:460)
06-29 11:12:46.182: W/System.err(8871): at java.net.Socket.connect(Socket.java:832)
06-29 11:12:46.182: W/System.err(8871): at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
06-29 11:12:46.182: W/System.err(8871): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
06-29 11:12:46.182: W/System.err(8871): ... 9 more
06-29 11:12:46.182: W/System.err(8871): Caused by: libcore.io.ErrnoException: connect failed: ENETUNREACH (Network is unreachable)
06-29 11:12:46.192: W/System.err(8871): at libcore.io.Posix.connect(Native Method)
06-29 11:12:46.192: W/System.err(8871): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)
06-29 11:12:46.192: W/System.err(8871): at libcore.io.IoBridge.connectErrno(IoBridge.java:144)
06-29 11:12:46.192: W/System.err(8871): at libcore.io.IoBridge.connect(IoBridge.java:112)
06-29 11:12:46.192: W/System.err(8871): ... 14 more
06-29 11:12:46.262: D/wl.certManager(8871): WLCertManager.clearKeystore in WLCertManager.java:258 :: Key store cleared.
06-29 11:12:46.272: D/NONE(8871): Client registration failed with error: {"responseHeaders":{},"status":500,"responseText":"","errorCode":"UNEXPECTED_ERROR","errorMsg":"Unexpected errorCode occurred. Please try again.","invocationContext":null}
06-29 11:12:46.332: E/NONE(8871): [/apps/services/api/PushNotifications/android/init] failure. state: 500, response: undefined
06-29 11:12:46.352: D/NONE(8871): Failed connecting to MobileFirst Server.
06-29 11:12:46.762: W/PluginManager(8871): THREAD WARNING: exec() call to Notification.confirm blocked the main thread for 403ms. Plugin should use CordovaInterface.getThreadPool().
这里是我mobilefirst服务器的详细信息
主机名:10.90.33.127
我adpater细节
wlServerProtocol = http
wlServerHost = 10.90.33.127
wlServerPort = 10080
wlServerContext = /PushNotifications/
wlAppId = PushNotifications
和我的设备上的错误说:“连接到移动第一服务器失败,稍后再试。”
和我wlclient.properties是
wlServerProtocol = http
wlServerHost = 10.90.33.127
wlServerPort = 10080
wlServerContext = /PushNotifications/
wlAppId = PushNotifications
1)是的,我能看到我的电脑中的控制台2)没有我无法通过我的手机访问控制台(它说网页不可用)3)是我连接到同一网络 –
有没有检查我的应用程序如何连接到服务器的方式,比如它连接的URL是什么? –
在你的android应用程序中找到wlclient.propeties文件,或者在iOS中找到worklight.plist文件。该文件在**生成的项目**(在Studio中构建应用程序之后的本机文件夹)中可用;这是它连接到服务器的地址。你的IP可能是错误的。 –