Giter VIP home page Giter VIP logo

Comments (10)

tippexs avatar tippexs commented on August 30, 2024

Thanks for your honest feedback! We are ware of the current debugging capabilities and we are working on it making it better! Let's use this issue to identify challenges and what we can do to help you.

First of all, can you please share what OS and Unit Version you are using locally AND on your production server?
(Dev looks like MacOS)

Did you installed the Python Module using our Packages? On Dev and Prod?

Have you tried using certs and websockets on your local dev machine? Is this working? Are there any errors in the unit log? Have you tried to run Unit in debug-mode on Prod to get a more detailed log output?

The Unit debug binaries comes with your package (based on the OS you are using on Prod).

from unit.

acnebs avatar acnebs commented on August 30, 2024

Thanks for the quick reply. Dev is macOS, prod is Ubuntu 23.04. Using the official packages for Python support. Haven't tried using certs locally, will try that now to see how that goes. Didn't see anything of note in the unit log, but also am not running in debug-mode in prod, so can try that if I don't find anything from running SSL certs locally.

from unit.

ac000 avatar ac000 commented on August 30, 2024

Quick question. Are you using wss:// in production? does ws:// work there?

from unit.

acnebs avatar acnebs commented on August 30, 2024

We are indeed using wss:// in production, and ws:// locally. Have not tried to use ws:// in production, currently trying to get wss:// working locally first.

from unit.

acnebs avatar acnebs commented on August 30, 2024

EDIT: Ignore the below, misconfiguration on my end. I was able to get WebSockets working just fine locally with the wss:// scheme with a local SSL cert.

One thing I realized when doing this process, however, is that locally I am always specifying a port (5000), where as in production this value is implicit. Could it be that the port is somehow messing up here?

old comment

I can confirm that when running locally using SSL and the wss:// scheme, WebSockets break. The error I'm receiving in unit.log is:

2023/12/07 23:15:21 [error] 40486#6372577 *217 SSL_do_handshake(9) failed (1046: sslv3 alert certificate unknown) (OpenSSL: error:0A000416:SSL routines::sslv3 alert certificate unknown:SSL alert number 46)

I'd assumed this would be fine since AFAIK wss:// should be happening on port :443 as well, so the cert should be used by the listener for that just fine. But I guess maybe not?

from unit.

acnebs avatar acnebs commented on August 30, 2024

After messing around with the production environment and looking at the logs, I am actually seeing two errors repeatedly that definitely seem related:

2023/12/07 15:54:00 [info] 428141#428155 *735 websocket error 1001: Remote peer is going away

and

2023/12/07 15:54:08 [info] 428141#428155 *823 SSL_read(46, 7F2724245F48, 135) failed (104: Connection reset by peer)

from unit.

ac000 avatar ac000 commented on August 30, 2024

If you hit the thing with curl -v ... does that provide any useful messages?

You could try explicitly specifying :443 in the url, but that would seem a little bonkers if that actually worked...

from unit.

acnebs avatar acnebs commented on August 30, 2024

I might be a bit dense, but what do you want me to hit with verbose curl?

Tried specifying 443 explicitly, indeed did not seem to help.

from unit.

ac000 avatar ac000 commented on August 30, 2024

I might be a bit dense, but what do you want me to hit with verbose curl?

Yes, ignore me. Many years ago I wrote a websocket server and misremembered using curl to check the handshake stuff, it was most probably tcpdump/wireshark...

Tried specifying 443 explicitly, indeed did not seem to help.

This is likely going to need a reproducer app. Don't suppose you have a minimal example or a pointer to one?

from unit.

acnebs avatar acnebs commented on August 30, 2024

Yep, I will see if I can make a very simple repro in the next few days. Somewhat difficult because the websockets are working in dev, so it also might be an Ubuntu issue.

from unit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.