为什么 Laravel-echo-server 尝试连接到错误的服务器?
why does Laravel-echo-server try to connect to the wrong server?
我尝试使用 init 命令设置 laravel-echo-server,当我尝试使用 laravel-echo-server start
启动它时,我得到以下输出:
L A R A V E L E C H O S E R V E R
version 1.3.8
⚠ Starting server in DEV mode...
✔ Running at localhost on port 6001
✔ Channels are ready.
✔ Listening for http events...
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
等等。我真的不知道为什么它会尝试连接到 127.0.0.1,即使我在配置中另有说明。这是 laravel-echo-server.json:
{
"authHost": "https://mydomain.test",
"authEndpoint": "/broadcasting/auth",
"clients": [
{
"appId": "myid",
"key": "mykey"
}
],
"database": "redis",
"databaseConfig": {
"redis": {
"port": "6379",
"host": "mydomain.test"
},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": true,
"host": null,
"port": "6001",
"protocol": "https",
"socketio": {},
"sslCertPath": "/etc/ssl/crt.crt",
"sslKeyPath": "/etc/ssl/key.key",
"sslCertChainPath": "",
"sslPassphrase": "",
"apiOriginAllow": {
"allowCors": false,
"allowOrigin": "",
"allowMethods": "",
"allowHeaders": ""
}
}
我在这里做错了什么?我找不到有类似问题的人(也许是因为它太明显了?)但我真的不明白为什么它不尝试连接到 https://mydomain.test:6379 而是连接到 127.0.0.1
在此先感谢大家,如果您需要更多代码,请告诉我。
您 Laravel Echo 安装正在尝试连接到 Redis 服务器。您需要安装并配置 Redis 或使用其他 Laravel 广播驱动程序
我尝试使用 init 命令设置 laravel-echo-server,当我尝试使用 laravel-echo-server start
启动它时,我得到以下输出:
L A R A V E L E C H O S E R V E R
version 1.3.8
⚠ Starting server in DEV mode...
✔ Running at localhost on port 6001
✔ Channels are ready.
✔ Listening for http events...
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
等等。我真的不知道为什么它会尝试连接到 127.0.0.1,即使我在配置中另有说明。这是 laravel-echo-server.json:
{
"authHost": "https://mydomain.test",
"authEndpoint": "/broadcasting/auth",
"clients": [
{
"appId": "myid",
"key": "mykey"
}
],
"database": "redis",
"databaseConfig": {
"redis": {
"port": "6379",
"host": "mydomain.test"
},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": true,
"host": null,
"port": "6001",
"protocol": "https",
"socketio": {},
"sslCertPath": "/etc/ssl/crt.crt",
"sslKeyPath": "/etc/ssl/key.key",
"sslCertChainPath": "",
"sslPassphrase": "",
"apiOriginAllow": {
"allowCors": false,
"allowOrigin": "",
"allowMethods": "",
"allowHeaders": ""
}
}
我在这里做错了什么?我找不到有类似问题的人(也许是因为它太明显了?)但我真的不明白为什么它不尝试连接到 https://mydomain.test:6379 而是连接到 127.0.0.1
在此先感谢大家,如果您需要更多代码,请告诉我。
您 Laravel Echo 安装正在尝试连接到 Redis 服务器。您需要安装并配置 Redis 或使用其他 Laravel 广播驱动程序