Server side scripts not running
list Martin Ward
Hi all,
I am clearly missing something basic here but I can't figure out what it
is and I can't find anything that looks like my problem in the archives.
I have written a script that should be run on the Xymon server. It does
an LDAP update on my LDAP master server, waits ten seconds then checks
that this value has been replicated to all the other LDAP servers.
The script is /opt/hobbit/server/ext/ldap_check_replication and when run
as the Hobbit user like so:
$ server/bin/bbcmd server/ext/ldap_check_replication
it runs fine and the web pages are updated.
The problem is in getting it to be run by the Xymon server. I created an
entry in the hobbitlaunch.cfg file as that seemed to be the right place
to put it, I created the following entry:
----
# "replicate_ldap" runs the in-house LDAP replication checks.
[replicate_ldap]
ENVFILE /opt/hobbit/client/etc/hobbitclient.cfg
CMD /opt/hobbit/server/ext/ldap_check_replication
LOGFILE $BBSERVERLOGS/replicate_ldap.log
INTERVAL 5m
----
But it refuses to run and nothing is mentioned in any log files
anywhere!
I would appreciate your input.
|\/|artin
--
Martin W. Ward
Manager, Technical Assistance
COLT
Unit 12, Powergate Business Park
Volt Avenue, Park Royal, London
NW10 6PW, United Kingdom
Tel: + 44 (0)20 7863 5218 Internal: 8 441 5218
Fax: + 44 (0)20 7863 5610
Email: user-2d33a6eb6a05@xymon.invalid
www.colt.net
Data | Voice | Managed Services
*************************************************************************************
The message is intended for the named addressee only and may not be disclosed to or used by anyone else, nor may it be copied in any way.
The contents of this message and its attachments are confidential and may also be subject to legal privilege. If you are not the named addressee and/or have received this message in error, please advise us by e-mailing user-61c7f445d564@xymon.invalid and delete the message and any attachments without retaining any copies.
Internet communications are not secure and COLT does not accept responsibility for this message, its contents nor responsibility for any viruses.
No contracts can be created or varied on behalf of COLT Telecommunications, its subsidiaries or affiliates ("COLT") and any other party by email Communications unless expressly agreed in writing with such other party.
Please note that incoming emails will be automatically scanned to eliminate potential viruses and unsolicited promotional emails. For more information refer to www.colt.net or contact us on +44(0)20 7390 3900.
list Martin Ward
Sorry, please ignore this. I made a stupid, basic error. Whilst trying to fix a previous problem I changed the name of the column from ldap_replication to replicate_ldap in the bb-hosts file... and didn't change it in the script itself. The script ran fine, it just didn't find any servers to check... |\/|artin
▸
From: Ward, Martin [mailto:user-2d33a6eb6a05@xymon.invalid]
Sent: 12 November 2009 09:57
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Server side scripts not running
Hi all,
I am clearly missing something basic here but I can't figure out what it
is and I can't find anything that looks like my problem in the archives.
I have written a script that should be run on the Xymon server. It does
an LDAP update on my LDAP master server, waits ten seconds then checks
that this value has been replicated to all the other LDAP servers.
The script is /opt/hobbit/server/ext/ldap_check_replication and when run
as the Hobbit user like so:
$ server/bin/bbcmd server/ext/ldap_check_replication
it runs fine and the web pages are updated.
The problem is in getting it to be run by the Xymon server. I created an
entry in the hobbitlaunch.cfg file as that seemed to be the right place
to put it, I created the following entry:
----
# "replicate_ldap" runs the in-house LDAP replication checks.
[replicate_ldap]
ENVFILE /opt/hobbit/client/etc/hobbitclient.cfg
CMD /opt/hobbit/server/ext/ldap_check_replication
LOGFILE $BBSERVERLOGS/replicate_ldap.log
INTERVAL 5m
----
But it refuses to run and nothing is mentioned in any log files
anywhere!
I would appreciate your input.
|\/|artin
--
Martin W. Ward
Manager, Technical Assistance
COLT
Unit 12, Powergate Business Park
Volt Avenue, Park Royal, London
NW10 6PW, United Kingdom
Tel: + 44 (0)20 7863 5218 Internal: 8 441 5218
Fax: + 44 (0)20 7863 5610
Email: user-2d33a6eb6a05@xymon.invalid
www.colt.net
Data | Voice | Managed Services
************************************************************************
*************
The message is intended for the named addressee only and may not be
disclosed to or used by anyone else, nor may it be copied in any way.
The contents of this message and its attachments are confidential and
may also be subject to legal privilege. If you are not the named
addressee and/or have received this message in error, please advise us
by e-mailing user-61c7f445d564@xymon.invalid and delete the message and any
attachments without retaining any copies.
Internet communications are not secure and COLT does not accept
responsibility for this message, its contents nor responsibility for any
viruses.
No contracts can be created or varied on behalf of COLT
Telecommunications, its subsidiaries or affiliates ("COLT") and any
other party by email Communications unless expressly agreed in writing
with such other party.
Please note that incoming emails will be automatically scanned to
eliminate potential viruses and unsolicited promotional emails. For more
information refer to www.colt.net or contact us on +44(0)20 7390 3900.
*************************************************************************************
The message is intended for the named addressee only and may not be disclosed to or used by anyone else, nor may it be copied in any way.
The contents of this message and its attachments are confidential and may also be subject to legal privilege. If you are not the named addressee and/or have received this message in error, please advise us by e-mailing user-61c7f445d564@xymon.invalid and delete the message and any attachments without retaining any copies.
Internet communications are not secure and COLT does not accept responsibility for this message, its contents nor responsibility for any viruses.
No contracts can be created or varied on behalf of COLT Telecommunications, its subsidiaries or affiliates ("COLT") and any other party by email Communications unless expressly agreed in writing with such other party.
Please note that incoming emails will be automatically scanned to eliminate potential viruses and unsolicited promotional emails. For more information refer to www.colt.net or contact us on +44(0)20 7390 3900.
list Martin Ward
Nope, I take back my last take-back. I am still having a problem. The server-side script echos a few lines to stdout and these are not appearing in the log file $BBSERVERLOGS/replicate_ldap.log . I cannot see any proof that the script is running. Any ideas?
▸
|\/|artin
From: Ward, Martin [mailto:user-2d33a6eb6a05@xymon.invalid]
Sent: 12 November 2009 09:57
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Server side scripts not running
Hi all,
I am clearly missing something basic here but I can't figure out what it
is and I can't find anything that looks like my problem in the archives.
I have written a script that should be run on the Xymon server. It does
an LDAP update on my LDAP master server, waits ten seconds then checks
that this value has been replicated to all the other LDAP servers.
The script is /opt/hobbit/server/ext/ldap_check_replication and when run
as the Hobbit user like so:
$ server/bin/bbcmd server/ext/ldap_check_replication
it runs fine and the web pages are updated.
The problem is in getting it to be run by the Xymon server. I created an
entry in the hobbitlaunch.cfg file as that seemed to be the right place
to put it, I created the following entry:
----
# "replicate_ldap" runs the in-house LDAP replication checks.
[replicate_ldap]
ENVFILE /opt/hobbit/client/etc/hobbitclient.cfg
CMD /opt/hobbit/server/ext/ldap_check_replication
LOGFILE $BBSERVERLOGS/replicate_ldap.log
INTERVAL 5m
----
But it refuses to run and nothing is mentioned in any log files
anywhere!
I would appreciate your input.
|\/|artin
--
Martin W. Ward
Manager, Technical Assistance
COLT
Unit 12, Powergate Business Park
Volt Avenue, Park Royal, London
NW10 6PW, United Kingdom
Tel: + 44 (0)20 7863 5218 Internal: 8 441 5218
Fax: + 44 (0)20 7863 5610
Email: user-2d33a6eb6a05@xymon.invalid
www.colt.net
Data | Voice | Managed Services
************************************************************************
*************
The message is intended for the named addressee only and may not be
disclosed to or used by anyone else, nor may it be copied in any way.
The contents of this message and its attachments are confidential and
may also be subject to legal privilege. If you are not the named
addressee and/or have received this message in error, please advise us
by e-mailing user-61c7f445d564@xymon.invalid and delete the message and any
attachments without retaining any copies.
Internet communications are not secure and COLT does not accept
responsibility for this message, its contents nor responsibility for any
viruses.
No contracts can be created or varied on behalf of COLT
Telecommunications, its subsidiaries or affiliates ("COLT") and any
other party by email Communications unless expressly agreed in writing
with such other party.
Please note that incoming emails will be automatically scanned to
eliminate potential viruses and unsolicited promotional emails. For more
information refer to www.colt.net or contact us on +44(0)20 7390 3900.
*************************************************************************************
The message is intended for the named addressee only and may not be disclosed to or used by anyone else, nor may it be copied in any way.
The contents of this message and its attachments are confidential and may also be subject to legal privilege. If you are not the named addressee and/or have received this message in error, please advise us by e-mailing user-61c7f445d564@xymon.invalid and delete the message and any attachments without retaining any copies.
Internet communications are not secure and COLT does not accept responsibility for this message, its contents nor responsibility for any viruses.
No contracts can be created or varied on behalf of COLT Telecommunications, its subsidiaries or affiliates ("COLT") and any other party by email Communications unless expressly agreed in writing with such other party.
Please note that incoming emails will be automatically scanned to eliminate potential viruses and unsolicited promotional emails. For more information refer to www.colt.net or contact us on +44(0)20 7390 3900.
list Alan Sparks
▸
Ward, Martin wrote:
Nope, I take back my last take-back. I am still having a problem. The server-side script echos a few lines to stdout and these are not appearing in the log file $BBSERVERLOGS/replicate_ldap.log . I cannot see any proof that the script is running. Any ideas? |\/|artin
Maybe if you echo the debugging lines to stderr instead? -Alan
list Alan Sparks
▸
Alan Sparks wrote:
Ward, Martin wrote:Nope, I take back my last take-back. I am still having a problem. The server-side script echos a few lines to stdout and these are not appearing in the log file $BBSERVERLOGS/replicate_ldap.log . I cannot see any proof that the script is running. Any ideas? |\/|artinMaybe if you echo the debugging lines to stderr instead? -Alan
And, you might try su-ing to your Hobbit/Zymon user, running the bbcmd script to get an environment, and trying to run the script. Perhaps there is a permission problem running the script, the script can't run what it needs as the Hobbit/Xymon user, or some such. It seems likely that the system has found your launch entry, if the log file exists (albeit empty).
list Martin Ward
Thanks Alan, It was a combination of poor coding on my part and working from an old client-side script. It is all working now, thanks very much! |\/|artin
▸
-----Original Message----- From: Alan Sparks [mailto:user-8f2174fd8b66@xymon.invalid] Sent: 12 November 2009 21:26 To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] Server side scripts not running Alan Sparks wrote:Ward, Martin wrote:Nope, I take back my last take-back. I am still having a problem.Theserver-side script echos a few lines to stdout and these are not appearing in the log file $BBSERVERLOGS/replicate_ldap.log . I cannot see any proof that the script is running. Any ideas? |\/|artinMaybe if you echo the debugging lines to stderr instead? -AlanAnd, you might try su-ing to your Hobbit/Zymon user, running the bbcmd script to get an environment, and trying to run the script. Perhaps there is a permission problem running the script, the script can't run what it needs as the Hobbit/Xymon user, or some such. It seems likely that the system has found your launch entry, if the log file exists (albeit empty).
*************************************************************************************
The message is intended for the named addressee only and may not be disclosed to or used by anyone else, nor may it be copied in any way.
The contents of this message and its attachments are confidential and may also be subject to legal privilege. If you are not the named addressee and/or have received this message in error, please advise us by e-mailing user-61c7f445d564@xymon.invalid and delete the message and any attachments without retaining any copies.
Internet communications are not secure and COLT does not accept responsibility for this message, its contents nor responsibility for any viruses.
No contracts can be created or varied on behalf of COLT Telecommunications, its subsidiaries or affiliates ("COLT") and any other party by email Communications unless expressly agreed in writing with such other party.
Please note that incoming emails will be automatically scanned to eliminate potential viruses and unsolicited promotional emails. For more information refer to www.colt.net or contact us on +44(0)20 7390 3900.