The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » GlassFish

Thread: 403 access denied error when switching from localhost to machine IP

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 3 - Last Post: Dec 5, 2008 11:05 PM by: achugh
achugh

Posts: 3
403 access denied error when switching from localhost to machine IP
Posted: Dec 4, 2008 11:18 PM
 
  Click to reply to this thread Reply

I've recently upgraded an existing application that would earlier run on Sun One v7 update 5 to now run on Sun Java App Server v9.1_02. It runs fine over a domain created under the 'developer' profile. I am able to access the web applications from the browser, e.g. when I browse to http://localhost:8080/webapp. However, as soon as I or someone else tries it through the machine address, say http://10.0.10.10:8080/webapp -- I get a 403 access denied error after login.

message: Access to the requested resource has been denied
description: Access to the specified resource (Access to the requested resource has been denied) has been forbidden.

I get this error even if I subsequently navigate to the web application using localhost. I have to bounce the domain in order to make it available again.

Has anyone faced this issue before? If so, how did you correct this problem?
Thanks in advance,

kumarjayanti

Posts: 1,125
Re: 403 access denied error when switching from localhost to machine IP
Posted: Dec 4, 2008 11:38 PM   in response to: achugh
 
  Click to reply to this thread Reply

is there any exception that you see in the server logs ?. Please attach web.xml as well.

If it is a BASIC auth webapp, then can you kill your browser after the 403 error and try to see if the same error persists when using localhost with new browser instance.

achugh

Posts: 3
Re: 403 access denied error when switching from localhost to machine IP
Posted: Dec 5, 2008 12:02 AM   in response to: kumarjayanti
 
  Click to reply to this thread Reply

Nothing in the server logs, the web application seems to work fine when I default the domain to file-realm, (localhost, IP both work). The original issue I see when switching to a custom-realm that authenticates users against credentials in the database. I revised the code as per http://docs.sun.com/app/docs/doc/819-3672/beabs?l=en&a=view&q=appservrealm but I've obviously missed something out. I will investigate further into the root cause. Thanks,

achugh

Posts: 3
Re: 403 access denied error when switching from localhost to machine IP
Posted: Dec 5, 2008 11:05 PM   in response to: achugh
 
  Click to reply to this thread Reply

To fix this error, ensure commitUserAuthentication(grpList) in the login-module doesn't use a final/static list of group-names.




 XML java.net RSS