Problem with web socket with my external API

When I test with the api locally it works, but when I put it on the server, it always gives the error “adonis: websocket join error packet”

does anyone know how to solve this ??

connection code in the client application:

        var whats
        const ws = Ws('ws://algo.com.br:21447')
        const token = Auth.getToken()
        ws.withJwtToken(token).connect()

        whats = ws.getSubscription('whatsapp') || ws.subscribe('whatsapp')

Hello!

What is your server listening on? It’s the same port and is server set to listen for 0.0.0.0?
Do you have any proxies?