Error in connection establishment

Por favor, preencha todos os campos abaixo para que nós possamos ajudar você. Obs.: você deve indicar seu nome de domínio para receber ajuda. Os nomes de domínio dos certificados emitidos são divulgados nos logs da Transparência de Certificados (por exemplo, https://crt.sh/?q=example.com). Assim, não indicar seu nome de domínio não o mantém em segredo, mas torna a nossa ajuda mais difícil.

Posso ler respostas em inglês: sim

Meu nome de domínio é: bitextrading.com

Executei esse comando: wss://api.bitextrading.com:3000/subscriptions

Produziu essa saída: client.js:653 WebSocket connection to ‘wss://api.bitextrading.com:3000/subscriptions’ failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR

Meu servidor web é (com versão): 18.04

O sistema operacional no meu servidor web é (com versão): ubuntu bionic64

O serviço de hospedagem do meu site (se aplicável) é: Amazon

Posso acessar um shell root na minha máquina (sim ou não, ou não sei): sim

Uso um painel de controle para administrar meu site (não, ou indique o nome e a versão do painel de controle): sim, da amazon

Hi @renatodevops

the web socket protocol (ws and wss) starts with a http or a https connection and uses the upgrade header to switch to the ws or wss protocol.

So your ws port must answer like a http port, your wss port must answer like a https port.

But checking your port 3000 there isn't the expected https - https://check-your-website.server-daten.de/?q=api.bitextrading.com:3000

Instead, there is a regular http answer:

Domainname Http-Status redirect Sec. G
http://api.bitextrading.com:3000/
52.41.32.58 404 Html is minified: 100,00 % 0.363 M
Not Found
https://api.bitextrading.com:3000/
52.41.32.58 -4 0.693 W
SendFailure - The underlying connection was closed: An unexpected error occurred on a send.

http status 404 - Not found.

The port must have a certificate and the same configuration as a https port.

Hi @JuergenAuer
Thanks for watching my issue.
On https this service answer on the URL https://api.bitextrading/api, I’m not using the port 3000, I’m using a upstream and proxy-reverse in the server with nginx.

Checking api.bitextrading.com there is no problem visible - https://check-your-website.server-daten.de/?q=api.bitextrading.com

There is a valid Letsencrypt certificate:

CN=api.bitextrading.com
	23.09.2019
	22.12.2019
expires in 66 days	api.bitextrading.com - 1 entry