Error 501

Any hints about what might cause the following error to show up in my browser?

[code]501 - Not Implemented

No handler exists to handle http://127.0.0.1:8080/.
[/code]

This happens on launch when a web app is run in debug mode. It appears in Safari in OS 10.9 or 10.10, in Chrome, and in IE on Win7

Is the debug port set to 8080?

Ah, I bet you have another web server running… IIS or Apache?

It is using 8080

it is on my desktop iMac which is 10.9.5 with OS X Server installed BUT web services turned off (and 127.0.0.1:80 does not return a page)

So… no.

Well, something is interfering. I don’t think that error is from the web framework.

OK, I have some more information…

I updated the Server software in 10.9.5 but it made no difference. The only service I have running is File Sharing.

I should note that I have had this working on this machine sometime in the past (though it may have been a couple of months ago)

  • If I try to access the app from another machine, I still get the same error - so it’s not the browser but something in the server / TCP/IP stack chain.

  • The firewall is off.

  • If I enable web services in the Server app I can get a page from port 80.

I just found that if I move the debug port form 8080 to 8082 then it works… but I can’t find what might be conflicting with port 8080…

any idea how I can find what is using that port?

Should I see an error/ exception somewhere in the app if it can’t open port 8080?

thanks for your help

Steve

On Windows I’d use netstat -b, perhaps there’s an OSX equivalent?

To see all ports with something actively listening:

sudo lsof -nP -iTCP -sTCP:LISTEN

This works on 10.9, not sure about versions before that.

OK, I figured it out. Thanks for everyone’s help.

Turns out in was the Phone Amego app which talks to my desk phone on port 8080.

So…

  1. 8080 is a pretty common alternate web port. Perhaps debugging shouldn’t use it as well?

  2. Perhaps more important… how can I tell when this happens? Should the IDE warn me that the port is in use? Did an event fire in the app that I didn’t catch?

[quote=142007:@Steve Upton]OK, I figured it out. Thanks for everyone’s help.
Turns out in was the Phone Amego app which talks to my desk phone on port 8080.
[/quote]
Nice to see you found it and that it really was, as Greg said, “something else”
its quite possible that the port in use can be detected & reported
Here the app just fails to start in debug mode when the port is already used

Not sure what you mean by “here”. On my machine the app launched fine and I had to ‘stop’ it in the IDE. (2014.2.1)

That behavior certainly contributed to my confusion.

“Here” as in “here in my house on my machine”

I’m told this is a known bug and has been fixed for a future release

ah. cool. OK, thanks.