Monday Dec 22, 2008

Changing Default GlassFish v3 Prelude Port Numbers 4848, 8080, and 8181

When you create courses, you sometimes do crazy things like installing multiple GlassFish domain administration servers (DAS) in a single host.

When you install GlassFish, it gives you default port numbers of of 4848 (for administration), 8080 (for the HTTP listener), and 8181 (for the HTTPS listener). But what do you do if you want to change them?

I got a few ideas googling "asadmin port number" and the like but couldn't really find a good example. So, I figured out how you do it and thought I would post an example in case anyone finds themselves in the same predicament as I did today.

Here are some examples that work in GlassFish v3 Prelude:

  1. To change the HTTP port to 10080:

    asadmin set server.http-service.http-listener.http-listener-1.port=10080

  2. To change the HTTPS port to 10443:

    asadmin set server.http-service.http-listener.http-listener-2.port=10443

  3. To change the administration server port to 14848:

    asadmin set server.http-service.http-listener.admin-listener.port=14848

It's handy to know you can grep for server properties in GlassFish v3 Prelude as follows:

asadmin get server | grep listener

shows all the properties with the text "listener" in them.

In GlassFish v3 Prelude, you can set port numbers for administration and the HTTP listener in the installer - but not for the HTTPS listener. You might find yourself needing to explicitly specify the administration port in your asadmin command. For example:

asadmin set --port 14848 server.http-service.http-listener.http-listener-2.port=10443

For GlassFish v2, use the asadmin get command as described here.

Hope this is helpful to someone.

Wednesday Dec 10, 2008

Installing OpenSSO Enterprise 8.0 on GlassFish v3 Prelude Release

I've been building some training for OpenSSO Enterprise 8.0, and I want to use GlassFish v3 Prelude Release as my OpenSSO web container for this training.

So I pulled down the GlassFish release, installed it, deployed OpenSSO, started up the OpenSSO console, and logged in. But instead of seeing the console main page, the login page appeared a second time, with the user name and password fields blanked out.

The issue has to do with cookie handling. Dennis noted it in his blog entry here.

Well, it turns out getting OpenSSO Enterprise 8.0 to run on this release of GlassFish is a snap - if you know the workaround. Here are the steps for Solaris OS:
  1. Obtain the GlassFish v3 Prelude Release from https://glassfish.dev.java.net.

  2. Run the glassfish-v3-prelude-unix.sh command (which is what you obtained when you downloaded GlassFish). Specify installation options as needed. The rest of these instructions assume that you specified /opt/glassfish as your installation directory.

  3. Start the domain administration server: /opt/glassfish/bin/asadmin start-domain domain1

  4. Start a browser, then start the GlassFish administration console (http://zone04.example.com:4848) and log in to the console.

  5. Click Application Server (in the left window pane), then the JVM Settings tab, then the JVM Options tab.

  6. Click the Add JVM Option button. A new line opens up.

  7. Add the following option: -Dcom.iplanet.am.cookie.c66Encode=true (this is the workaround).

  8. Change the -client option to -server, and change the -Xmx512m option to at least -Xmx1024m (as documented in the OpenSSO Installation and Configuration Guide.

  9. Log out of the GlassFish admin console.

  10. Restart the GlassFish DAS:
      /opt/glassfish/bin/asadmin stop-domain domain1
      /opt/glassfish/bin/asadmin start-domain domain1

  11. Deploy the OpenSSO web application and configure it.

  12. Start the OpenSSO console and log in. This should take you to the console's main page.

About

dgolds

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today