cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Unable to start connection-server-7.2 or azure-iot-hub-adapter-1.0.

mvolanti
7-Bedrock

Unable to start connection-server-7.2 or azure-iot-hub-adapter-1.0.

I'm traing to install connection-server7.2 on Thingworx 7.2 and I have the following issue:

I followed all of documentation:

-On Windows 10, I moved the subdirectories to a directory on the system. Files reside in C:\connection-server-<version>\.

-Edited cxserver.conf with app key(Thingworx), my port :8080 , no ssl, and platforms = "ws://localhost:8080/Thingworx/WS".

Berfore starting I set the CONNECTION_SERVER_OPTS enviroment variable like this:

set CONNECTION_SERVER_OPTS="-Dconfig.file=C:\connection-server-<version>\conf\cxserver.conf -Dlogback.configurationFile=C:\connection-server-<version>\conf\logback.xml"



​​When I'm starting the Connection Server, should start normally, but I have the following error:

Error in custom provider, com.typesafe.config.ConfigException$IO: C:\connection-server-7.2.0.2095\conf\cxserver.conf -Dlogback.configurationFile=C:\connection-server-7.2.0.2095\conf\logback.xml: java.io.FileNotFoundException: C:\connection-server-7.2.0.2095\conf\cxserver.conf -Dlogback.configurationFile=C:\connection-server-7.2.0.2095\conf\logback.xml (The filename, directory name, or volume label syntax is incorrect)



​I have the same problem with the azure-IoT-hub-connector.

Thaks for your support.

10 REPLIES 10
Aanjan
9-Granite
(To:mvolanti)

Maurizio, can you try moving it to a different directory? Your environment variables seems to be correct too (the documentation is missing a space, I believe).

mvolanti
7-Bedrock
(To:Aanjan)

I noticed the missing space cxserver.conf -Dlogback.configurationFile and fixed it.

I tried in another directory but doesn't work yet.

N.B:

-I'm using the administrator prompt.

-I have the java 1.8.o u74 that is mentioned in the documentation.

I tried on windows10 and on Windows Server 2012 R2.

Aanjan
9-Granite
(To:mvolanti)

Can you directly try adding it to the Environment variables? Create a new system variable called 'CONNECTION_SERVER_OPTS' and add your value there.

mvolanti
7-Bedrock
(To:Aanjan)

Dosen't work yet.

Tell me if is it correct:

issue.jpg

mvolanti
7-Bedrock
(To:Aanjan)

As you can see in the screenshot i tried also to rename the directory without number and all special character: -

Aanjan
9-Granite
(To:mvolanti)

You don't need the double quotes in there. Here's my config -

Variable name:  CONNECTION_SERVER_OPTS

Variable value: -Dconfig.file=C:\connection-server-7.2\conf\cxserver.conf -Dlogback.configurationFile=C:\connection-server-7.2\conf\logback.xml

Please do restart your system after changing them for it to be taken into effect.

mvolanti
7-Bedrock
(To:Aanjan)

Ok. the The filename, directory name, or volume label syntax is incorrect ​disapeard.

Now I have this issue:

When I start the .bat, nothing happens.

So, I opened with code the .bat file and commented the first line:  @rem if "%DEBUG%" == "" @echo off

I have this:

C:\connection\bin>connection-server.bat

C:\connection\bin>if "Windows_NT" == "Windows_NT" setlocal

C:\connection\bin>set DEFAULT_JVM_OPTS=

C:\connection\bin>set DIRNAME=C:\connection\bin\

C:\connection\bin>if "C:\connection\bin\" == "" set DIRNAME=.

C:\connection\bin>set APP_BASE_NAME=connection-server

C:\connection\bin>set APP_HOME=..

C:\connection\bin>if defined JAVA_HOME goto findJavaFromJavaHome

C:\connection\bin>set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_74

C:\connection\bin>set JAVA_EXE=C:\Program Files\Java\jdk1.8.0_74/bin/java.exe

C:\connection\bin>if exist "C:\Program Files\Java\jdk1.8.0_74/bin/java.exe" goto init

C:\connection\bin>if not "Windows_NT" == "Windows_NT" goto win9xME_args

C:\connection\bin>if "@eval[2+2]" == "4" goto 4NT_args

C:\connection\bin>set CMD_LINE_ARGS=

C:\connection\bin>set _SKIP=2

C:\connection\bin>if "x" == "x" goto execute

C:\connection\bin>set CLASSPATH=..\lib\always-on-7.1.2062.jar;..\lib\thingworx-common-7.1.1-b1.jar;..\lib\common-java8-1.0.44.jar;..\lib\cxserver-core-1.1.10155.jar;..\lib\cxserver-undertow-1.1.10155.jar;..\lib\protocol-services-1.1.10155.jar;..\lib\fabric-api-1.0.283.jar;..\lib\tw-sdk-core-1.1.0.4.jar;..\lib\tw-sdk-internal-1.0.169.jar;..\lib\metrics-core-3.1.2.jar;..\lib\undertow-core-1.2.11.Final.jar;..\lib\javax.inject-1.jar;..\lib\xnio-api-3.3.1.Final.jar;..\lib\slf4j-api-1.7.13.jar;..\lib\annotations-3.0.1u2.jar;..\lib\javassist-3.20.0-GA.jar;..\lib\logback-classic-1.1.2.jar;..\lib\guava-18.0.jar;..\lib\guice-4.0.jar;..\lib\shepard-api-9.0.199.jar;..\lib\shepard-consul-9.0.199.jar;..\lib\common-aws-1.0.44.jar;..\lib\common-slf4j-1.0.44.jar;..\lib\fabric-hazelcast-1.0.283.jar;..\lib\fabric-local-1.0.283.jar;..\lib\fabric-netty-1.0.283.jar;..\lib\router-1.0.283.jar;..\lib\tw-sdk-netty-websockets-1.1.0.4.jar;..\lib\tw-sdk-kafka-1.0.169.jar;..\lib\config-1.3.0.jar;..\lib\metrics-graphite-3.1.2.jar;..\lib\metrics-jvm-3.1.2.jar;..\lib\joda-time-2.9.1.jar;..\lib\kafka-clients-1.0.41.jar;..\lib\commons-lang3-3.4.jar;..\lib\jboss-logging-3.1.4.GA.jar;..\lib\xnio-nio-3.3.1.Final.jar;..\lib\jcip-annotations-1.0.jar;..\lib\jsr305-3.0.1.jar;..\lib\logback-core-1.1.2.jar;..\lib\aopalliance-1.0.jar;..\lib\jackson-core-2.6.1.jar;..\lib\jackson-databind-2.6.1.jar;..\lib\jackson-annotations-2.6.1.jar;..\lib\hazelcast-3.5.1.jar;..\lib\netty-all-4.0.33.Final.jar;..\lib\scala-library-2.10.6.jar;..\lib\snappy-java-1.1.1.7.jar;..\lib\lz4-1.2.0.jar

C:\connection\bin>"C:\Program Files\Java\jdk1.8.0_74/bin/java.exe"   -Dconfig.file=C:\connection\conf\cxserver.conf -Dlogback.configurationFile=C:\connection\conf\logback.xml  -classpath "..\lib\always-on-7.1.2062.jar;..\lib\thingworx-common-7.1.1-b1.jar;..\lib\common-java8-1.0.44.jar;..\lib\cxserver-core-1.1.10155.jar;..\lib\cxserver-undertow-1.1.10155.jar;..\lib\protocol-services-1.1.10155.jar;..\lib\fabric-api-1.0.283.jar;..\lib\tw-sdk-core-1.1.0.4.jar;..\lib\tw-sdk-internal-1.0.169.jar;..\lib\metrics-core-3.1.2.jar;..\lib\undertow-core-1.2.11.Final.jar;..\lib\javax.inject-1.jar;..\lib\xnio-api-3.3.1.Final.jar;..\lib\slf4j-api-1.7.13.jar;..\lib\annotations-3.0.1u2.jar;..\lib\javassist-3.20.0-GA.jar;..\lib\logback-classic-1.1.2.jar;..\lib\guava-18.0.jar;..\lib\guice-4.0.jar;..\lib\shepard-api-9.0.199.jar;..\lib\shepard-consul-9.0.199.jar;..\lib\common-aws-1.0.44.jar;..\lib\common-slf4j-1.0.44.jar;..\lib\fabric-hazelcast-1.0.283.jar;..\lib\fabric-local-1.0.283.jar;..\lib\fabric-netty-1.0.283.jar;..\lib\router-1.0.283.jar;..\lib\tw-sdk-netty-websockets-1.1.0.4.jar;..\lib\tw-sdk-kafka-1.0.169.jar;..\lib\config-1.3.0.jar;..\lib\metrics-graphite-3.1.2.jar;..\lib\metrics-jvm-3.1.2.jar;..\lib\joda-time-2.9.1.jar;..\lib\kafka-clients-1.0.41.jar;..\lib\commons-lang3-3.4.jar;..\lib\jboss-logging-3.1.4.GA.jar;..\lib\xnio-nio-3.3.1.Final.jar;..\lib\jcip-annotations-1.0.jar;..\lib\jsr305-3.0.1.jar;..\lib\logback-core-1.1.2.jar;..\lib\aopalliance-1.0.jar;..\lib\jackson-core-2.6.1.jar;..\lib\jackson-databind-2.6.1.jar;..\lib\jackson-annotations-2.6.1.jar;..\lib\hazelcast-3.5.1.jar;..\lib\netty-all-4.0.33.Final.jar;..\lib\scala-library-2.10.6.jar;..\lib\snappy-java-1.1.1.7.jar;..\lib\lz4-1.2.0.jar" com.thingworx.connectionserver.ConnectionServer

C:\connection\bin>if "-1" == "0" goto mainEnd

C:\connection\bin>rem Set variable CONNECTION_SERVER_EXIT_CONSOLE if you need the _script_ return code instead of

C:\connection\bin>rem the _cmd.exe /c_ return code!

C:\connection\bin>if not "" == "" exit 1

C:\connection\bin>exit /b 1

I created a .bat file with this:

"C:\Program Files\Java\jdk1.8.0_74/bin/java.exe"   -Dconfig.file=C:\connection\conf\cxserver.conf -Dlogback.configurationFile=C:\connection\conf\logback.xml  -classpath "..\lib\always-on-7.1.2062.jar;..\lib\thingworx-common-7.1.1-b1.jar;..\lib\common-java8-1.0.44.jar;..\lib\cxserver-core-1.1.10155.jar;..\lib\cxserver-undertow-1.1.10155.jar;..\lib\protocol-services-1.1.10155.jar;..\lib\fabric-api-1.0.283.jar;..\lib\tw-sdk-core-1.1.0.4.jar;..\lib\tw-sdk-internal-1.0.169.jar;..\lib\metrics-core-3.1.2.jar;..\lib\undertow-core-1.2.11.Final.jar;..\lib\javax.inject-1.jar;..\lib\xnio-api-3.3.1.Final.jar;..\lib\slf4j-api-1.7.13.jar;..\lib\annotations-3.0.1u2.jar;..\lib\javassist-3.20.0-GA.jar;..\lib\logback-classic-1.1.2.jar;..\lib\guava-18.0.jar;..\lib\guice-4.0.jar;..\lib\shepard-api-9.0.199.jar;..\lib\shepard-consul-9.0.199.jar;..\lib\common-aws-1.0.44.jar;..\lib\common-slf4j-1.0.44.jar;..\lib\fabric-hazelcast-1.0.283.jar;..\lib\fabric-local-1.0.283.jar;..\lib\fabric-netty-1.0.283.jar;..\lib\router-1.0.283.jar;..\lib\tw-sdk-netty-websockets-1.1.0.4.jar;..\lib\tw-sdk-kafka-1.0.169.jar;..\lib\config-1.3.0.jar;..\lib\metrics-graphite-3.1.2.jar;..\lib\metrics-jvm-3.1.2.jar;..\lib\joda-time-2.9.1.jar;..\lib\kafka-clients-1.0.41.jar;..\lib\commons-lang3-3.4.jar;..\lib\jboss-logging-3.1.4.GA.jar;..\lib\xnio-nio-3.3.1.Final.jar;..\lib\jcip-annotations-1.0.jar;..\lib\jsr305-3.0.1.jar;..\lib\logback-core-1.1.2.jar;..\lib\aopalliance-1.0.jar;..\lib\jackson-core-2.6.1.jar;..\lib\jackson-databind-2.6.1.jar;..\lib\jackson-annotations-2.6.1.jar;..\lib\hazelcast-3.5.1.jar;..\lib\netty-all-4.0.33.Final.jar;..\lib\scala-library-2.10.6.jar;..\lib\snappy-java-1.1.1.7.jar;..\lib\lz4-1.2.0.jar" com.thingworx.connectionserver.ConnectionServer

The result is:

............

..\lib\hazelcast-3.5.1.jar;..\lib\netty-all-4.0.33.Final.jar;..\lib\scala-library-2.10.6.jar;..\lib\snappy-java-1.1.1.7.jar;..\lib\lz4-1.2.0.jar" com.thingworx.connectionserver.ConnectionServer

Error: Could not find or load main class com.thingworx.connectionserver.ConnectionServer

The connection Server doesn't work yet.


Thanks

Hi,

i also have the problem that i can't start the connectionServer (7.2 and 7.1) on Windows 7

I followed the documentation.

i set the Environment Variable: "set CONNECTION_SERVER_OPTS="-Dconfig.file=D:\connection-server\conf\cxserver.conf -Dlogback.configurationFile=D:\connection-server\conf\logback.xml"

and start the batch file from root dir of Volume D:

"connection-server\binconnection-server.bat"

after that all i get is an empty line:

ConnectionServer.PNG

(i tried both ways connectionserver with Version and without)

java version is "1.8.0_101"

is it helpfull to post any verbose output of the java execute?

Hi!

I found the solution!

With the connection server you must to put a different port between connection-server and thingworx.

My settings:

-Thingworx on 8080.

-Conf (connection server)

cx-server {

// Uncomment to define a custom port for the connection server.

// Default is 8080.

protocol {

  port = 8081

  }

Then run cmd as administator and set enviorments variables without double quotes (NB put your right directory)


set CONNECTION_SERVER_OPTS=-Dconfig.file=C:\connection-server-<version>\conf\cxserver.conf -Dlogback.configurationFile=C:\connection-server-<version>\conf\logback.xml

Go in the bin (in the promt ) directory and start the connection-server.bat

Hi that was my sucessfull answer.

i found serveral ssl problems (in the now generated logfile) and get the server up and running also on default port!

Top Tags