Getting Started with OpenAM: Redirect Not Working – Parsing Error

This topic contains 9 replies, has 5 voices, and was last updated by  pinkupradeep 7 months ago.

  • Author
    Posts
  • #14770
     chardnett 
    Participant

    Hi all,

    I am new to OpenAM and was following the tutorial here: https://backstage.forgerock.com/docs/openam/12.0.0/getting-started#try-it-out

    When I go to my site (locally hosted), I get a 403 forbidden error. I am expecting this to redirect to my OpenAM for authentication and then go to the basic apache homepage. My OpenAM is working in that I can login into it and make settings changes.

    I’d like to some guidance in how to debug this issue. Is there a way to test the webAgent in another way? Is there a debug mode where I can see what is happening between with the webAgent?

    Here are some of my logs:

    2016-12-08 15:52:12.599 -0500 ERROR [0x7f7184dcc700:17925] amagent_auth_handler(): failed to get agent configuration instance, error: file parser error
    2016-12-08 15:52:12.599 -0500 ERROR [0x7f7184dcc700:17925] am_get_config_file(): can't open file /opt/lampp/web_agents/apache24_agent/bin/../instances/agent_2/config/agent.conf (error: 13)
    2016-12-08 15:52:12.599 -0500 ERROR [0x7f7184dcc700:17925] am_get_agent_config(): failed to load instance bootstrap 3325860477 data
    2016-12-08 15:52:12.599 -0500 ERROR [0x7f7184dcc700:17925] amagent_auth_handler(): failed to get agent configuration instance, error: file parser error
    2016-12-08 15:52:29.426 -0500 ERROR [0x7f7184dcc700:17926] am_get_config_file(): can't open file /opt/lampp/web_agents/apache24_agent/bin/../instances/agent_2/config/agent.conf (error: 13)
    2016-12-08 15:52:29.426 -0500 ERROR [0x7f7184dcc700:17926] am_get_agent_config(): failed to load instance bootstrap 3325860477 data
    2016-12-08 15:52:29.426 -0500 ERROR [0x7f7184dcc700:17926] amagent_auth_handler(): failed to get agent configuration instance, error: file parser error
    2016-12-08 15:52:29.426 -0500 ERROR [0x7f7184dcc700:17926] am_get_config_file(): can't open file /opt/lampp/web_agents/apache24_agent/bin/../instances/agent_2/config/agent.conf (error: 13)
    2016-12-08 15:52:29.426 -0500 ERROR [0x7f7184dcc700:17926] am_get_agent_config(): failed to load instance bootstrap 3325860477 data
    2016-12-08 15:52:29.426 -0500 ERROR [0x7f7184dcc700:17926] amagent_auth_handler(): failed to get agent configuration instance, error: file parser error

    It looks like there was a problem reading the file, but the permissions for the agent.conf file are:

    -rw-r--r--. 1 root root 7836 Dec 2 11:44 web_agents//apache24_agent//instances/agent_2/config/agent.conf

    I am running the following:

    OpenAM 12 (free version)
    Apache 2.4 and the associated webAgent
    Tomcat 8.0.38

    Any help would be greatly appreciated.

    #14792
     chardnett 
    Participant

    UPDATE:

    I was able to fix this by redoing the agentadmin command and changing the permissions on the new agent that was created. I also realized that my webserver was not listening to port 8000 and so I updated the httpd.conf file. After doing this, its working as expected.

    #15033

    Could you please clarify what permission you have changed. I am following same issue.

    #15038
     chardnett 
    Participant

    The permissions updates were to use the following:

    1. On directory for the configuration file use chmod +rx(I also did this on all of directories up to the folder where I installed the webagent just to be sure)
    2. On configuration file just use chmod +r

    This changes the directories to be readable by all users, and the same for the configuration file.

    #15041

    I even gave 777 permissions to all the directories under webagent folder but still the same issue. I have installed apache with root so I have installed the policy agent also as root. I hope that should be correct. Please suggests how to resolve this error as I am newbie to openam.

    #15043
     chardnett 
    Participant

    You may want to try to run the configuration command again after doing that. Here is the syntax that I used:

    web_agents/apache24_agent/bin/agentadmin --s /opt/lampp/apache2/conf/httpd.conf http://openam.mydomain.org:8080/openam http://www.mydomain.org:8000 / WebAgent /opt/pwd.txt --acceptLicence --changeOwner

    #15044

    I tried all above steps more than 2-3 times but still same error as shown below

    2016-12-22 12:51:50.995 -0500 ERROR [0x7f019ab157e0:14806] am_get_agent_config(): failed to load instance bootstrap 3560431739 data
    2016-12-22 12:51:50.995 -0500 ERROR [0x7f019ab157e0:14806] amagent_auth_handler(): failed to get agent configuration instance, error: file parser error
    2016-12-22 12:51:50.995 -0500 ERROR [0x7f019ab157e0:14806] am_get_config_file(): can’t open file /home/***/web_agents/apache22_agent/bin/../instances/agent_1/config/agent.conf (error: 13)

    I am not sure after having access also why it is not able to read the config file

    The webserver is not at all throwing the login page in spite of all the files in web_agent folder has root access and the user used to install is also root.

    Please assist !!

    #18517
     eshraiman 
    Participant

    did you try to run as superuser? sudo …

    #20699
     OpenSource Developer 
    Participant

    Was the issue resolved?, if so, any updates on how you fixed the issue will be really helpful.

    All I could find is that, this issue is reported as a bug

    https://bugster.forgerock.org/jira/browse/AMAGENTS-523

    #24507
     pinkupradeep 
    Participant

    having the same issue, using windows machine, please update if the issue is resolved.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

©2019 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?