11:39, EEST
April 17, 2015
Hi,
I use the the simulation server to test my client implementations. To execute those test automatically, e.g. during the build process, I need an instance of the Demo Server that is “always” available. Therefor it would be great if I could run the demo server in background as a Windows service. So far I was not able to do this. A “sc create” will create the service but it will not start properly.
Any idea?
Regards,
Thomas
11:51, EEST
April 3, 2012
Interesting idea. You could also just keep the server window open. But anyway, for running any program as a service on windows, http://www.nssm.cc/ seems to just work. Not tested with simulation server, but might be something you want to try.
– Bjarne
11:59, EEST
April 17, 2015
15:31, EET
March 15, 2019
Thomas, Bjarne,
I know this topic has not been updated since more than 5 years now but still giving it a shot :). I also configured the simulation server as a Windows Service so to keep it up and running all the time and automatically restart upon VM reboot, however when doing so the server loads the default simulators which is not what we want as we always fine tune the existing values to fit project purposes. Behavior is also the same even after configuring the local “simulation.xml” file accordingly…
Is there a way to start the server as Windows service while loading custom simulators configuration?
Thanks.
David
16:58, EET
April 3, 2012
Hi,
The application does store that simulation.xml file in user’s “home directory”/.prosys/SimulationServer. Do you start the service as the correct user? Additionally note that the application does write the configuration file to the disk when it shuts down, therefore if you edit it manually you must first shut down it.
13:35, EEST
March 15, 2019
Hi Bjarne/all,
I already verified that the configuration file is the latest up-to-date one containing the custom simulations, but for some reason it does not get loaded @Server startup. Worse, I discovered that the server was not properly started on a new machine where we recently installed it, even though the associated NT service (setup with nssm and LOCAL SYSTEM login user) shows as RUNNING. Now we are stuck with keeping the server running in a manual way and per-user basis.
Any idea how to resolve this issue moving forward? Seems Thomas has not been connected for a while so any experience from anyone else on this?
Thanks in advance,
David
11:43, EEST
April 3, 2012
Hi,
The application is not exactly designed to be run as a service in the first place. It will show as (service) “Running” if it does not fail as in exiting the process. The UI would display the problem, but the application itself does not exit (because it needs to show the error in the UI). Techically the UI still “starts”, it is just not visible. This application does not have anything special support for services (e.g. compared to our ModbusServer).
Therefore could you please try first running the application as normal (without service), check that it works (and close it to save settings) and then configure the service to use the exact user that you used to run it non-service. The user must have enough permissions to make directory “.prosys” in their own home directory and read/write files and folders to that folder (if it starts normally “non-service” this should not be a problem). I’m not exactly sure how that would work with LOCAL SYSTEM account. I recommend testing e.g. with your normal user first.
Additionally there can be only one instance of the application running and the ports needed (by default 53530 and 53443) must not be used by other applications (the UI would report these problems in the status tab).
Most Users Ever Online: 1919
Currently Online:
8 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 735
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1