tlaverdure / laravel-echo-server

Socket.io server for Laravel Echo
MIT License
2.64k stars 509 forks source link

SSL Connection ERR_CONNECTION_TIMED_OUT #565

Open magic-thomas opened 3 years ago

magic-thomas commented 3 years ago

Sorry for this. This might not be a bug.

But I can not find any clue on search, I need help.

my app runs properly in local env, but not in real server with ssl.

Nginx is being used.

I have this error.

GET https://mydomain.com:6001/socket.io/socket.io.js net::ERR_CONNECTION_TIMED_OUT

I can not even connect socket server .

no Firewall, No network problem .

// laravel-echo-server.json


{
    "authHost": "https://mydomain.com/",
    "authEndpoint": "/api/broadcasting/auth",
    "clients": [],
    "database": "redis",
    "databaseConfig": {
        "redis": {},
        "sqlite": {
            "databasePath": "/database/laravel-echo-server.sqlite"
        }
    },
    "devMode": true,
    "host": null,
    "port": "6001",
    "protocol": "https",
    "socketio": {},
    "secureOptions": 67108864,
    "sslCertPath": "/mydomain.pem",
    "sslKeyPath": "/mydomain.key",
    "sslCertChainPath": "",
    "sslPassphrase": "",
    "subscribers": {
        "https": true,
        "redis": true
    },
    "apiOriginAllow": {
        "allowCors": true,
        "allowOrigin": "*",
        "allowMethods": "GET, POST",
        "allowHeaders": "Origin, Content-Type, X-Auth-Token, X-Requested-With, Accept, Authorization, X-CSRF-TOKEN, X-Socket-Id"
    }
}
`
``

please help me out .
N3XT0R commented 3 years ago

looks like your subscribers config is not correct.

Https isn't available as subscriber.

https://github.com/tlaverdure/laravel-echo-server/tree/master/src/subscribers

already tried to change your "https" subscriber to http and let the rest of the config untouched?