Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QWebSocketServer newConnection works in console but not as service?



  • Hello,

    I'm using Qt 5.1 on 64bit Windows. I have a basic web-sockets client-server app which when running in a command prompt everything works well. my call to QWebSocketServer::Listen(QHostAddress::Any, 9987) succeeds, and I connect the signal to a slot:

       connect(m_pWebSocketServer, &QWebSocketServer::newConnection,
                this, &MyWebsocketServer::onNewConnection);
    

    Then when the client side connects, the onNewConnection executes on the server and everything works as I'd expect.

    However, when I run the same code on the server as a windows service (running as LocalSystem), onNewConnection never hits. Logging shows that Listen() succeeds. But the incoming connection request seems to be ignored.

    I've completely disabled all firewalls and this problem persists. Not sure where to look.
    (this may not even be a Qt question?)

    Any thoughts/insights as to what I might be doing wrong?

    Thanks



  • The issue was related to OpenSSL DLLs.
    Using Qt5.15 and OpenSSL v1.1 (which has a new naming convention for the DLLs) everything started working properly.


Log in to reply