ostinelli / gin

A LUA fast, low-latency, low-memory footprint, web JSON-API framework with Test Driven Development helpers and patterns.
MIT License
238 stars 35 forks source link

Can't running gin server after installed #32

Closed cpselvis closed 8 years ago

cpselvis commented 8 years ago

I have installed luarockes as lua package manager and follow installation step as your document describes. Then I run commands as follows:

~ gin new demo
~ cd demo
~ gin start

After that, I get a error prompt like: ERROR: Could not start Gin app on port 7200 (is it running already?).

So, anything wrong?

cpselvis commented 8 years ago

Eh, My lua version is 5.2.4 and luajit is 2.0.4. I don't know wether it is compatiable.

idevz commented 8 years ago

@cpselvis you can run like

gin start --trace

for more information.

jtarchie commented 8 years ago

@cpselvis, based on the error message. It sounds like you actually might have something else bound to the port number 7200.

Perhaps:

Try lsof -i :7200 or ps aux | grep gin for more information.

cpselvis commented 8 years ago

Ahh, I did all my operation after restart my computer and it still cause that issue yesterday.

And I follow your tips just now, it still can't get to the point:

➜  demo lsof -i:7200
COMMAND  PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
nginx   1206 hellfire    7u  IPv4 0xb8664bd65c3f527d      0t0  TCP *:fodms (LISTEN)
nginx   1207 hellfire    7u  IPv4 0xb8664bd65c3f527d      0t0  TCP *:fodms (LISTEN)
nginx   1208 hellfire    7u  IPv4 0xb8664bd65c3f527d      0t0  TCP *:fodms (LISTEN)
nginx   1209 hellfire    7u  IPv4 0xb8664bd65c3f527d      0t0  TCP *:fodms (LISTEN)
nginx   1210 hellfire    7u  IPv4 0xb8664bd65c3f527d      0t0  TCP *:fodms (LISTEN)
➜  demo kill -9 1206 1207 1208 1209 1210
➜  demo lsof -i:7200
➜  demo gin start --trace
nginx   -p `pwd`/ -c tmp/development-nginx.conf
nginx: [alert] lua_code_cache is off; this will hurt performance in /Users/hellfire/test/demo/tmp/development-nginx.conf:21
ERROR: Could not start Gin app on port 7200 (is it running already?).
➜  demo lsof -i:7200
COMMAND  PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
nginx   5360 hellfire    7u  IPv4 0xb8664bd66b557ced      0t0  TCP *:fodms (LISTEN)
nginx   5361 hellfire    7u  IPv4 0xb8664bd66b557ced      0t0  TCP *:fodms (LISTEN)
nginx   5362 hellfire    7u  IPv4 0xb8664bd66b557ced      0t0  TCP *:fodms (LISTEN)
nginx   5363 hellfire    7u  IPv4 0xb8664bd66b557ced      0t0  TCP *:fodms (LISTEN)
nginx   5364 hellfire    7u  IPv4 0xb8664bd66b557ced      0t0  TCP *:fodms (LISTEN)

Sounds strange.

ostinelli commented 8 years ago

Hello, Gin is to be used with Lua 5.1 as per the specs. Can you see if this works for you?

ostinelli commented 8 years ago

No follow up, closing.