Glassfish 4 can't enable remote admin?

I have a Glassfish 4 server running in a Debian headless VM. I can access the application just fine, but I cannot access the admin port from nothing but localhost. I would like to be able to access it so that I can remotely deploy / debug from the IDE on another machine.

I tried the command asamin enable-secure-admin

that exits, but after restarting there is no change.

I checked with with netstat

and Glassfish is only listening on port 4848

from localhost

. Is there any other control for the remote administrator? Or is there something I am missing?

+3


source to share


2 answers


To administer Glassfish, you need the following:



  • set non-blank password for all admin accounts
  • enable secure admin
  • make sure the network listener is listening on the correct IPs (it can be configured to only listen on the loopback interface)
+5


source


For me it works like this:

* locally log into the Glassfish admin console

* set admin-listener port to 1 4848 (I don't know what's wrong with 4848, my JVM uses it all the time, so the admin console port changes automatically )

* set admin-listener IP for my-host-IP (other than the default 0.0.0.0 and from 127.0.0.1)

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



* run the default domain for glass fish

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 breaking in memory)

+1


source







All Articles