1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GlassFishでデフォルトポート以外にデプロイしようとするとエラーになる場合の対処法

Last updated at Posted at 2019-07-28

JenkinsでGlassFishにデプロイしようとすると、エラーとなってしまった。

/usr/local/glassfish5/bin/asadmin --user admin --passwordfile /tmp/password-admin.txt  redeploy --name=test /tmp/test.war

エラーログ

SSH: EXEC: connected
Deprecated syntax, instead use:
asadmin --user admin --passwordfile /tmp/password-admin.txt redeploy [options] ...
No such local command: redeploy.  Unable to access the server to execute the command remotely.  Verify the server is available. 
Command redeploy failed.
Remote server does not listen for requests on [localhost:4848]. Is the server up?
SSH: EXEC: completed after 1,412 ms
SSH: Disconnecting configuration [test] ...
ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [1]]
Build step 'Send build artifacts over SSH' changed build result to UNSTABLE
Finished: UNSTABLE

どうやら、asadmin redeployコマンドの実行に失敗しているらしい。

原因

asadminコマンドはポートを指定しない場合、デフォルトで 4848 と通信するらしい
https://docs.oracle.com/cd/E18930_01/html/821-2433/asadmin-1m.html

解決方法

asadminコマンドのオプションでportが指定できるので、このオプションでポートを指定する。

/usr/local/glassfish5/bin/asadmin --port 4849 --user admin --passwordfile /tmp/password-admin.txt  redeploy --name=test /tmp/test.war
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?