How to Update/Restart OmicSoft Server

From Array Suite Wiki

Jump to: navigation, search


Contents

Introduction

These instructions can be followed to stop/update/restart your linux-based OmicSoft Server deployment.

Steps

1. Find directory to mono bin and directory to OmicSoft Server executables

2. Stop current OmicSoft Server

ps –ef | grep mono

You will see

$ ps -ef | grep mono
omicsoft 16503 15137  0 Jul29 pts/3    00:01:23 [path where mono was installed]/bin/mono-sgen ./OmicSoftServer.exe
omicsoft 23306 15137  0 09:56 pts/3    00:00:00 grep mono

find job id of OmicSoft Server then kill jobid, such as

kill 16503 

Double check it is killed and use kill -9 if it is not killed

3. (If Necessary) Update OmicSoft Server using Omicsoft Updater

OmicSoft is constantly improving its software, by adding new features, optimizing performance, and resolving software issues. In most cases, the new software is compatible with previous versions of the client, and you only need to update if a new server-side feature was added that is relevant to your work.

You can check your OmicSoft Server version by typing

cd /directory-to-OmicSoft Server-executables

[path where mono was installed]/bin/mono ./OmicSoftServer.exe --version

OmicSoft Server version is 12.0.0.11

You can compare this server version to the OmicSoft Suite Change Log, which can be accessed through the OmicSoft Studio interface, under Help.

OmicSoft Server PROD

The latest Production (PROD) release (released about once per quarter) can be retrieved by running OmicSoft Updater:

  • Navigate to the OmicSoft Server installation directory
cd /directory-to-OmicSoft Server-executables
  • Download the latest updater version, if it's been a while

wget -c https://resources.omicsoft.com/software_update/OmicSoftServiceUpdater.exe

  • Run the latest OmicSoftUpdater to update OmicSoftServer.exe
[path where mono was installed]/bin/mono ./OmicSoftServiceUpdater.exe

OmicSoft Server DEV

If OmicSoft support has informed you that

  • A new feature that you requested has been implemented
  • An issue that you identified has been resolved

they may instruct you to update to the latest Preview/DEV release:

cd /directory-to-OmicSoft Server-executables
/directory-to-mono-bin/mono ./OmicSoftServiceUpdater.exe --dev

Once updated to DEV, there's no need to run OmicSoftServiceUpdater.exe again until a new PROD release.

Tips.png
Unless OmicSoft Support has instructed you to update to the latest DEV release, we recommend using the main PROD ArrayServer release


[back to top]


4. Check server version

Double check the server version:

cd /directory-to-OmicSoft Server-executables

[path where mono was installed]/bin/mono-sgen ./OmicSoftServer.exe --version

Note: if you are running server on Amazon cloud instance, you should use mono instead of mono-sgen.

5. Start OmicSoft Server

cd /directory-to-OmicSoft Server-executables

[path where mono was installed]/bin/mono-sgen ./OmicSoftServer.exe >> ./run.log &

Note: if you are running server on Amazon cloud instance, you should use mono instead of mono-sgen to run OmicSoftServer.exe.

Unlink the current terminal (you can shut the current computer while the OmicSoft Server job still runs on the server)

disown –ar

check launch status

tail -f ./run.log

Q & A

Q: Cannot kill mono OmicSoft Server process

If user cannot kill the process by

kill jobid

Try

kill -9 jobid

If the job still cannot be killed, it indicates that there is a parent job. Sometimes, there is a mono crash and it triggered gdb and put mono into debug mode in your Linux Server. Find this job by

$ ps -ef | grep jobid

such as

$ ps -ef | grep 16503

Then kill the parent job first then kill the mono job.

Q: Why mono and mono-sgen

Note: You are using mono to run updater and using mono-sgen to run OmicSoftServer.exe. They are using different garbage collection methods. Note: if you are running server on Amazon cloud instance, you should use mono instead of mono-sgen to run OmicSoftServer.exe.

- Please note that for mono-4+, mono has been replaced by mono-sgen and there is no longer a difference between the two:

Mono.png

Q: Can I use screen instead of disown to keep session

Yes, screen is also a good approach to keep the run in an isolated session.

Use screen to start a new screen, inside the screen run the updater and OmicSoft Server without sending to background (without &).

cd /directory-to-OmicSoft Server-executables

[path where mono was installed]/bin/mono ./OmicSoftServiceUpdater.exe

cd /directory-to-OmicSoft Server-executables

[path where mono was installed]/bin/mono-sgen ./OmicSoftServer.exe

CTRL+a, then press d, you can detach the session.

You can re-attach the session by

session -r sessionID

You can find active sessions by

session -list

Q: What is the socket access denied error

If you encounter an access denied error like this:

[11:07 PM] ArrayServer.cfg was used...
[11:07 PM] Loading configuration file...
[11:07 PM] IsAnalyticServer=False.
[11:07 PM] Array Server can not load configuration file. Error message: Access denied
  at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x00000] in <filename unknown>:0
  at System.Net.EndPointListener..ctor (System.Net.IPAddress addr, Int32 port, Boolean secure) [0x00000] in <filename unknown>:0
  at System.Net.EndPointManager.GetEPListener (System.String host, Int32 port, System.Net.HttpListener listener, Boolean secure) [0x00000] in <filename unknown>:0
  at System.Net.EndPointManager.AddPrefixInternal (System.String p, System.Net.HttpListener listener) [0x00000] in <filename unknown>:0
  at System.Net.EndPointManager.AddListener (System.Net.HttpListener listener) [0x00000] in <filename unknown>:0
  at Omicsoft.ArrayServer.ServerPreferences.LoadConfiguration (ILogger logger, System.String configureFile, System.Boolean& defaultTemplateFtsChanged, System.Boolean& sampleTemplateFtsChanged) [0x00000] in <filename unknown>:0

or like this:

Error occurred, message=Array Server can not initialize FTP settings. Message = Access denied. StackTrace=  at 
Omicsoft.Util.Net.Clever.ServerThread.OpenServerSocket () [0x00000] in <filename unknown>:0
  at Omicsoft.Util.Net.Clever.ServerThread.Start () [0x00000] in <filename unknown>:0
  at Omicsoft.Util.Net.Clever.TcpServer.Start () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) Omicsoft.Util.Net.Clever.TcpServer:Start ()
  at Omicsoft.ArrayServer.ServerInit.InitFtpServer () [0x00000] in <filename unknown>:0
  at Omicsoft.ArrayServer.ServerInit.InitCache (ILogger logger, Boolean compact, Boolean reindexSampleFts, Boolean reindexSampleSetFts, Boolean rebuildSampleDatabase, System.String exePath) [0x00000] in <filename unknown>:0
  at Omicsoft.ArrayServer.ServerInit.InitCache (ILogger logger, Boolean compact, Boolean reindexSampleFts, Boolean reindexSampleSetFts, Boolean rebuildSampleDatabase, System.String exePath) [0x00000] in <filename unknown>:0
  at Omicsoft.ArrayServer.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

it is likely caused by security restrictions your host has placed on Port Port2 or Port3 (e.g. AppArmor). The second error usually relates to Port3 while the first error relates to Port and/or Port2. This happens most often when using common ports like 80, 443, or 21. Other than trying different values for these port configurations (remember to configure your firewall), you can usually avoid this error by running as root. For example, the first part of step 5 above could be like:

cd /directory-to-OmicSoft Server-executables
sudo /[path where mono was installed]/bin/mono-sgen ./OmicSoftServer.exe