我试图制作自己的CS:GO赌博网站。我已经使用VPS在localhost上完成了它。这次我有一个域名,几乎一切都很好。问题是当我想运行site.js时出现这个错误:
[erzis@s1]:</usr/home/erzis/bot>$ node site.js
[2017-01-05 13:04:26.731] [TRACE] [default] - Strange error
[2017-01-05 13:04:26.734] [DEBUG] [default] - { [Error: listen EPERM 0.0.0.0:8000]
code: 'EPERM',
errno: 'EPERM',
syscall: 'listen',
address: '0.0.0.0'
port: 8000 }
Error: listen EPERM 0.0.0.0:8000
at Object.exports._errnoException (util.js:873:11)
at exports._exceptionWithHostPort (util.js:896:20)
at Server._listen2 (net.js:1237:19)
at listen (net.js:1286:10)
at Server.listen (net.js:1382:5)
at Server.listen.Server.attach (/usr/home/erzis/node_modules/socket.io/lib/index.js:228:9)
at new Server (/usr/home/erzis/node_modules/socket.io/lib/index.js:52:17)
at Server (/usr/home/erzis/node_modules/socket.io/lib/index.js:40:41)
at Object.<anonymous> (/usr/home/erzis/bot/site.js:3:30)
at Module._compile (module.js:409:26)
[2017-01-05 13:04:26.758] [INFO] [default] - DB Connection ID: 15865731
[2017-01-05 13:04:26.759] [INFO] [default] - DB Connection ID: 15865732
[2017-01-05 13:04:26.759] [INFO] [default] - DB Connection ID: 15865733
[2017-01-05 13:04:26.761] [TRACE] [default] - Roll 4130
[2017-01-05 13:04:26.761] [INFO] [default] - DB Connection ID: 15865734
[2017-01-05 13:04:26.762] [TRACE] [default] - Sucesfully updated history
[2017-01-05 13:04:26.762] [WARN] [default] - Loaded hashd8b710dfa2c8a3d990ca1dc7cc0a91754ac20aa6139fb7f6d44b58ee31ece8dc
[2017-01-05 13:04:27.789] [TRACE] [default] - New prices loaded
[2017-01-05 13:04:29.728] [TRACE] [default] - Strange error
[2017-01-05 13:04:29.729] [DEBUG] [default] - { [Error: listen EPERM 0.0.0.0:8080]
code: 'EPERM',
errno: 'EPERM',
syscall: 'listen',
address: '0.0.0.0',
port: 8080 }
Error: listen EPERM 0.0.0.0:8080
at Object.exports._errnoException (util.js:873:11)
at exports._exceptionWithHostPort (util.js:896:20)
at Server._listen2 (net.js:1237:19)
at listen (net.js:1286:10)
at Server.listen (net.js:1382:5)
at Server.listen.Server.attach (/usr/home/erzis/node_modules/socket.io/lib/index.js:228:9)
at null._onTimeout (/usr/home/erzis/bot/site.js:618:29)
at Timer.listOnTimeout (timers.js:92:15)
我查看了互联网,我找到的唯一答案是该端口被锁定。所以我将它改为80,但它仍然没有工作。
我认为这可能与此域名和端口有关,但我并不确定。
答案 0 :(得分:0)
你没有权限听取0.0.0.0:8080。检查您是否必须侦听特定接口,或者是否有任何内容正在侦听端口8080上。
Error: listen EPERM 0.0.0.0:8080
尝试使用netcat侦听端口8080(如果你有shell访问权限):nc -l 8080
检查这是你自己的权限或应用程序本身的问题。