Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Alexander Ivanov wanted to auto-restart a failing InformixHQ agent on Windows servers (14 FC8). Marcus Haarmann suggested a scheduled check or alarmprogram; Art Kagel suggested a stored procedure using SYSTEM. Ivanov's procedure failed with error -668 (and 'Not the owner'); Andreas Legner asked about /bin/sh. Unresolved.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Alexander Ivanov — source: IBM Community (ConnectedCommunity.org) Informix forum
Hello.
I have informix 14 FC8 on windows servers.
For some reason the agent sometimes fails on my servers and now I find a way to restart it without manually connecting to those machines.
Is there a way by which the TaskSheduler user in InformixHQ can run some kind of script on the servers?
------------------------------
Alexander Ivanov
------------------------------
↪ replying to Alexander Ivanov
Marcus Haarmann — source: IBM Community (ConnectedCommunity.org) Informix forum
Hello,
can you please specify what kind of agent you are trying to recover ?
I suspect this is a backup agent ?
Windows has a builtin scheduler, so you could run a script periodically which controls the presence of the service.
Or you could add a check in alarmprogram, which should be executed whenever some events occur (like logfile full).
(Have not worked with Windows installations, but I assume the concept of alarmprogram is present).
Best,
Marcus Haarmann
↪ replying to Alexander Ivanov
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
You could create a stored procedure that uses the SYSTEM command to execute a shell/batch script that will restart the agent. Then you could execute that script from SQL remotely or schedule a task manager task to do that and have it test for the agent first.
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Marcus Haarmann
Alexander Ivanov — source: IBM Community (ConnectedCommunity.org) Informix forum
I want recover InformixHQ agent
------------------------------
Alexander Ivanov
------------------------------
↪ replying to Art Kagel
Alexander Ivanov — source: IBM Community (ConnectedCommunity.org) Informix forum
Thanks for idea.
I tried to create a procedure like
CREATE PROCEDURE run_HQagent() SYSTEM 'echo 1>>1.txt'; END PROCEDURE;Procudure created but when I EXECUTE PROCEDURE run_HQagent();
I have an error "
-668: The system command cannot be executed or it exited with a non-zero status."My user informix is now registered on the server and I am connecting to InformixHQ with that user.
------------------------------
Alexander Ivanov
------------------------------
↪ replying to Alexander Ivanov
Andreas Legner — source: IBM Community (ConnectedCommunity.org) Informix forum
I'd first suggest to change
'echo 1>>1.txt'
into
'echo 1 >>1.txt'
if you really want to see "1" in that file.
But that's not your main problem, I guess.
Does your system have /bin/sh ? If not, can you - temporarily - provide one, simply as a symbolic link to /bin/bash or /bin/ksh, just to prove this is what's behind this -668?
------------------------------
Andreas Legner
------------------------------
↪ replying to Andreas Legner
Alexander Ivanov — source: IBM Community (ConnectedCommunity.org) Informix forum
I have a windows host for Infomix and according to
Executing the SYSTEM statement on Windows - IBM Documentation
I can use the system command.
What I don't quite understand is
"The database server must have a password and login username in order to execute a command as that user."
I am logged into the server with my local informix user, the Informix server service is running under this user.
When I try execute the procedure with the SYSTEM command from dbaccess I have the same error
"-668: The system command could not be executed or terminated with a non-zero status."
And additionally the error "1: Not the owner"
------------------------------
Alexander Ivanov
------------------------------
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.