Can't start laravel-echo-server using Supervisor
Asked Answered
H

2

5

If I manually run laravel-echo-server - it works fine. But I can't run laravel-echo-server using supervisor: i'm getting error on frontend

GET http://example.com:6001/socket.io/EIO=3&transport=polling&t=MO25vx0net::ERR_CONNECTION_TIMED_OUT

echoserver.log has been created but always empty

I've tried to restart and update supervisor, using sudo

/etc/supervisord.conf:

 [program:echo-server]
    command=/usr/bin/laravel-echo-server start
    dierctory=/var/www/www-root/data/www/example.com
    autostart=true
    user=root
    autorestart=true
    stdout_logfile=/var/www/www-root/data/www/example.com/storage/logs/echoserver.log

laravel-echo-server.json:

{
    "authHost": "http://example.com",
    "authEndpoint": "/broadcasting/auth",
    "clients": [
        {
            "appId": "fe0ee01ccace98c",
            "key": "1138421388769fdbbf88293eb329c16a"
        }
    ],
    "database": "redis",
    "databaseConfig": {
        "redis": {
            "port": "6379",
            "host": "localhost"
        },
        "sqlite": {
            "databasePath": "/database/laravel-echo-server.sqlite"
        }
    },
    "devMode": true,
    "host": null,
    "port": "6001",
    "protocol": "http",
    "socketio": {},
    "sslCertPath": "",
    "sslKeyPath": "",
    "sslCertChainPath": "",
    "sslPassphrase": "",
    "subscribers": {
        "http": true,
        "redis": true
    },
    "apiOriginAllow": {
        "allowCors": false,
        "allowOrigin": "",
        "allowMethods": "",
        "allowHeaders": ""
    }
}
Handrail answered 25/1, 2019 at 15:50 Comment(0)
H
6

The problem solved by replacing this

command=/usr/bin/laravel-echo-server start

to this

command=/usr/bin/laravel-echo-server start --dir=/var/www/www-root/data/www/example.com
Handrail answered 26/1, 2019 at 9:12 Comment(0)
S
5

You have a typo in your configuration for directory.

dierctory=/var/www/www-root/data/www/example.com
 ^^^

# It should be:
directory=/var/www/www-root/data/www/example.com`
Syrian answered 18/8, 2020 at 9:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.