Skip to main content

remote deployment on glassfishv3 using Admin CLI

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
4 replies [Last post]
nurulislam
Offline
Joined: 2011-01-28

Hi,

I am trying to deploy an application onto a remote Glassfishv3 server using the asadmin utility
but the deploy command fails with strange error messages.

The remote machine onto which the application is deployed runs linux with glassfishv3 and the machine
from which the asadmin command is run is a windows based machine also using glassfishv3.
This is the command I use from my local machine to achieve the remote deployment

asadmin --passwordfile remote_admin_password.txt --host machine1.hostmachine.com --user admin deploy C:\ear\Project.ear
where remote_admin_password.txt contains the line AS_ADMIN_PASSWORD with the proper password.

The above command fails displaying a message "status:403 Command deploy failed".

The 403 problem could be fixed by turning on the remote administration on the remote glassfish machine by excecuting the asadmin command enable-secure-admin
and then restarting the domain.

Now the same above command that I use to achieve the remote deployment from my local machine fails with a different error message "CLI001 Invalid Command:deploy".

This is the actual problem with the remote deployment that I am trying to fix.

I could easily do the remote deployment using the glassfish Admin Console but I'd like to use glassfish CLI to achieve this.

Also,I couldn't find any resource on the internet about remote deployment on glassfishv3 using the Admin CLI.

Can anyone who have done a remote deployment using Admin CLI on glassfishv3 help me with this problem.
Any help would be greatly appreciated.

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hoffman462
Offline
Joined: 2008-07-24

Thank you for this post. It's very helpful. I've spent quite a bit of time looking for that "asadmin enable-secure-admin" command Is it possible to do this on the gui in 3.1?

Srinivas Guest
Offline
Joined: 2011-06-01

In 3.1 it is not possible in admin gui. It is planned in 3.1.1.

On 06/01/2011 06:32 PM, forums@java.net wrote:
> Thank you for this post. It's very helpful. I've spent quite a bit of
> time
> looking for that "asadmin enable-secure-admin" command Is it possible
> to do
> this on the gui in 3.1?
>
>
> --
>
> [Message sent by forum member 'hoffman462']
>
> View Post: http://forums.java.net/node/806284
>
>

tjquinn
Offline
Joined: 2005-03-30

Now that you have used enable-secure-admin, try a simple test from the remote Windows system, something like
asadmin uptime
which is a simpler operation and should help verify whether the remote asadmin client is communicating correctly with the server.
If that works, but the remote deployment command still does not, look in the server's server.log file (normally in domains/domain1/logs/server.log) to see if there are any errors logged there from your failed deployment.
If "asadmin uptime" does not work then there is something else wrong, probably with the communication. At that point you could define the environment variable
AS_DEBUG=true
and then try the asadmin command again. You should see detailed logging as the client attempts to exchange messages with the server.
- Tim

tmueller
Offline
Joined: 2005-10-31

Please have a look at Chapter 5 of the Security Guide for information
about being able to run asadmin commands from a remote machine.
http://download.oracle.com/docs/cd/E18930_01/html/821-2435/gknqh.html

Tom