13 Replies Latest reply on Jun 20, 2017 10:47 AM by cmorfin RSS
    achaube Explorer

    Thingworx Dataconnect

    Hello,

     

          I Have installed thingworx analytics and dataconnector on separately virtual machines on the same virtual box installed .

    1.Thingworx analytics server is working fine.(192.168.56.104)

    2.Dataconnector gives error while accessing it through the broswer(192.168.56.104:8080)

    when i enter 192.168.56.104:8080 it says i am alive but when i put the whole url /1.0/about/versionfo it gives 404 error .

    I am sharing my logs files screenshots of the url and also the dataconnect.conf files

    i tried these different sets of urls but couldnt reach the site or got 404 error

    http://192.168.56.104:8080/twxml-connect/about/versioninfo

    http://192.168.56.104:8080/1.0/about/versioninfo

    http://192.168.56.104:8080/twxml-connect/1.0/about/versioninfo

    Looking forward for your reply

     

    Warm Regards,

    Amar

      • Re: Thingworx Dataconnect
        cmorfin Creator

        Hi Amar

         

        Some questions:

        - do you remember if you ran the command yum install DataConnect.rpm more than once on this machine ?

        - could you upload:

            - file listRoot.txt file created after executing the command ls -l <Tomcat>/webapps/ROOT/WEB-INF/lib

            - file listtwxml.txt file created after executing the command ls -l <Tomcat>/webapps/twxml-connect/WEB-INF/lib

            - file  <Tomcat>/webapps/twxml-connect/WEB-INF/lib/dataconnect.db-7.4.0.jar


        Also are you sure the dataconnect.conf you previously uploaded is the latest one under /opt/dataconnect/config ?
        If the log files you uploaded are the latest, they complain about issue with postgres, but your dataconnect.conf is set to H2. So I would think either the dataconnect.conf or the log files are not taken from the same time.

         

        Thank you

        Kind regards

        Christophe

          • Re: Thingworx Dataconnect
            achaube Explorer

            Hello Christophe,

             

              Thanks for reply ..

            1. Yes had installed dataconnect rpm on the same system multiple times by using yum install dataconnect.rpm

            2.there are no listRoot.txt and listtwxml.txt files in the /ROOT/WEb-INF/lib folder and /twxml-connect/web-inf/lib folder

            3. i had set the java opts for database as psotgresql in tomcat.conf to thats why the looged fil showed postgresql.now i have changed it to h2

                shareing the latest log file along with the dataconnect.conf and tomcat.conf files.you can see the entries in log files for date 2017-06-12 from 7:50

             

            Thank you.

            warm regards,

            Amar

              • Re: Thingworx Dataconnect
                cmorfin Creator

                Hi Amar

                 

                Thanks, the logs make more sense since you updated this Tomcat setting .

                I miss part of the command in my previous post, this is why you did not find the txt file - apologies for this.
                They would still be useful to me, so could you please send the 2 files:

                     - file /tmp/listRoot.txt file created after executing the command ls -l <Tomcat>/webapps/ROOT/WEB-INF/lib >/tmp/listRoot.txt

                    - file /tmp/listtwxml.txt file created after executing the command ls -l <Tomcat>/webapps/twxml-connect/WEB-INF/lib > /tmp/listtwxml.txt

                 

                We are likely having 2 installation of DataConnect that then conflict with each other, but the above files should confirm this and we can see what step to take next.

                Thanks

                Christophe

                  • Re: Thingworx Dataconnect
                    achaube Explorer

                    Hello Christophe,

                     

                     

                                 I used those commands and two files were created in the tmp folder sending you those files in the below attachments.

                                 Thank you so much for the help.

                    Warm Regards,

                    Amar

                      • Re: Thingworx Dataconnect
                        cmorfin Creator

                        Hi Amar

                         

                        Thank you for that.

                        So we have indeed 2 DataConnect webapps that have been deployed, so we need to remove one.

                        Could you perform the following steps:

                         

                        - Stop Tomcat

                        - Execute: rm -rf <Tomcat>/webapps/twxml-connect*

                        - Execute rm -rf /opt/dataconnect/db/*

                        - restart Tomcat

                         

                        Then try accessing http://<server>:8080/1.0/about/versioninfo

                         

                        if issues, please provide all the DataConnect and Tomcat log files.

                         

                        Thank you

                        Kind regards

                        Christophe

                          • Re: Thingworx Dataconnect
                            achaube Explorer

                            Hello Christophe,

                                            

                                              I tried removing only the db files from /opt/dataconnect/and restarted the server

                            then i was able to access the dataconnector by using the follwing url http://192.168.56.104:8080/twxml-connect/1.0/about/versioninfo ,

                            can i continue with the same?

                             

                            when i followed your commands and removed the twxml_connect from tomcat and db files from /opt/dataconnect

                            the url http://192.168.56.104:8080/1.0/about/versioninfo returned 404

                            for latetst ebries in log after removal of twxml-connect you can look for logs after 7:0

                            shareing the following log files

                            Thanks a  lot for the help

                            Regards,

                            Amar

                              • Re: Thingworx Dataconnect
                                cmorfin Creator

                                Hi Amar

                                 

                                It is good that you were able to access the twxml-connect webapp but I do not like the fact that we have got 2 DataConnect webapps deployed, this is likely going to cause issues at some point.

                                 

                                Since you are able to connect, the configuration should be ok, so I would recommend to perform some backup and a uninstall / reinstall and simply reuse the config files.

                                This should give you a cleaner installation.

                                You can follow the steps from https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS262429 to uninstall and re-install

                                 

                                Kind regards

                                Christophe

                                  • Re: Thingworx Dataconnect
                                    achaube Explorer

                                    Hello Christophe,

                                     

                                     

                                                        Thanks a lot for the previous help i uninstalled the twxml-connect and reinstalled it .

                                    Now i am successfully able to access the dataconnect by the url http://192.168.56.104:8081/1.0/about/versioninfo

                                    I get a response "Implementationversion:'7.4.0' " .

                                    when i try to make a REST API  calls provided in the dataconnect user guide.

                                    trying to create a dataset by using the URI: /transform/create by giving the sample body given in the guide on page 32.

                                    i get a response 200 ok but it fails to upload or create dataset .it gives error like host is unreachable .

                                    Shareing the log files in the below attached file

                                    Your post are really helpfull ,looking forward for your reply ,thanks once again

                                    • Re: Thingworx Dataconnect
                                      achaube Explorer

                                      Hello Christophe,

                                        

                                                    also when i try to upload a dataset which  is nothing but a .csv file zipped by using the following url

                                      http://192.168.56.104:8080/1.0/uploads/datasets/demo

                                      I get error on the log file of dataconnect-rest.log as database has no schema ,can you nprovide a sample dataset n order to check the installation of the dataconnector...

                                       

                                      Regards,

                                      Amar

                                        • Re: Thingworx Dataconnect
                                          cmorfin Creator

                                          Hi Amar

                                           

                                          I have attached a simple dataset (csv.zip) and the DataConnect json in pauload-manual.json to laod it. You need to update the zipFileLocation property to point to the location where you store the csv-ok.zip file on the DataConnect machine.

                                           

                                          Also regaridng the NoRouteToHostException exception that you get, you woudl want to make sure the DataConnect machine can connect to the Analytics Server one using the hostname/ip address indicated in dataconnect.conf for neuron.base.url

                                           

                                          Hope this helps

                                          Kind regards

                                          Christophe

                                            • Re: Thingworx Dataconnect
                                              achaube Explorer

                                              Hello Christophe,

                                                                    

                                                                    Thanks for your reply using your csv file , I tried to upload the dataset but its still giving errors ,like the file location has illegal characters ,i tried various combinations it still didnt workout for me .

                                              Also can you specify that how i am going to upload your files ,do i need to edit the payload.json file then zip both payload.json file and the csv.ok file in another zip file and then try and upload it using uploads/datasets/:datasetname  or both the files separately what could be the queries for doing the same.

                                              Attaching below my dataconnect-rest.log file so that you can see various combination i used to specify the dataconnect.transfer.uri

                                               

                                              Thanks and Regards,

                                              Amar.

                                              • Re: Thingworx Dataconnect
                                                achaube Explorer

                                                Hello Christophe,

                                                 

                                                 

                                                                        I was able to upload your csv files and my files as well when i changed the dataconnect.transfer.uri to file:///tmp/dataconnect .Thanks fro your help.

                                                 

                                                Now i am trying to implement the tractor example into the thingworx ,i have installed thingworx platform  on windows and thingworx analytics on one vm and dataconnector on another vm on the same virtual box.i have errors like could not find the zip file at repository.shareing the log files for the same,

                                                i would like to know what will be my symbolic link command in order to link it with Thingworx repository ,

                                                also i am getting and error like csv files are empty .what can be done for that as well

                                                 

                                                Kind Regards,

                                                Amar

                                                  • Re: Thingworx Dataconnect
                                                    cmorfin Creator

                                                    Hi Amar

                                                     

                                                    I am happy that the initial error is fixed.

                                                    I would advise to open a new thread for your new error while integrating with ThingWorx, as otherwise this thread is going to become difficult to follow.

                                                    We have already addressed multiple issues here which we probably should not have.

                                                    It is important to keep the different issues separated so that this can be reused by somebody else in the community.

                                                     

                                                    Please don't forget to mark one of the reply as answer if it is appropriate ... again this is to help others who would face similar issue in the future.

                                                     

                                                    Thank you

                                                    Kind regards

                                                    Christophe