users@glassfish.java.net

Re: glassfish-3.1.1

From: Kaushal Shriyan <kaushalshriyan_at_gmail.com>
Date: Fri, 14 Oct 2011 03:32:09 +0530

On Thu, Oct 13, 2011 at 7:25 PM, Tom Mueller <tom.mueller_at_oracle.com> wrote:
> There are several ways to do this.
>
> 1) When creating the domain,  you can pass in the value for the HTTP port to
> the create-domain command:
>
> asadmin create-domain --instanceport=9080 mydomain
>
> See
> http://download.oracle.com/docs/cd/E18930_01/html/821-2433/create-domain-1.html#scrolltoc
> for details.
>
> 2) If you can get the server started (by stopping the process that is
> current listening on 8080), then you can use the following command to change
> the port number:
>
> asadmin set
> configs.config.server-config.network-config.network-listeners.network-listener.http-listener-1.port=9080
>
> 3) You can edit the glassfish/domains/mydomain/config/domain.xml file and
> replace 8080 with the desired port in the following element:
>
> <network-listener port="8080" protocol="http-listener-1" transport="tcp"
> name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
>
> Then start the server.
>
> Tom
>
>

Hi,

I have created two installation of glassfish by setting home folder to
/opt/glassfish1 and /opt/glassfish2 and using init,d script
/etc/init.d/glassfish1 and /etc/init.d/glassfish2

I have edited /opt/glassfish1/glassfish/domains/mydomain/config/domain.xml
and /opt/glassfish2/glassfish/domains/mydomain/config/domain.xml
using http://blogs.oracle.com/alexismp/entry/flexible_glassfish_domain_creation_using

I am unable to start both installation of glassfish in spite of
setting different ports on both installation of glassfish. Please help
me understand and correct me if i am doing it wrong. I have been using
tomcat in my setup wherein multiple instances of tomcat server works
by editing server.xml to listen to a different port and it works fine
without any issue using init.d script For example /etc/init.d/tomcat0
pointing to /opt/tomcat0 and /etc/init.d/tomcat1 pointing to
/opt/tomcat1 and several such multiple instances.

Regards,

Kaushal