How to forcibly restart MID Server that went down by SSH?

Sato3
Tera Contributor

Hi, All.

I'm looking for a command that uses SSH to forcibly restart a MID Server that went down for some reason and put it in the Up state.

I'm not very familiar with MID Server, but is it possible to run it using REST API etc.?

 

I hope someone will contribute to me.

Thank you.

1 ACCEPTED SOLUTION

Good to know that You are using - Containerized Mid Server.

So when POD is up means mid-server is also up.

Ur Problem Statement is - How to restart container + Mid server ?

have a look

docker stop <container_id>This command shuts down the containerized MID Server.

docker start <container_id>This command starts a containerized MID Server if it is stopped.

docker restart <container_id>This command shuts down a MID Server and restarts it.

Regards

RP

 

View solution in original post

9 REPLIES 9

doug_schulze
ServiceNow Employee
ServiceNow Employee

If a mid is down then it's down, no APIs to be found, not that there would be. You might consider a local cron job that ensures that the application is up and restart it if not. Or even use a workflow on an event that triggers another Mid to connect to the other that restarts the process.

 

Hi, @doug.schulze 

 

Thank you for the information. I am creating a flow that triggers the MID Server to go down and restarts the MID Server in Flow Designer.

However, there is no command or shell to restart as an execution argument.

Do you know such a command, or shell?

Rahul Priyadars
Tera Sage

Just asking why to trigger from Flow Designer when Service Now Native UI gives option to Restart the Mid Server?

find_real_file.png

In my view this should be driven from OS layer commands and schedule it.

In Windows you can schedule a Task Scheduler to restart Mid Server Service

In Unix Based OS you can use CRON Job to Restart mid server.

  1. Navigate to each MID server folder and run
    ./start.sh

Command may vary on flavors of Unix.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0694126

Regards

RP

 

I'm not very familiar with how to do it, but can you give me a detailed way?

Best regards