Xymon Mailing List Archive search

libpcre issues with Apache / xymon

3 messages in this thread

list Deepak Chaudhary · Mon, 27 Mar 2017 14:09:19 -0700 ·
Hello Everyone,

I was able to configure Xymon 4.3.8 on AIX 7.1. First time everything ran
fine and i was able to access /xymon and /xymon-cgi/ paths via apache
installed on same server.

However, now i am encountering following error on trying to access cgi-bin
path. Apache logs show following error -

AH01215: Could not load program /home/xymon/server/bin/svcstatus.cgi:,
referer: http://servername/xymon/
AH01215: \tDependent module /applications/apache/
2.4.4.0//lib/libpcre.a(libpcre.so.1) could not be loaded., referer:
http://servername/xymon/
AH01215: \tThe module has an invalid magic number., referer:
http://servername/xymon/
End of script output before headers: svcstatus.sh, referer:
http://servername/xymon/

Looks like cgi-bin scripts are trying to read libpcre.a instead of pcre
installed during xymon [ usr/local/bin ].

I modified  ~/server/etc/cgioptions.cfg and ~/server/etc/xymonserver.cfg to
include following -
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH

Any help or pointer much appreciated.


Regards,
Deepak Chaudhary
list Jeremy Laidman · Tue, 6 Jun 2017 08:26:05 +1000 ·
Deepak

Google tells me that this can happen when a 32-bit library is being linked
to by a 64-bit library. Or when a binary requires a shared library (.o) but
there's only an archive library (.a).

If you run "svcstatus.cgi" or "svcstatus.sh" manually, does it give the
same error? If so, run it via truss to see what library file it's trying to
load when it stops, and look for an alternative. And/or run "ldd
svcstatus.cgi".

The LD_LIBRARY_PATH trick might work, but check that libpcre.* exists in
/usr/local/lib. Also see if there's /usr/local/lib64 or /usr/local/lib32.

Cheers
Jeremy

On 28 March 2017 at 08:09, Deepak Chaudhary <user-115a4b43ab47@xymon.invalid>
quoted from Deepak Chaudhary
wrote:
Hello Everyone,

I was able to configure Xymon 4.3.8 on AIX 7.1. First time everything ran
fine and i was able to access /xymon and /xymon-cgi/ paths via apache
installed on same server.

However, now i am encountering following error on trying to access cgi-bin
path. Apache logs show following error -

AH01215: Could not load program /home/xymon/server/bin/svcstatus.cgi:,
referer: http://servername/xymon/

AH01215: \tDependent module /applications/apache/2.4.4.0//
lib/libpcre.a(libpcre.so.1) could not be loaded., referer:
quoted from Deepak Chaudhary
http://servername/xymon/
AH01215: \tThe module has an invalid magic number., referer:
http://servername/xymon/
End of script output before headers: svcstatus.sh, referer:
http://servername/xymon/

Looks like cgi-bin scripts are trying to read libpcre.a instead of pcre
installed during xymon [ usr/local/bin ].

I modified  ~/server/etc/cgioptions.cfg and ~/server/etc/xymonserver.cfg
to include following -
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH

Any help or pointer much appreciated.


Regards,
Deepak Chaudhary

list Daniel L Lozovsky · Mon, 5 Jun 2017 22:50:04 +0000 ·
I had similar problem and I added the library directly into apache httd.conf file and that worked.

Sent from my iPhone
quoted from Jeremy Laidman

On Jun 5, 2017, at 3:26 PM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid<mailto:user-71895fb2e44c@xymon.invalid>> wrote:

Deepak

Google tells me that this can happen when a 32-bit library is being linked to by a 64-bit library. Or when a binary requires a shared library (.o) but there's only an archive library (.a).

If you run "svcstatus.cgi" or "svcstatus.sh" manually, does it give the same error? If so, run it via truss to see what library file it's trying to load when it stops, and look for an alternative. And/or run "ldd svcstatus.cgi".

The LD_LIBRARY_PATH trick might work, but check that libpcre.* exists in /usr/local/lib. Also see if there's /usr/local/lib64 or /usr/local/lib32.

Cheers
Jeremy

On 28 March 2017 at 08:09, Deepak Chaudhary <user-115a4b43ab47@xymon.invalid<mailto:user-115a4b43ab47@xymon.invalid>> wrote:
Hello Everyone,

I was able to configure Xymon 4.3.8 on AIX 7.1. First time everything ran fine and i was able to access /xymon and /xymon-cgi/ paths via apache installed on same server.

However, now i am encountering following error on trying to access cgi-bin path. Apache logs show following error -

AH01215: Could not load program /home/xymon/server/bin/svcstatus.cgi:, referer: http://servername/xymon/<https://urldefense.proofpoint.com/v2/url?u=http-3A__servername_xymon_&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=hvhxsFi99sfEwu3u2bGOgA&m=Dj8IC1TuKfx_hNHToeZWqKgu2xUzLvYPpv3y1ezBKnY&s=Mf98npIeCk8tITU5zq0FBe53eR5uWNymgXD3wXhx90o&e=>;
AH01215: \tDependent module /applications/apache/2.4.4.0//lib/libpcre.a(libpcre.so.1)<https://urldefense.proofpoint.com/v2/url?u=http-3A__2.4.4.0__lib_libpcre.a-28libpcre.so.1-29&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=hvhxsFi99sfEwu3u2bGOgA&m=Dj8IC1TuKfx_hNHToeZWqKgu2xUzLvYPpv3y1ezBKnY&s=xJljKcsuGlTGEQPGpt6jgPKZJDcAkAedl5nxSxaetgw&e=>; could not be loaded., referer: http://servername/xymon/<https://urldefense.proofpoint.com/v2/url?u=http-3A__servername_xymon_&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=hvhxsFi99sfEwu3u2bGOgA&m=Dj8IC1TuKfx_hNHToeZWqKgu2xUzLvYPpv3y1ezBKnY&s=Mf98npIeCk8tITU5zq0FBe53eR5uWNymgXD3wXhx90o&e=>;
AH01215: \tThe module has an invalid magic number., referer: http://servername/xymon/<https://urldefense.proofpoint.com/v2/url?u=http-3A__servername_xymon_&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=hvhxsFi99sfEwu3u2bGOgA&m=Dj8IC1TuKfx_hNHToeZWqKgu2xUzLvYPpv3y1ezBKnY&s=Mf98npIeCk8tITU5zq0FBe53eR5uWNymgXD3wXhx90o&e=>;
End of script output before headers: svcstatus.sh, referer: http://servername/xymon/<https://urldefense.proofpoint.com/v2/url?u=http-3A__servername_xymon_&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=hvhxsFi99sfEwu3u2bGOgA&m=Dj8IC1TuKfx_hNHToeZWqKgu2xUzLvYPpv3y1ezBKnY&s=Mf98npIeCk8tITU5zq0FBe53eR5uWNymgXD3wXhx90o&e=>;
quoted from Jeremy Laidman

Looks like cgi-bin scripts are trying to read libpcre.a instead of pcre installed during xymon [ usr/local/bin ].

I modified  ~/server/etc/cgioptions.cfg and ~/server/etc/xymonserver.cfg to include following -
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH

Any help or pointer much appreciated.


Regards,
Deepak Chaudhary


Xymon at xymon.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.xymon.com_mailman_listinfo_xymon&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=hvhxsFi99sfEwu3u2bGOgA&m=Dj8IC1TuKfx_hNHToeZWqKgu2xUzLvYPpv3y1ezBKnY&s=YWqr16uYzJ39NAHLwrPJVTQZWxatjoy1GQdqY7KWhGI&e=>;