a way to check that irods is alive

147 views
Skip to first unread message

Romain GUINOT

unread,
Apr 28, 2009, 9:15:53 AM4/28/09
to iROD-Chat
Hi,

For some use cases, i'd like to be able to check if a particular
remote irods server hosting some resources is alive before sending
stuff to it.
I was wondering if there is a microservice that already does that, or
maybe i can call a script that would send something via telnet and get
a reply (such as irods server version).

I encountered some odd behavior while experimenting with telnet.

Initially , sending bogus data such as : echo "fake" | telnet
localhost 1247 would return various information about the server.
sending the same data multiple times will log this kind of error and
crash the irodsServer process :(

Apr 28 15:11:35 pid:12993 ERROR: readMsgHeader: header length
1717660517 out of range
Apr 28 15:11:35 pid:12993 NOTICE: readStartupPack: readMsgHeader
error. status = -4000 status = -4000 SYS_HEADER_READ_LEN_ERR
Apr 28 15:11:35 pid:12993 NOTICE: readStartupPack error from
127.0.0.1, status = -4000

It seems there's a Version_PI that could be what i need. Maybe there's
a particular "command" i can send that will return it as output
without crashing the server ? Or maybe a "heartbeat" microservice
already exists ?

Many thanks,
Romain.

Jean-Yves Nief

unread,
Apr 28, 2009, 9:26:07 AM4/28/09
to iROD...@googlegroups.com
hello,

I am finishing the work on the irods monitoring and load
balancing system, it will be a way to check whether a resource is
reachable or not.
in the meantime, you can use msiExecCmd in order to do a "hello world"
or any kind of script that you have installed in server/bin/cmd:
msiExecCmd(hello,null,yourhost.blabla.blabla,null,null,*OUT)
"hello" is already installed.
it is better than a telnet as you can check that this remote server is
able to do some basic functions.
or you put and rm a file which is even better (the server can be alive
but the filesystem hosting the physical resource may have some problems).
here we are also using Nagios to check if the various servers and irods
instances are responding properly, but it requires some installation.
cheers,
JY

Romain GUINOT

unread,
Apr 28, 2009, 11:21:49 AM4/28/09
to iROD-Chat
Hi Jean Yves,
thanks for answering.

I think using msiExecCmd will throw an error if the host is
unavailable, which would make the rule this call is part of fail and
terminate. this is actually what i am trying to avoid by using an
external call to check if the remote server is alive prior to invoking
remote operations on it. Do you see a solution that would allow me to
check the status without "trying" to execute a remote op ? the rules
do not have a try/catch logic, and the recovery part is cumbersome
especially if we are inside a delayExec block.

Many thanks,
Romain.

Jean-Yves Nief

unread,
Apr 29, 2009, 6:09:03 AM4/29/09
to iROD...@googlegroups.com
Romain GUINOT wrote:
> Hi Jean Yves,
> thanks for answering.
>
> I think using msiExecCmd will throw an error if the host is
> unavailable,
yes
> which would make the rule this call is part of fail and
> terminate.
indeed. However if you want to include this check within a rule, if it
fails you will end up with the same issue.

Romain GUINOT

unread,
Apr 29, 2009, 1:31:08 PM4/29/09
to iROD-Chat
Hi Jean Yves.
I ended up patching imiscsvrinfo to allow to specify a hostname (-H)
on the command line that would override the one specified
in .irodsEnv. the rest of the env is still read from rodsEnv.
The patch is available here :
http://people.portaildulibre.fr/~rguinot/irods201-patches/12-imiscsvrinfoHostExtension.patch

I can now call a script from the rule that will call imiscsvrinfo and
give back a status for the server hosting the resource such as DEAD or
ALIVE.
With that information i can take the appropriate action from the rule
with an ifExec block. It's a bit clunky but it fits the need ...

Regards,
Romain

Tevfik Kosar

unread,
May 10, 2009, 4:52:48 PM5/10/09
to iROD-Chat
Hi Jean Yves,

What is the planned timeline for this irods monitoring and load
balancing system?

Thanks,
Tevfik

Jean-Yves Nief

unread,
May 12, 2009, 8:52:14 AM5/12/09
to iROD...@googlegroups.com
hello Tevfik,

Tevfik Kosar wrote:
> Hi Jean Yves,
>
> What is the planned timeline for this irods monitoring and load
> balancing system?
>
the first version will be available in the next release I think.
some information is available in the wiki:
https://www.irods.org/index.php/Resource_Monitoring_System
I will update the information soon.
cheers,
JY
Reply all
Reply to author
Forward
0 new messages