Hostname and glassfish

Joined
Jul 24, 2012
Messages
50
Reaction score
0
Points
6
Your Mac's Specs
iPhone 4s | iPad 2 | 21.5" iMac 2.7GHz 1TB
I posted a topic a while ago with the same problem but i managed to to get it working briefly. I need it reliably up and running now though.
I am trying to use glassfish on my iMac. Whenever i try to start the server it tells me that
"There is a process already using the admin port 4848 -- it probably is
another instance of a GlassFish server"

I know there isnt another glassfish server running. The problem seems to be quite common but there is no clear answer as to why. Most people say its to do with the /etc/hosts file and that the server cannot bind to the host, ipaddress.

I was told to change the etc/hosts file so the first line now goes 127.0.0.1 localhost Tom's iMac
The last name being the name on my computer (i think)
I also send a command in terminal saying echo $HOSTNAME and it came back blank. Should this be blank?

Also any advice on why i cant start the server.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
No, you should have a HOSTNAME environment variable set. Do you have something set for the computer name in System Preferences > Sharing?

As for the ports, execute the following and see if any PIDs are listening in on 4848:
Code:
lsof -i | grep LISTEN
 
OP
W
Joined
Jul 24, 2012
Messages
50
Reaction score
0
Points
6
Your Mac's Specs
iPhone 4s | iPad 2 | 21.5" iMac 2.7GHz 1TB
For the computer name i have Tom's-iMac set. I have had another fiddle in the hosts file and it worked when i restarted the machine. I will have to report back tomorrow if it is still working or if it was just a one off.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top