I develop on Mac (Lion) with Eclipse and GlassFish 3.1. GlassFish uses ports 8080 and 4848. Suddenly when I try to launch GlassFish it tells me it can't because there's a port conflict.
As far as I can tell, nothing is using that port. I shutdown everything and restart the Mac and still get the same error when I run GlassFish. I uninstalled GlassFish, deleted all the directories, restarted my machine, reinstalled GlassFish and same problem.
I created a new test user on my Mac, log out as me, log in as him, install GlassFish under that users account and it runs fine there.
It's like there's something in my user account that makes my Mac or GlassFish think that port is in use.
Does anyone know how I might solve this problem? I hate the idea of having to create a new account on my Mac and transfer all of my data there. Seems like an excessive solution.
Any ideas?
Rob
UPDATE: Doing a "lsof -i :8080" shows me this:
$ lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
launchd 158 stephen 8u IPv4 0xffffff8014945fa0 0t0 TCP *开发者_JAVA技巧:http-alt (LISTEN)
launchd 158 stephen 10u IPv6 0xffffff8014941240 0t0 TCP *:http-alt (LISTEN)
printerAg 232 stephen 5u IPv4 0xffffff8014945fa0 0t0 TCP *:http-alt (LISTEN)
printerAg 232 stephen 6u IPv6 0xffffff8014941240 0t0 TCP *:http-alt (LISTEN)
I guess that means there is something on port 8080? If so, what are launchd and printerAg? And why are they running on this user account, but not on the new user account I created? Thanks!
You can also change the port of HP printers from 8080 to 18089 by the following command:
sudo sed -i "" -e "s|8080|18089|g" ~/Library/LaunchAgents/com.hp.printerAgent.plist
Then restart you system.
Check who is using the port:
lsof -i :8080 -i :4848
精彩评论