lifx-http icon indicating copy to clipboard operation
lifx-http copied to clipboard

Ubuntu install

Open garethds opened this issue 12 years ago • 8 comments

I am having issues running lifx-http on Ubuntu 13.10 Server. Here is the error I am getting

lifx-http

lifx-http can be reached at http://lifx-http.local:56780/ [2014-05-03 15:14:24] INFO WEBrick 1.3.1 [2014-05-03 15:14:24] INFO ruby 2.0.0 (2013-08-29) [x86_64-linux-gnu] [2014-05-03 15:14:24] WARN TCPServer Error: Address already in use - bind(2) [2014-05-03 15:14:24] INFO WEBrick::HTTPServer#start: pid=20303 port=56780

uname -a

Linux NAS 3.11.0-20-generic #34-Ubuntu SMP Tue Apr 1 20:40:25 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

ruby --version

ruby 2.0.0p299 (2013-08-29) [x86_64-linux-gnu]

lsof shows nothing when the service is not running.

lsof -wni tcp:56780

garethds avatar May 03 '14 05:05 garethds

Try netstat -tulnp?

dhallgb avatar May 17 '14 09:05 dhallgb

When running and there is nothing listening when I kill the process

netstat -tulnp | grep 5678

tcp 0 0 0.0.0.0:56780 0.0.0.0:* LISTEN 17260/ruby2.0

garethds avatar May 18 '14 21:05 garethds

What happens if you run netstat -tulnp | grep 56700?

chendo avatar May 19 '14 02:05 chendo

netstat -tulnp | grep 56700

udp 0 0 0.0.0.0:56700 0.0.0.0:* 28434/ruby2.0

On Mon, May 19, 2014 at 12:20 PM, Jack Chen [email protected]:

What happens if you run netstat -tulnp | grep 56700?

— Reply to this email directly or view it on GitHubhttps://github.com/chendo/lifx-http/issues/9#issuecomment-43461520 .

garethds avatar May 19 '14 12:05 garethds

What is that process doing? It's holding on to a port that's used for communicating with the bulbs. If you kill that process, you should be able to run lifx-http

chendo avatar May 19 '14 13:05 chendo

I see this same error message (also on Ubuntu 14.04). netstat -tulnp | grep 56700 shows nothing though, and it appears the server is running.

When I issue the curl commands from another terminal, the terminal with lifx-http running in the foreground does seem to acknowledge them, e.g.

running

curl http://localhost:56780/lights.json
curl -XPUT http://localhost:56780/lights/all/toggle -d ''

shows in the foreground lifx-http terminal:

 - - [06/Sep/2014:05:11:06 UTC] "GET /lights.json HTTP/1.1" 200 2
- -> /lights.json

 - - [06/Sep/2014:05:15:47 UTC] "PUT /lights/all/toggle HTTP/1.1" 200 2
- -> /lights/all/toggle

but in the terminal where I execute these curl commands the only thing I get back is an empty json string [], and the light does not toggle.

cboettig avatar Sep 06 '14 05:09 cboettig

Same here.

user@htpc:~$ sudo netstat -tulnp | grep ruby tcp 0 0 127.0.0.1:56780 0.0.0.0:* LISTEN 17608/ruby2.2 udp 0 0 0.0.0.0:40257 0.0.0.0:* 17608/ruby2.2 udp 0 0 0.0.0.0:56700 0.0.0.0:* 17608/ruby2.2 udp 0 0 0.0.0.0:56750 0.0.0.0:* 17608/ruby2.2 udp 0 0 0.0.0.0:49357 0.0.0.0:* 17608/ruby2.2 udp 0 0 0.0.0.0:54183 0.0.0.0:* 17608/ruby2.2 udp 0 0 0.0.0.0:5353 0.0.0.0:* 17608/ruby2.2

I think the answer is here: http://stackoverflow.com/questions/16118971/cannot-access-sinatra-app-through-the-local-network

Bit I don't know how to apply this to lifx-http.

CWempe avatar Jan 15 '15 15:01 CWempe

I found a good work around. https://github.com/chendo/lifx-http/issues/14#issuecomment-69872986 I won't call it a solution though.

Looks like this issue and issue #14 (https://github.com/chendo/lifx-http/issues/14) are the same.

CWempe avatar Jan 15 '15 20:01 CWempe