4 Replies Latest reply on Jan 5, 2017 3:47 PM by polinao RSS
    bjadhav Newbie

    Error while connecting EMS to thingworx

    getting error SDK: Error intializing socket connection.  Err = -1 while connecting EMS to thingworx

      • Re: Error while connecting EMS to thingworx
        supandey Collaborator

        Hi balkrishna, have you re-checked the configuration for the EMS? Are you configuring for the first time? Could you share which for which OS are you configuring the EMS and ThingWorx server version. How is the encryption setup for the EMS and on the ThingWorx server?

          • Re: Error while connecting EMS to thingworx
            bjadhav Newbie

            Hi sushant,i'm configuring EMS for windows and thingworx 7.I have set encryption as none.

              • Re: Error while connecting EMS to thingworx
                jamesm Creator

                Can you send your whole EMS config file (you can retract the appKey, if you'd like)?

                 

                Here is a copy of a working EMS config with file transfer and tunneling to a localhost instance with no encryption and an auto bind to a thing named StandardRemoteThing, the appKey, host, and potentially the virtual directory would need to be updated:

                 

                {
                  "ws_servers": [{
                  "host": "localhost",
                  "port": 80
                  }],
                  "appKey": "92d68c74-4bf3-42c8-ab7c-0cb602d11873",
                  "ws_connection": {
                  "encryption": "none",
                  "verbose": true
                  },
                  "logger": {
                  "level": "TRACE",
                  "publish_directory":"/_tw_logs/",
                  "publish_level":"TRACE",
                  "max_file_storage":2000000,
                  "auto_flush":true
                  },
                  "certificates": {
                  "validate": false,
                  "allow_self_signed": true
                  },
                  "auto_bind": [{
                  "name": "StandardRemoteThing",
                  "gateway": false
                  }],
                  "tunnel": {
                  "buffer_size": 8192,
                  "read_timeout": 10,
                  "idle_timeout": 300000,
                  "max_concurrent": 4
                  },
                  "file": {
                  "buffer_size": 128000,
                  "max_file_size": 8000000000,
                  "virtual_dirs": [
                  {"tw": "c:\\filestest"}
                  ]
                  }
                }
                
            • Re: Error while connecting EMS to thingworx
              polinao Ninja

              Hi,

               

              You may validate your json at JSONLint - The JSON Validator.

              Have you renamed your config file to config.json? What is the port number you are using? If no proxy is set up, you should be using the same as in when accessing the composer through the browser (e.g, 80, 8080, .. )