Skip to main content

2 instances of GF - cant be logged into admin console at the same time

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
2 replies [Last post]
allycavs
Offline
Joined: 2011-06-23

Hi,

I have GF2.1 and GF3.1 installed on the same machine. The domains have been set up so there are no conflicting ports. I can start both domains together. But i cant be logged into the admin console of the 2 domains at the same time. If I log into one, then the other I am automatically logged out of of the first one.

Any adivce?

Thanks

Alan

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ggierer
Offline
Joined: 2007-12-09

This has to do with the cookie that is used to store the session id (the name of the cookie as per specs must be JSESSIONID). When you log on to the first GF instance the JSESSIONID cookie is set for the instance. When you log on to the second instance the JSESSIONID cookie is overwritten with the *new* value for the second instance. The first instance has "lost" the session (the new session id can not be matched on the first instance). This will only happen when you are using the *same* domain (url) for both instances, as cookies are bound to the domain name (eg mydomain.com:8080 and mydomain.com:4848 will share the same cookies).

The simplest solution is to open a different browser (eg Firefox and IE) for each GF instance. You can then work with each domain without cookies being overwritten. Note, however, that the same problem will also occur if you are browsing a deployed web app (eg on port 8080) and have the GF admin console open in a different tab *if* they are using the same url.

Another possibility is to use different urls (eg create an admin.mydomain.com domain) but this is probably an overkill!

Ed Hillmann Guest
Offline
Joined: 2011-03-14

I think this is the same result as trying to connect to any web app running
on different domains on the same machine from the same browser/PC. You
can't do it.

I've come across this in the past, and if I remember correctly (?), this was
due to the HTTP connection
limitenforced
by browsers. What I found was the browsers used the host name of
the url, ignoring the port. So, to the logic controlling the connections,
it's connecting to the same server (even though the ports are different -
the ports are ignored).

This isn't anything glassfish-specific. The best you can do is open the
page in a new HTTP session in the client. Using IE, open a new session.
Firefox it's possible, but harder. Or, use a different browser than what's
displaying the other connection.

Hope this helps,
Ed

On Wed, Jul 6, 2011 at 6:05 PM, wrote:

> Hi,
>
>
>
> I have GF2.1 and GF3.1 installed on the same machine. The domains have been
> set up so there are no conflicting ports. I can start both domains
> together.
> But i cant be logged into the admin console of the 2 domains at the same
> time. If I log into one, then the other I am automatically logged out of of
> the first one.
>
>
>
> Any adivce?
>
>
>
>
> Thanks
>
> Alan
>
>
> --
>
> [Message sent by forum member 'allycavs']
>
> View Post: http://forums.java.net/node/**819042
>
>
>