How to fix error “Enrollment failed” when trying WSO2 IoT 3.3.0 android enrollment?












3















I set up a new server windows 2012R2 in a VM machine. The latest active-mq and Apache-ant are downloaded. Oracle JDK 8u192 is used. After installation and setup of the WSO2 IoT application, I cannot enroll an android device.



I installed the WSO2IOT by following the instructions in the online documentations for version 3.3.0.



CARBON_HOME and JAVA_HOME are set up in environment variables already.



The process of steps that I go are as follows:




  1. I start the activemq by running it inside a cmd window as instructed by the documentation.

  2. I start broker.bat in another cmd window

  3. I start iot-server.bat in another cmd window

  4. I start analytics.bat in another cmd window

  5. Everything starts and I end up with the text "Carbon .. has stared in ** milliseconds.

  6. I open my management console on https port 9443devicemgt and login as admin no problem.

  7. After that I connect my galaxy A5 2016 model with android 7.0 to the same network via WiFi. Download the app via QR code from my PC screen to the mobile phone. Install the app and try to register. The IP which I enter is static in the VM and of course I add 8280 port in the wso2 management app on the phone. Then I login with admin/admin credentials which logins successfully but right after that it posts an message on the phone that it is receiving policy and here it stops. The little circle spins (loading) and nothing happens for few minutes after which I get an error "Enrollment failed. Contact the administrator. Enrollment failed." no other message or anything.


On the analytics cmd window I got the following error inside my VM:



[2018-12-20 11:00:00,037] [IoT-Analytics] ERROR {org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter} -  Error in executing task: nulljava.lang.NullPointerException
at org.wso2.carbon.analytics.spark.core.CarbonAnalyticsProcessorService.executeQuery(CarbonAnalyticsProcessorService.java:256)
at org.wso2.carbon.analytics.spark.core.CarbonAnalyticsProcessorService.executeScript(CarbonAnalyticsProcessorService.java:206)
at org.wso2.carbon.analytics.spark.core.AnalyticsTask.execute(AnalyticsTask.java:60)
at org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:67)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)


And that is basically it I cant move on forward from here. I tried with different java jdk versions as old as 8u144 and I tried with openJDK 8 LTSu191 to no avail.



Other things like creating policies in the devicemgt portal, creating users and browsing the portal works fine.



Did anyone encounter this issue and manage to solve it?
Thanks.










share|improve this question





























    3















    I set up a new server windows 2012R2 in a VM machine. The latest active-mq and Apache-ant are downloaded. Oracle JDK 8u192 is used. After installation and setup of the WSO2 IoT application, I cannot enroll an android device.



    I installed the WSO2IOT by following the instructions in the online documentations for version 3.3.0.



    CARBON_HOME and JAVA_HOME are set up in environment variables already.



    The process of steps that I go are as follows:




    1. I start the activemq by running it inside a cmd window as instructed by the documentation.

    2. I start broker.bat in another cmd window

    3. I start iot-server.bat in another cmd window

    4. I start analytics.bat in another cmd window

    5. Everything starts and I end up with the text "Carbon .. has stared in ** milliseconds.

    6. I open my management console on https port 9443devicemgt and login as admin no problem.

    7. After that I connect my galaxy A5 2016 model with android 7.0 to the same network via WiFi. Download the app via QR code from my PC screen to the mobile phone. Install the app and try to register. The IP which I enter is static in the VM and of course I add 8280 port in the wso2 management app on the phone. Then I login with admin/admin credentials which logins successfully but right after that it posts an message on the phone that it is receiving policy and here it stops. The little circle spins (loading) and nothing happens for few minutes after which I get an error "Enrollment failed. Contact the administrator. Enrollment failed." no other message or anything.


    On the analytics cmd window I got the following error inside my VM:



    [2018-12-20 11:00:00,037] [IoT-Analytics] ERROR {org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter} -  Error in executing task: nulljava.lang.NullPointerException
    at org.wso2.carbon.analytics.spark.core.CarbonAnalyticsProcessorService.executeQuery(CarbonAnalyticsProcessorService.java:256)
    at org.wso2.carbon.analytics.spark.core.CarbonAnalyticsProcessorService.executeScript(CarbonAnalyticsProcessorService.java:206)
    at org.wso2.carbon.analytics.spark.core.AnalyticsTask.execute(AnalyticsTask.java:60)
    at org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:67)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)


    And that is basically it I cant move on forward from here. I tried with different java jdk versions as old as 8u144 and I tried with openJDK 8 LTSu191 to no avail.



    Other things like creating policies in the devicemgt portal, creating users and browsing the portal works fine.



    Did anyone encounter this issue and manage to solve it?
    Thanks.










    share|improve this question



























      3












      3








      3








      I set up a new server windows 2012R2 in a VM machine. The latest active-mq and Apache-ant are downloaded. Oracle JDK 8u192 is used. After installation and setup of the WSO2 IoT application, I cannot enroll an android device.



      I installed the WSO2IOT by following the instructions in the online documentations for version 3.3.0.



      CARBON_HOME and JAVA_HOME are set up in environment variables already.



      The process of steps that I go are as follows:




      1. I start the activemq by running it inside a cmd window as instructed by the documentation.

      2. I start broker.bat in another cmd window

      3. I start iot-server.bat in another cmd window

      4. I start analytics.bat in another cmd window

      5. Everything starts and I end up with the text "Carbon .. has stared in ** milliseconds.

      6. I open my management console on https port 9443devicemgt and login as admin no problem.

      7. After that I connect my galaxy A5 2016 model with android 7.0 to the same network via WiFi. Download the app via QR code from my PC screen to the mobile phone. Install the app and try to register. The IP which I enter is static in the VM and of course I add 8280 port in the wso2 management app on the phone. Then I login with admin/admin credentials which logins successfully but right after that it posts an message on the phone that it is receiving policy and here it stops. The little circle spins (loading) and nothing happens for few minutes after which I get an error "Enrollment failed. Contact the administrator. Enrollment failed." no other message or anything.


      On the analytics cmd window I got the following error inside my VM:



      [2018-12-20 11:00:00,037] [IoT-Analytics] ERROR {org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter} -  Error in executing task: nulljava.lang.NullPointerException
      at org.wso2.carbon.analytics.spark.core.CarbonAnalyticsProcessorService.executeQuery(CarbonAnalyticsProcessorService.java:256)
      at org.wso2.carbon.analytics.spark.core.CarbonAnalyticsProcessorService.executeScript(CarbonAnalyticsProcessorService.java:206)
      at org.wso2.carbon.analytics.spark.core.AnalyticsTask.execute(AnalyticsTask.java:60)
      at org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:67)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)


      And that is basically it I cant move on forward from here. I tried with different java jdk versions as old as 8u144 and I tried with openJDK 8 LTSu191 to no avail.



      Other things like creating policies in the devicemgt portal, creating users and browsing the portal works fine.



      Did anyone encounter this issue and manage to solve it?
      Thanks.










      share|improve this question
















      I set up a new server windows 2012R2 in a VM machine. The latest active-mq and Apache-ant are downloaded. Oracle JDK 8u192 is used. After installation and setup of the WSO2 IoT application, I cannot enroll an android device.



      I installed the WSO2IOT by following the instructions in the online documentations for version 3.3.0.



      CARBON_HOME and JAVA_HOME are set up in environment variables already.



      The process of steps that I go are as follows:




      1. I start the activemq by running it inside a cmd window as instructed by the documentation.

      2. I start broker.bat in another cmd window

      3. I start iot-server.bat in another cmd window

      4. I start analytics.bat in another cmd window

      5. Everything starts and I end up with the text "Carbon .. has stared in ** milliseconds.

      6. I open my management console on https port 9443devicemgt and login as admin no problem.

      7. After that I connect my galaxy A5 2016 model with android 7.0 to the same network via WiFi. Download the app via QR code from my PC screen to the mobile phone. Install the app and try to register. The IP which I enter is static in the VM and of course I add 8280 port in the wso2 management app on the phone. Then I login with admin/admin credentials which logins successfully but right after that it posts an message on the phone that it is receiving policy and here it stops. The little circle spins (loading) and nothing happens for few minutes after which I get an error "Enrollment failed. Contact the administrator. Enrollment failed." no other message or anything.


      On the analytics cmd window I got the following error inside my VM:



      [2018-12-20 11:00:00,037] [IoT-Analytics] ERROR {org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter} -  Error in executing task: nulljava.lang.NullPointerException
      at org.wso2.carbon.analytics.spark.core.CarbonAnalyticsProcessorService.executeQuery(CarbonAnalyticsProcessorService.java:256)
      at org.wso2.carbon.analytics.spark.core.CarbonAnalyticsProcessorService.executeScript(CarbonAnalyticsProcessorService.java:206)
      at org.wso2.carbon.analytics.spark.core.AnalyticsTask.execute(AnalyticsTask.java:60)
      at org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:67)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)


      And that is basically it I cant move on forward from here. I tried with different java jdk versions as old as 8u144 and I tried with openJDK 8 LTSu191 to no avail.



      Other things like creating policies in the devicemgt portal, creating users and browsing the portal works fine.



      Did anyone encounter this issue and manage to solve it?
      Thanks.







      java android wso2 wso2iot






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 2 at 10:56









      Ankur Aggarwal

      1,64922631




      1,64922631










      asked Jan 2 at 9:17









      Stack_Overflow777Stack_Overflow777

      165




      165
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I used WM windows10. The situation fully corresponded to that described by you, with only one difference - I also had an error on the page with the preservation of policies for Android. I also saw that the default policies for windows are reflected in the platform configuration section, and the android policies are missing and cannot be saved due to the error you described. However, in the wso2 home directory I found the Android configuration file in which the default policy !!! was done.
          Next, I used ADB to watch the log from the Android device, at the time of binding (enrollment). He only confirmed the previously received information. I saw a 404 http error at the time the device attempted to get a policy agreement. Point.



          Unexpected outcome. I downloaded version 3.1.0 instead of the current version 3.3.0. I started the batch file. I went to the platform configuration section, to the Android configuration - the default agreement policy was displayed correctly and you can change it and save the changes. The binding procedure (enrollment) passed without problems - the policy was obtained by the device and then everything went according to official instructions. I fully realize that this is not the answer to the question you raised, but at the same time it can help with a quick start. I hope.



          p.s. I tried versions 3.3.1 and 3.3.0 - in both there is a similar problem with the enrollment. Version 3.1.0 does not have this problem. Versions tested on Ubuntu and WM Windows10.
          Of course it would be great if the developer representatives tell you where to dig, to use a more current version. Have a nice day.



          additionaly - also good work with 3.2.0






          share|improve this answer

























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54003799%2fhow-to-fix-error-enrollment-failed-when-trying-wso2-iot-3-3-0-android-enrollme%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I used WM windows10. The situation fully corresponded to that described by you, with only one difference - I also had an error on the page with the preservation of policies for Android. I also saw that the default policies for windows are reflected in the platform configuration section, and the android policies are missing and cannot be saved due to the error you described. However, in the wso2 home directory I found the Android configuration file in which the default policy !!! was done.
            Next, I used ADB to watch the log from the Android device, at the time of binding (enrollment). He only confirmed the previously received information. I saw a 404 http error at the time the device attempted to get a policy agreement. Point.



            Unexpected outcome. I downloaded version 3.1.0 instead of the current version 3.3.0. I started the batch file. I went to the platform configuration section, to the Android configuration - the default agreement policy was displayed correctly and you can change it and save the changes. The binding procedure (enrollment) passed without problems - the policy was obtained by the device and then everything went according to official instructions. I fully realize that this is not the answer to the question you raised, but at the same time it can help with a quick start. I hope.



            p.s. I tried versions 3.3.1 and 3.3.0 - in both there is a similar problem with the enrollment. Version 3.1.0 does not have this problem. Versions tested on Ubuntu and WM Windows10.
            Of course it would be great if the developer representatives tell you where to dig, to use a more current version. Have a nice day.



            additionaly - also good work with 3.2.0






            share|improve this answer






























              0














              I used WM windows10. The situation fully corresponded to that described by you, with only one difference - I also had an error on the page with the preservation of policies for Android. I also saw that the default policies for windows are reflected in the platform configuration section, and the android policies are missing and cannot be saved due to the error you described. However, in the wso2 home directory I found the Android configuration file in which the default policy !!! was done.
              Next, I used ADB to watch the log from the Android device, at the time of binding (enrollment). He only confirmed the previously received information. I saw a 404 http error at the time the device attempted to get a policy agreement. Point.



              Unexpected outcome. I downloaded version 3.1.0 instead of the current version 3.3.0. I started the batch file. I went to the platform configuration section, to the Android configuration - the default agreement policy was displayed correctly and you can change it and save the changes. The binding procedure (enrollment) passed without problems - the policy was obtained by the device and then everything went according to official instructions. I fully realize that this is not the answer to the question you raised, but at the same time it can help with a quick start. I hope.



              p.s. I tried versions 3.3.1 and 3.3.0 - in both there is a similar problem with the enrollment. Version 3.1.0 does not have this problem. Versions tested on Ubuntu and WM Windows10.
              Of course it would be great if the developer representatives tell you where to dig, to use a more current version. Have a nice day.



              additionaly - also good work with 3.2.0






              share|improve this answer




























                0












                0








                0







                I used WM windows10. The situation fully corresponded to that described by you, with only one difference - I also had an error on the page with the preservation of policies for Android. I also saw that the default policies for windows are reflected in the platform configuration section, and the android policies are missing and cannot be saved due to the error you described. However, in the wso2 home directory I found the Android configuration file in which the default policy !!! was done.
                Next, I used ADB to watch the log from the Android device, at the time of binding (enrollment). He only confirmed the previously received information. I saw a 404 http error at the time the device attempted to get a policy agreement. Point.



                Unexpected outcome. I downloaded version 3.1.0 instead of the current version 3.3.0. I started the batch file. I went to the platform configuration section, to the Android configuration - the default agreement policy was displayed correctly and you can change it and save the changes. The binding procedure (enrollment) passed without problems - the policy was obtained by the device and then everything went according to official instructions. I fully realize that this is not the answer to the question you raised, but at the same time it can help with a quick start. I hope.



                p.s. I tried versions 3.3.1 and 3.3.0 - in both there is a similar problem with the enrollment. Version 3.1.0 does not have this problem. Versions tested on Ubuntu and WM Windows10.
                Of course it would be great if the developer representatives tell you where to dig, to use a more current version. Have a nice day.



                additionaly - also good work with 3.2.0






                share|improve this answer















                I used WM windows10. The situation fully corresponded to that described by you, with only one difference - I also had an error on the page with the preservation of policies for Android. I also saw that the default policies for windows are reflected in the platform configuration section, and the android policies are missing and cannot be saved due to the error you described. However, in the wso2 home directory I found the Android configuration file in which the default policy !!! was done.
                Next, I used ADB to watch the log from the Android device, at the time of binding (enrollment). He only confirmed the previously received information. I saw a 404 http error at the time the device attempted to get a policy agreement. Point.



                Unexpected outcome. I downloaded version 3.1.0 instead of the current version 3.3.0. I started the batch file. I went to the platform configuration section, to the Android configuration - the default agreement policy was displayed correctly and you can change it and save the changes. The binding procedure (enrollment) passed without problems - the policy was obtained by the device and then everything went according to official instructions. I fully realize that this is not the answer to the question you raised, but at the same time it can help with a quick start. I hope.



                p.s. I tried versions 3.3.1 and 3.3.0 - in both there is a similar problem with the enrollment. Version 3.1.0 does not have this problem. Versions tested on Ubuntu and WM Windows10.
                Of course it would be great if the developer representatives tell you where to dig, to use a more current version. Have a nice day.



                additionaly - also good work with 3.2.0







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 12 at 11:41

























                answered Feb 26 at 12:35









                OblgazOblgaz

                12




                12
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54003799%2fhow-to-fix-error-enrollment-failed-when-trying-wso2-iot-3-3-0-android-enrollme%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    MongoDB - Not Authorized To Execute Command

                    How to fix TextFormField cause rebuild widget in Flutter

                    Npm cannot find a required file even through it is in the searched directory