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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

connection server start/stop

VK_10079185
8-Gravel

connection server start/stop

Hi,

As per the connection server documentation, it's asking to set few environment variables from command prompt and run the connection server. This is working but when I close the cmd window, server also getting stopped. How to keep these variables in normal environment variables and keep the server up and running all the time? Also, what are the options available to start/stop the connection server? I am using version 9.2 of connection server.

7 REPLIES 7

Hello @K_10079185,

When you define an environment variable in a command shell, that value is present only as long as the command shell is active. Along the same lines if you start a service from the command shell it is terminated when the shell exits. 

 

If you define the environment variables as system environment and if you start the server as a service then it will continue.

 

Both of these actions can be done in a Linux or Windows environment. 

Hi @PEHOWE,

Thanks for your response. That's where the confusion is as we need to add array of Key value pairs to one environment variable. How to add them and how to run connection server from services? Do we have any service for that already available? Can you please give some example for this as there might be lot of scenarios where connection servers are running as expected but I don't see proper steps to make it happen on my side.

Hello @VK_10079185

Can you provide a specific detail or error you are getting returned.

I can able to make it work by setting the environment variable CONNECTION_SERVER_OPTS. But still couldn't figure out how to keep the connection server running all the time.

 

Do we have any service available which will run in the background instead of running it from the command prompt? Why there is no windows service provided for this or am I missing something?

Hi @VK_10079185 ,

The connection server releases do not contain pre-configured services, neither in our documentation we do not have examples for this.

However, creating a service out of any executable, at least in Windows is relatively easy if you search for this on internet.

https://stackoverflow.com/questions/3582108/create-windows-service-from-executable

If you would like that the connection server to contain services for Windows/Linux etc, please raise this enhancement request in the ThingWorx Ideas side of the forum.

 

Thanks for the response @VladimirRosu but how the connection servers will be configured to run all the time in production environment generally? By creating the custom services?

Hi @VK_10079185 

The connection server is just a Java application, and it can be configured to run all the time in the same way any other application can run.

Services is one way, but in Linux for example there are other ways. As an example, one of my customers is manually starting the program and sending it to background without using a service.

Services have the advantage you can set advanced policies around retry etc. That depends on the needs of the customer.

Running programs in background is very well known and documented for any Operating System, you just need to google it - as I did when I shared the link above.

 

 

Announcements


Top Tags