[OPENAM-8406] Agent 4.0.0 can not process the default apache2 config on Unbuntu 14.04 Created: 22/Feb/16  Updated: 21/Nov/16  Resolved: 21/Nov/16

Status: Closed
Project: OpenAM
Component/s: web agents
Affects Version/s: Agents-4.0.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: edwardb Assignee: Unassigned
Resolution: Duplicate Votes: 2
Labels: AMAgent, no-release-notes
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 14.0.4
Agent Apache_v2.4_Linux_64bit_4.0.0.zip


Attachments: File apache2.conf    
Issue Links:
Relates
relates to OPENAM-8486 WPA interactive installator can't cor... Closed
is related to OPENAM-4049 Web Agent install fails on Debian-bas... Closed
Epic Link: Web Agent 4.1.0 Release
Support Ticket IDs:
Verified Version/s:

 Description   

Agent 4.0.0 does not work with the default ubuntu (14.04) configuration for apache2.

Steps to recreate
_________________

1) Set up machine with Ubuntu server version 14.04 on it.

2) Install apache2 using sudo apt-get-install-apache2

3) Follow steps in https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts to create a site

4) Now unzip Apache_v2.4_Linux_64bit_4.0.0.zip

5) Now attempt to install agent ./agentadmin --install

After entering location of config file, we get an error message "Error: invalid server configuration"

In the logs we get the following

2016-02-22 15:37:41  OpenAM Web Agent for Apache Server interactive installation
2016-02-22 15:37:41  license was accepted earlier
2016-02-22 15:38:02  Found group ${APACHE_RUN_GROUP}, gid 0
2016-02-22 15:38:02  could not locate LoadModule configuration directive in /etc/apache2/apache2.conf

What has been tried
___________________

Agent 3.3.4 - This got past the stage of verifying the config

Taking the default httpd conf from the downloaded httpd distribution and using this with the agent - This also worked

So it seems that the issue was probably introduced in Agent 4.0.0



 Comments   
Comment by edwardb [ 23/Feb/16 ]

I have attached the default apache2.conf as this may help with diagnosis of problem

Comment by Richard Hruza [ 23/Feb/16 ]

I think this issue is because you used "apt-get-install-apache2" for installation apache. The structure of apache is different. As is mentioned in logs, cannot locate module. For your installation modules are in separate folder "mods-enabled", see your configuration

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

but if you compile and install the apache based on official documentation
https://httpd.apache.org/docs/2.4/install.html
the list of modules are straight into /apache2.4/conf/httpd.conf, e.g:

# LoadModule foo_module modules/mod_foo.so
#
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_socache_module modules/mod_authn_socache.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
...
Comment by edwardb [ 23/Feb/16 ]

We do have some documentation about how to install apache on vhosts which could be used to help with installing.

https://backstage.forgerock.com/#!/docs/openam-web-policy-agents/4/web-users-guide#install-apache-web-agent-vhost

However we do not really explain what to do with the config which you have in the ubuntu distribution where we have config spread out into different folders. This could be an improvement to the documentation.

Also error message when trying to use the config is "Error: invalid server configuration" is maybe not descriptive enough. Perhaps should state that the server configuration is not recognised and that this may need to be done manually.

Comment by Mareks Malnacs [ 12/Apr/16 ]

Duplicate of OPENAM-8486

Comment by edwardb [ 04/Oct/16 ]

This needs verification - Need to check installation with Debian

Comment by Alex Levin [ 04/Oct/16 ]

OPENAM-8486 changes the message Invalid Server Configuration to
Warning: Apache HTTP Server configuration file %s does not contain any "LoadModule" directive.
Updating this file may result in corrupt Apache HTTP Server installation and Agent failure.

Comment by Nemanja Lukic [ 26/Oct/16 ]

Verified in: Ubuntu 14.0.4/Apache 2.4 (RC3)

Comment by Quentin CASTEL [X] (Inactive) [ 20/Nov/16 ]

modification of the status, in order to migrate the 'Zendesk ID' field to 'Support Ticket ID' field.

Generated at Wed Sep 30 04:07:38 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.