Итак, у меня на локальном хосте есть программа, на которой запущен сервер: 1234, и при запуске моей программы сервер завершает подключение к порту 1234, но продолжает прослушивать порт 3000, как и предполагалось. Релевантный консольный журнал:
xmickellx@DESKTOP-JJ707K1:/mnt/c/users/mickell/desktop/Cypher-Network$ npm run dev
> cypher-network@0.0.0 dev /mnt/c/users/mickell/desktop/Cypher-Network
> npm run dev-client & npm run start-redis && cross-env ENV='development' nodemon index.js
> cypher-network@0.0.0 start-redis /mnt/c/users/mickell/desktop/Cypher-Network
> redis-server --daemonize yes
> cypher-network@0.0.0 dev-client /mnt/c/users/mickell/desktop/Cypher-Network
> npm run clean && parcel client/src/index.html --out-dir client/dist
7672:C 01 Mar 23:29:56.314 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
7672:C 01 Mar 23:29:56.315 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=7672, just started
7672:C 01 Mar 23:29:56.315 # Configuration loaded
> cypher-network@0.0.0 clean /mnt/c/users/mickell/desktop/Cypher-Network
> rm -rf .cache client/dist
[nodemon] 1.18.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node index.js`
Server running at http://localhost:1234
⠴ Building Well.js...listening at localhost:3000
Message received. Channel: BLO
при первом подключении вот так ... Но затем происходит сбой и прослушивается только порт 3000. Далее в длинный консольный журнал:
⠸ Building _classof.js...[nodemon] restarting due to changes...
⠼ Packaging...[nodemon] starting `node index.js`
⠦ Building hmr-runtime.js...[nodemon] restarting due to changes...
[nodemon] starting `node index.js`
✨ Built in 16.78s.
listening at localhost:3000
I сделал basi c te lnet cmd, чтобы проверить, не перегружен ли порт чем-то другим, и это выскочило ...
C:\Users\Mickell>telnet mickell 1234
'telnet' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Mickell>telnet mickell 1234
Connecting To mickell...Could not open connection to the host, on port 1234: Connect failed
Я крайне не осведомлен о вещах, когда речь идет о серверной стороне развитие, если кто-нибудь может помочь, это было бы здорово!
РЕДАКТИРОВАТЬ:
При запуске команды redis-cli, это где Redis подключен к .. 127.0.0.1:6379> Может быть, это может быть проблема?
РЕДАКТИРОВАТЬ:
npm run start
> cypher-network@0.0.0 start /mnt/c/users/mickell/desktop/Cypher-Network
> npm run build-client && node index.js
> cypher-network@0.0.0 build-client /mnt/c/users/mickell/desktop/Cypher-Network
> npm run clean && parcel build client/src/index.html --out-dir client/dist
> cypher-network@0.0.0 clean /mnt/c/users/mickell/desktop/Cypher-Network
> rm -rf .cache client/dist
✨ Built in 32.79s.
client/dist/src.a1dc3d06.js.map ⚠️ 1.19 MB 429ms
client/dist/src.a1dc3d06.js 512.27 KB 25.56s
client/dist/logo.04580eb6.png 50.84 KB 14.24s
client/dist/src.e852c4ed.css.map 957 B 5ms
client/dist/index.html 454 B 6.61s
client/dist/src.e852c4ed.css 454 B 17.15s
listening at localhost:3000
events.js:174
throw er; // Unhandled 'error' event
^
Error: Redis connection to ec2-34-225-229-4.compute-1.amazonaws.com:19289 failed - connect ECONNREFUSED 34.225.229.4:19289
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
Emitted 'error' event at:
at RedisClient.on_error (/mnt/c/users/mickell/desktop/Cypher-Network/node_modules/redis/index.js:406:14)
at Socket.<anonymous> (/mnt/c/users/mickell/desktop/Cypher-Network/node_modules/redis/index.js:279:14)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypher-network@0.0.0 start: `npm run build-client && node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cypher-network@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/xmickellx/.npm/_logs/2020-03-03T05_10_16_605Z-debug.log
xmickellx@DESKTOP-JJ707K1:/mnt/c/users/mickell/desktop/Cypher-Network$