Article
· 9 hr ago 2m read

Gracefully Shutting Down IRIS Without Terminal Access: *nix Flavor

I found myself in the not-so-comfortable situation of working with a Linux system on which someone had accidentally disabled user access to the Linux shell. HealthConnect was running, servicing hundreds of interfaces. To resolve the access issue, though, we needed to bring the host down for the application of a fix.

Without the shell, the iris command is not available to control the instance, so we were faced with the potential of shutting down the server ungracefully. We wanted to avoid that if possible ...

The ^SHUTDOWN routine was historically an option for shutting down Cache, but you need a terminal session to execute it (We'll be talking more about what qualifies as a terminal session in a minute). But ^SHUTDOWN is now deprecated, and when you execute it, you get the message "Please use the 'iris stop' procedure to shut down the system."

So cross that off the list ... and replace it with INTNOSHUT^SHUTDOWN. Yes, running this command will gracefully halt IRIS. And yes, you need an IRIS command shell to execute it. So where do you get an IRIS command shell for the system you're locked out of, you ask?

In the not-long-for-this-world IRIS Studio, of course! The Output window allows you to execute IRIS commands, and this won't be a surprise to many. It will certainly allow you to run D INTNOSHUT^SHUTDOWN in the output window (after switching to the %SYS namespace). However, if you do exactly that IRIS will most likely start to shut down and then hang, since Studio keeps a session open. It may never completely shut down, and you would have no way to force it down other than to halt the operating system.

That said, you can achieve a full shutdown by using the command JOB INTNOSHUT^SHUTDOWN, then immediately exiting Studio. IRIS will (more likely than not) shutdown gracefully and you can feel better about doing things the "right" way ... even if it feels wrong.

As far as regaining user access to the Linux shell is concerned, that's a topic for another forum. But now that IRIS is safely shut down, the issue with access can be resolved (some disassembly probably required).

Discussion (5)4
Log in or sign up to continue

An option that can be performed without Studio, also nice! (You do need VS Code though)

And @Robert Cemper's solution can be performed exclusively via the Management Console, which is also a great alternative.

I'm guessing that the WebSocket Terminal would also provide IRIS command shell access without an ssh session but I haven't played with that yet.