Monday December 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:
asadmin set server.http-service.http-listener.http-listener-1.port=10080
asadmin set server.http-service.http-listener.http-listener-2.port=10443
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.
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.
Posted at 05:27PM Dec 22, 2008 by dgolds in Open Source | Comments[9]