0

I successfully installed WSO2 iot-server3.1.0. I enrolled my android device successfully. I can see my device status and logs on https://localhost:9443/devicemgt/device/android?id=(someid).

The image below is a snapshot of my device status.

figure 1.0

Meanwhile I managed to publish a custom .apk into the wso2 local server store. From the store I can access the application and then install it on different enrolled devices.

This is where I get (see picture:) figure 2.0 Then I selected the desired enrolled device by user and press install. I do not get any errors and so the application should start installing on the selected devices but it DOES NOT HAPPEN AS EXPECTED. The application is not being installed. As you can see in figure 1.0 in the logs, INSTALL_APPLICATION remains IN_PROGRESS. I proceed install 15 hours ago. What is happening? Any hint is welcome. Thanks!

I followed the following:

  1. https://www.youtube.com/watch?v=O5UPy8XfaFY&lc=z23dcvywblayvlyzt04t1aokg12r1aunvhugyhklc2ehrk0h00410.1513229853059086

  2. https://www.youtube.com/watch?v=voBWYk0Zm6I

* EDIT *

While watching throug my android device logs (while pressing install from server) I observed the folowing link: http://192.168.43.107:8280/api/device-mgt/android/v1.0/devices/8f12df164e574651/pending-operations. The request returns the following xml:

<am:fault xmlns:am="http://wso2.org/apimanager">
<script>...</script>
<am:code>404</am:code>
<am:type>Status report</am:type>
<am:message>Runtime Error</am:message>
<am:description>No matching resource found for given API Request</am:description>
</am:fault>

Also I get this on server:

org.wso2.carbon.apimgt.webapp.publisher.exception.APIManagerPublisherException: feign.RetryableException: Connection refused: connect executing POST https://localhost:9443/client-registration/v0.11/register
        at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherServiceImpl.publishAPI(APIPublisherServiceImpl.java:75)
        at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherStartupHandler.publishAPIs(APIPublisherStartupHandler.java:97)
        at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherStartupHandler.access$500(APIPublisherStartupHandler.java:30)
        at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherStartupHandler$1.run(APIPublisherStartupHandler.java:69)
        at java.lang.Thread.run(Thread.java:748)
Caused by: feign.RetryableException: Connection refused: connect executing POST https://localhost:9443/client-registration/v0.11/register
        at feign.FeignException.errorExecuting(FeignException.java:67)
        at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:104)
        at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)
        at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
        at com.sun.proxy.$Proxy26.register(Unknown Source)
        at org.wso2.carbon.apimgt.integration.client.OAuthRequestInterceptor.apply(OAuthRequestInterceptor.java:84)
        at feign.SynchronousMethodHandler.targetRequest(SynchronousMethodHandler.java:158)
        at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:88)
        at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)
        at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
        at com.sun.proxy.$Proxy40.apisGet(Unknown Source)
        at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherServiceImpl.publishAPI(APIPublisherServiceImpl.java:53)
        ... 4 more
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
        at feign.Client$Default.convertAndSend(Client.java:133)
        at feign.Client$Default.execute(Client.java:73)
        at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:97)
        ... 14 more
Community
  • 1
  • 1
Ispas Claudiu
  • 1,890
  • 2
  • 28
  • 54

2 Answers2

0

Please change the following value to the URL you are accessing the server.

In IOT_HOME/conf/app-manager.xml

<Config name="AppDownloadURLHost">%http%</Config>
  • and change it to what specifically? the documentation does not refer to app-manager.xml. can you post a link with a more detailed documentation on how to setup the server properly? Thanks – Ispas Claudiu Dec 15 '17 at 08:42
0

Try to compile Android agent changing APP_MANAGER_HOST property to https://192.168.43.107:9443 use Shift Ctrl F to find all occurence

JD11
  • 306
  • 3
  • 11