简体   繁体   中英

Glassfish 4 can't enable remote admin?

I have a Glassfish 4 server running on a headless Debian VM. I can access the application just fine, but I cannot seem to access the admin port from anything other than localhost. I'd like to be able to access it so I can remotely deploy/debug from an IDE on another machine.

I've tried the asamin enable-secure-admin command, which completes but after restarting there is no change.

I've checked with netstat and Glassfish is only listening on port 4848 from localhost . Is there any other place remote admin is controlled from? Or something I'm missing?

You need the following to administer Glassfish remotely:

  • set a non-blank password for all admin logins
  • enable secure admin
  • ensure the network listener is listening on the correct IP addresses (it could be set to listen only on the loopback interface)

For me it works as follows:

*log into the glassfish admin console locally

*set admin-listener port to 1 4848 (I don`t know what is wrong with 4848, my JVM permanently uses it thus the admin console port changes automatically )

*set admin-listener IP to my-host-IP (different from the default 0.0.0.0 and from 127.0.0.1)

*add a new FireWall (I`ve ordered VPS on Windows) rule for outcoming TCP access to 14848 port

*run default glassfish domain

asadmin start-domain

*enable secure admin

asadmin --host my-host-IP --port 14848 enable-secure-admin

*restart the domain (and don`t forget to kill Java possibly loitering in memory)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM