eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
386 stars 144 forks source link

Can't deploy applications from CLI #20129

Closed glassfishrobot closed 11 years ago

glassfishrobot commented 11 years ago

I have changed the domain.xml network listeners as the following:

<network-listeners>
  <network-listener port="2020" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"
</network-listener>
  <network-listener port="2121" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"
</network-listener>
  <network-listener port="4242" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"
</network-listener>
</network-listeners>

I have failed to deploy my application (war file) through the CLI (Command line interface), with the following command:

asadmin> deploy C:\Users\mohamed_taman\Documents\GitHub\JEE7-Hack-Sessions\Conf\JDC Egypt\2013\Project\software\RTRC\target\RTRC-1.0-SNAPSHOT.war

Or

deploy -s --contextroot RTRC C:\Users\mohamed_taman\Documents\GitHub\JEE7-Hack-Sessions\Conf\JDC Egypt\2013\Project\software\RTRC\target\RTRC-1.0-SNAPSHOT.war

Or any combination of asadmin deploy sub commands with its options, it report the following error:

asadmin deploy command error

asadmin> deploy C:\Users\mohamed_taman\Documents\GitHub\JEE7-Hack-Sessions\Conf\JDC Egypt\2013\Project\software\RTRC\target\RTRC-1.0-SNAPSHOT.war Remote server does not listen for requests on [localhost:4848]. Is the server up? Unable to get remote commands. Closest matching local command(s): help

Command deploy failed.

asadmin deploy command tries to deploy the application to [localhost:4848], while I have changed the port to 4242.

Workaround Deploy through Admin GUI console.

Environment

Windows 7 SP1 Mac OS X 10.8.3 Glassfish v4 b82

Affected Versions

[4.0_dev]

glassfishrobot commented 6 years ago
glassfishrobot commented 11 years ago

@glassfishrobot Commented tmueller said: Changing the domain.xml only changes the port that the server listens on, not the port used by asadmin. To use a different port with asadmin, use the --port option. For example:

asadmin --port 4242 deploy myapp.war

or

asadmin --port 4242 asasdmin> deploy myapp.war

or

asadmin asadmin> deploy --port 4242 myapp.war

glassfishrobot commented 11 years ago

@glassfishrobot Commented Was assigned to tmueller

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-20129

glassfishrobot commented 11 years ago

@glassfishrobot Commented Reported by taman

glassfishrobot commented 11 years ago

@glassfishrobot Commented Marked as works as designed on Tuesday, April 2nd 2013, 7:51:35 am