Bug 1168441 - CovalentSNMP/2.3.0, mod_snmp Apache HTTP Server doesn't start with the sample file on Windows
Summary: CovalentSNMP/2.3.0, mod_snmp Apache HTTP Server doesn't start with the sample...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Apache Server (httpd) and Connectors
Version: 6.4.0
Hardware: Unspecified
OS: Windows
unspecified
urgent
Target Milestone: ER2
: EAP 6.4.0
Assignee: mark yarborough
QA Contact: Michal Karm Babacek
URL:
Whiteboard: DR12:bug
Depends On: 1193592
Blocks: 1188769 1193459
TreeView+ depends on / blocked
 
Reported: 2014-11-27 00:05 UTC by Michal Karm Babacek
Modified: 2019-08-19 12:47 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
Cause: ?? Consequence: Workaround (if any): Result:
Clone Of:
: 1188769 (view as bug list)
Environment:
Last Closed: 2019-08-19 12:47:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michal Karm Babacek 2014-11-27 00:05:14 UTC
Dear folks, 
first of all, there is a missing prefix modules/ that's preventing Apache HTTP Server from boot with mod_snmp config loaded:

Proposed fix:
> --- /tmp/jboss-ews-2.1/etc/httpd/conf.d/mod_snmp.conf.sample    2014-07-17 09:00:54.000000000 -0400
> +++ /tmp/jboss-ews-2.1/etc/httpd/conf.d/mod_snmp.conf.sample.fixed   2014-11-26 18:55:55.631784009 -0500
> @@ -1,6 +1,6 @@
>  ## Apache SNMP
> -LoadModule snmpcommon_module libsnmpcommon.so
> -LoadModule snmpagt_module libsnmpmonagt.so
> +LoadModule snmpcommon_module modules/libsnmpcommon.so
> +LoadModule snmpagt_module modules/libsnmpmonagt.so
>  
>  # Directory where that contains the configuration file for SNMP agent
>  SNMPConf "@installroot@/etc/httpd/conf.d/snmpd"

Once fixed, the server starts:

With this configuration C:/Program Files/jboss-ews-2.1/etc/httpd/conf.d/snmpd/snmpd.conf

> agentaddress 1618.4.53
> 
> com2sec local     10.40.4.53        public
> 
> group MyRWGroup v1         local
> group MyRWGroup v2c        local
> 
> view all    included  .1   80
> 
> access MyROGroup ""      any       noauth    exact  all    none   none
> access MyRWGroup ""      any       noauth    exact  all    all    none
> 
> syscontact Webmaster <webmaster>
> syslocation Apache Server

CovalentSNMP does not boot properly, producing the following log.
1) It runs with the default: '161.0.0' instead of '1618.4.53'
2) There are weird notes with superfluous '\n' symbol.

> Apache/2.2.26 (Win64) DAV/2 CovalentSNMP/2.3.0 mod_ssl/2.2.26 OpenSSL/0.9.8e-fips-rhel5 configured -- resuming normal operations
> SNMP: generic logger: Could not log error-info\n
> Server built: Sep  3 2014 12:20:35
> SNMP: generic logger: Could not log error-info\n
> Parent: Created child process 3252
> SNMP: generic logger: Could not log error-info\n
> SNMP: CovalentSNMP/2.3.0 started (address '161.0.0' - pid '1256')
> Digest: generating secret for digest authentication ...
> Digest: done
> Child 3252: Child process is running
> Child 3252: Acquired the start mutex.
> Child 3252: Starting 150 worker threads.
> Child 3252: Starting thread to listen on port 544.
> Child 3252: Starting thread to listen on port 181.
> Parent: Received shutdown signal -- Shutting down the server.
> SNMP: generic logger: Could not log error-info\n
> Child 3252: Exit event signaled. Child process is ending.
> Child 3252: Released the start mutex
> Child 3252: All worker threads have exited.
> Child 3252: Child process is exiting
> Parent: Child process exited successfully.
> SNMP: generic logger: Could not log error-info\n

On the other hand, if one tries to connect to port 161 on any interface (thanks to 0.0.0.0) with snmpwalk, module works just fine and it offers the proper tree to traverse.

IMHO, the snmpd.conf isn't being loaded at all.
I tried  to use even a space-free path like:
> SNMPConf "C:/tmp/snmpd.conf"
or
> SNMPConf "C:/tmp"
...without any luck.

WDYT? :-)

Comment 1 Rostislav Svoboda 2014-12-04 19:32:28 UTC
Apache HTTP Server on Windows doesn't start.

Comment 4 Jean-frederic Clere 2015-01-15 12:10:37 UTC
According to my notes the snmpd.conf was read when it was in conf (where httpd.conf is).
In it possible to check that works?

If not it is 2 BZ one trivial to fix and one more difficult.

Comment 5 Michal Karm Babacek 2015-01-27 00:26:09 UTC
Placing it in conf/ helped:
> [notice] SNMP: CovalentSNMP/2.3.0 started (address '1618' - pid '2860')
It appears that the directive in mod_snmpd.conf is either silently ignored or it expects a different format (relative path to dir? absolute path to the actual file?)

> # Directory where that contains the configuration file for SNMP agent
> SNMPConf "C:/Program Files/jboss-ews-2.1/etc/httpd/conf.d/snmpd"

Comment 7 Jean-frederic Clere 2015-02-03 16:32:08 UTC
The BZ isn't a blocker basically only a mod_snmp.conf.sample is delivered and that file needs to be fixed and copied to mod_snmp.conf

Comment 8 Jean-frederic Clere 2015-02-05 17:38:47 UTC
Fixed in jb-ep-6.4-xb
http://pkgs.devel.redhat.com/cgit/rpms/mod_snmp?h=jb-ep-6.4-xb

Please rebuild.

Comment 9 Permaine Cheung 2015-02-05 18:07:44 UTC
Lukas, can you please rebuild mod_snmp and jboss-ews-httpd and let me know when new builds are ready, so that I can update that for ER2 if possible? Thanks!

Comment 10 Permaine Cheung 2015-02-06 15:53:55 UTC
Thanks Lukas for the rebuild. EAP 6.4.0 ER2 natives had been updated to include this fix.

Comment 11 Michal Karm Babacek 2015-02-16 23:43:14 UTC
Both major points of this bugzilla failed QA in EAP 6.4.0.ER2:

- snmpd.conf is still located in a directory the daemon won't read, see BZ 1188769

- log still contains weird error-info\n messages http://fpaste.org/186269/41255631/

Comment 13 Jean-frederic Clere 2015-02-17 09:00:44 UTC
The log message should go in another BZ which has to be handled as a known issue.


Note You need to log in before you can comment on or make changes to this bug.