@codingfishman anyproxy --port 8001,然后另起终端,anyproxy --port 8080,就报错。 Caught exception: Error: listen EADDRINUSE :::8002 at Object._errnoException (util.js:1024:11) at _exceptionWithHostPort (util.js:1046:20) at Server.setupListenHandle [as _listen2] (net.js:1351:14) at listenInCluster (net.js:1392:12) at Server.listen (net.js:1476:7) at Function.listen (/usr/local/lib/node_modules/anyproxy/node_modules/_express@ 4.16.2@express /lib/application.js:618:24) at /usr/local/lib/node_modules/anyproxy/lib/webInterface.js:145:26 at Object._plugIntoWebinterface (/usr/local/lib/node_modules/anyproxy/lib/rule_default.js:178:9) at new webInterface (/usr/local/lib/node_modules/anyproxy/lib/webInterface.js:144:18) at /usr/local/lib/node_modules/anyproxy/proxy.js:172:46
@WonderfulLing anyproxy --port 8001,然后另起终端,anyproxy --port 8080,就报错。 Caught exception: Error: listen EADDRINUSE :::8002 at Object._errnoException (util.js:1024:11) at _exceptionWithHostPort (util.js:1046:20) at Server.setupListenHandle [as _listen2] (net.js:1351:14) at listenInCluster (net.js:1392:12) at Server.listen (net.js:1476:7) at Function.listen (/usr/local/lib/node_modules/anyproxy/node_modules/_express@ 4.16.2@express /lib/application.js:618:24) at /usr/local/lib/node_modules/anyproxy/lib/webInterface.js:145:26 at Object._plugIntoWebinterface (/usr/local/lib/node_modules/anyproxy/lib/rule_default.js:178:9) at new webInterface (/usr/local/lib/node_modules/anyproxy/lib/webInterface.js:144:18) at /usr/local/lib/node_modules/anyproxy/proxy.js:172:46
9条答案
按热度按时间aelbi1ox1#
可以啊,指定端口就可以啊
xmakbtuz2#
@chenlei-123 通过在启动参数里面指定不同的端口即可启动多个任务
8wigbo563#
@codingfishman
anyproxy --port 8001,然后另起终端,anyproxy --port 8080,就报错。
Caught exception: Error: listen EADDRINUSE :::8002
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at Server.listen (net.js:1476:7)
at Function.listen (/usr/local/lib/node_modules/anyproxy/node_modules/_express@ 4.16.2@express /lib/application.js:618:24)
at /usr/local/lib/node_modules/anyproxy/lib/webInterface.js:145:26
at Object._plugIntoWebinterface (/usr/local/lib/node_modules/anyproxy/lib/rule_default.js:178:9)
at new webInterface (/usr/local/lib/node_modules/anyproxy/lib/webInterface.js:144:18)
at /usr/local/lib/node_modules/anyproxy/proxy.js:172:46
idv4meu84#
@WonderfulLing
anyproxy --port 8001,然后另起终端,anyproxy --port 8080,就报错。
Caught exception: Error: listen EADDRINUSE :::8002
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at Server.listen (net.js:1476:7)
at Function.listen (/usr/local/lib/node_modules/anyproxy/node_modules/_express@ 4.16.2@express /lib/application.js:618:24)
at /usr/local/lib/node_modules/anyproxy/lib/webInterface.js:145:26
at Object._plugIntoWebinterface (/usr/local/lib/node_modules/anyproxy/lib/rule_default.js:178:9)
at new webInterface (/usr/local/lib/node_modules/anyproxy/lib/webInterface.js:144:18)
at /usr/local/lib/node_modules/anyproxy/proxy.js:172:46
j2cgzkjk5#
anyproxy -p XXX -w XXX
需要指定webport
jxct1oxe6#
@WonderfulLing
还是不行啊
anyproxy -p 8001 -w 8002,另起终端,anyproxy -p 9001 -w 9002,还是报错
Caught exception: Error: listen EADDRINUSE 0.0.0.0:8003
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at doListen (net.js:1501:7)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
goqiplq27#
换到4.X的版本吧,wsport是随机的
htrmnn0y8#
@chenlei-123
使用4.0版后不需要再配置wsport,如果需要使用3.x,通过命令行启动会遇到端口冲突,你可以通过模块直接使用,指定port,webport和wsport即可,如下:
4.0相比3.x版本,rule接口上做了一些变更,如果你方便迁移的话,推荐使用4.0
zc0qhyus9#
anyproxy -p -w -e -i