Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Run simulation server as (windows) service
July 21, 2015
11:39, EEST
Avatar
Thomas W.
Member
Members
Forum Posts: 7
Member Since:
April 17, 2015
sp_UserOfflineSmall Offline

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

July 21, 2015
11:51, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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

July 21, 2015
11:59, EEST
Avatar
Thomas W.
Member
Members
Forum Posts: 7
Member Since:
April 17, 2015
sp_UserOfflineSmall Offline

Hi Bjarne,

Thank you for the nssm tip. With nssm I was able to install it as a windows service and run it.

Regards,
Thomas

March 28, 2019
15:31, EET
Avatar
Dave62
Member
Members
Forum Posts: 4
Member Since:
March 15, 2019
sp_UserOfflineSmall Offline

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

March 28, 2019
16:58, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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.

April 15, 2019
13:35, EEST
Avatar
Dave62
Member
Members
Forum Posts: 4
Member Since:
March 15, 2019
sp_UserOfflineSmall Offline

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

April 16, 2019
11:43, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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).

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
23 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 681

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1