Giter Club home page Giter Club logo

Comments (5)

Songtronix avatar Songtronix commented on July 26, 2024 1

Just confirmed. Without using the Agent everything works as expected. Incase it matters we use Caddy as SSL Proxy infront of our Authentication. I'm not even sure if we want to use Agent as the auth connection will only be used once per login into the gameserver.

from ureq.

algesten avatar algesten commented on July 26, 2024 1

@Songtronix @xMAC94x Thanks for your help in this! I'm going to close this specific issue since I captured what's going on in #124

from ureq.

jsha avatar jsha commented on July 26, 2024

from ureq.

xMAC94x avatar xMAC94x commented on July 26, 2024

Hi @jsha relevant snippet of code isn't that easy as we only detected it for our full setup. Let me try to explain:

Veloren_Gameserver +
+  ^               +----------------->   HTTPS Proxy(Caddy)  +------->  Authentication Server
|  |
|  |                                      ^
v  +                                      |
Veloren_Client  +-------------------------+

We have our Gameserver and our Client, that tries to connect to the Gameserver to join a normal multiplayer game.
In the cloud we have a central authentication server behind a HTTPS Reverse proxy.
Both the Veloren_Client and Veloren_Gameserver need to access the Authentication Server for the login procedure. Both are using ureq as a client while we use rouille as the Authentication server.

We noticed that the server can get reproduceable a syntetic error. I spend yesterday to improve our error Reporting so that it's easier to test for you :)
The relevant code (that runs in both Veloren_Client and Veloren_Gameserver) is this: https://gitlab.com/veloren/auth/-/blob/93c5819c502bd912cca6fc2fff9d9817564b1de1/authc/src/lib.rs
It's doing all the ureq code we have.

If you want to reproduce the error for yourself, clone our game repository: https://gitlab.com/veloren/veloren/ and start it with cargo run. you have to create yourself an account at https://account.veloren.net/ (just some dummy values, but remember it good, as we don't have a email recovery yet).

In the game now execute the following steps

  1. enter pftclan.de as server address and enter username and pass
  2. click the Multiplayer button.
    2a. It works and you come to an character screen: Logout and wait 5 minutes (use a clock to be sure it's 5 mins) and repeat step 2.
    2b: You get an error "Auth error on server: Request failed, connection error with text Failed to read status line". Where Failed to Read Status line is the ureq error. continue!
  3. Login again, NOW it will work guranteed. You see the character screen
  4. Logout again.
  5. Wait 5 minutes(use a clock).
  6. Jump to step 2. and repeat. (you will get the same error again, guaranteed).

The fact that we only get the error after 5 mins, leads us to the hint that it might be a timeout killing the HTTPS connection which then leading to a read status line error. But we are no experts here. (the same ureq::Agent is reused from here: https://gitlab.com/veloren/veloren/-/blob/master/server/src/login_provider.rs)
We would be super happy if you can verify the behavior yourself and can confirm that it's some strange bug.
Have a nice day :)

from ureq.

algesten avatar algesten commented on July 26, 2024

@xMAC94x Thanks for the very detailed report!

It sounds like we might have a bug in ureq::Agent where a pooled connection fails after lying dormant in the Agent for a while.

Just to verify that theory, could you temporarily stop using an Agent and just use ureq::get/ureq::post etc at each call site to cut out the pooling?

from ureq.

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.