Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Terminal and /etc/hosts

I am trying to run a glassfish server on my iMac. I have run it before (a few weeks ago) but encountered a lot of problems getting to to work from the start. The main problem was whenever i tried to start the server using asadmin start-domain i would get this error message.


There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.

Command start-domain failed.


I didnt have any processes (not that i could find) running on this port. Reading various posts i was told to edit information within the /etc/hosts file. I didnt know what i was doing, so did not change anything. What i did notice though, is after i saved the file, where in terminal it usually said my-imac:~user$ it now said My-iMac:~user$ with added capital letters. I think i may have added a space or two after the first line where it says localhost. Anyway glassfish now ran using the above command, and glassfish will ONLY run when there are capital letters for my computer name in terminal . I would like to know what could cause the capital letters, why it only runs when there are capitals and what i can do to make it work all the time . . .

Currently the server will not run again, and no capital letters appear in terminal, and i do not know how to bring them back or what changes should be made.


Thank you

iMac (21.5-inch Mid 2011), OS X Mountain Lion (10.8.2)

Posted on Nov 26, 2012 12:20 PM

Reply
1 reply

Nov 26, 2012 5:24 PM in response to tom-wdh

The host name in the shell prompt is the POSIX hostname, which is determined either by the OS X computer name as set in the Sharing preference pane, or by the result of a reverse DNS lookup on the IP address of the primary network interface. You can set it to a different value using the scutil(8) shell command. See its man page for details.

Terminal and /etc/hosts

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.