Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors retrieving app info #52

Closed
denizkoekden opened this issue Oct 11, 2024 · 11 comments
Closed

Errors retrieving app info #52

denizkoekden opened this issue Oct 11, 2024 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@denizkoekden
Copy link

Hello,
the selfhosted aswell as the hosted version at steamcmd.net is not working since today.

I get the following output in the Console:

web-1 | [2024-10-11 10:06:46 +0000] [1] [INFO] Starting gunicorn 22.0.0 web-1 | [2024-10-11 10:06:46 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1) web-1 | [2024-10-11 10:06:46 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker web-1 | [2024-10-11 10:06:46 +0000] [6] [INFO] Booting worker with pid: 6 web-1 | [2024-10-11 10:06:46 +0000] [7] [INFO] Booting worker with pid: 7 web-1 | [2024-10-11 10:06:47 +0000] [8] [INFO] Booting worker with pid: 8 web-1 | [2024-10-11 10:06:47 +0000] [9] [INFO] Booting worker with pid: 9 web-1 | [2024-10-11 10:06:48 +0000] [7] [INFO] Started server process [7] web-1 | [2024-10-11 10:06:48 +0000] [7] [INFO] Waiting for application startup. web-1 | [2024-10-11 10:06:48 +0000] [7] [INFO] Application startup complete. web-1 | [2024-10-11 10:06:48 +0000] [6] [INFO] Started server process [6] web-1 | [2024-10-11 10:06:48 +0000] [6] [INFO] Waiting for application startup. web-1 | [2024-10-11 10:06:48 +0000] [6] [INFO] Application startup complete. web-1 | [2024-10-11 10:06:48 +0000] [8] [INFO] Started server process [8] web-1 | [2024-10-11 10:06:48 +0000] [8] [INFO] Waiting for application startup. web-1 | [2024-10-11 10:06:48 +0000] [8] [INFO] Application startup complete. web-1 | [2024-10-11 10:06:48 +0000] [9] [INFO] Started server process [9] web-1 | [2024-10-11 10:06:48 +0000] [9] [INFO] Waiting for application startup. web-1 | [2024-10-11 10:06:48 +0000] [9] [INFO] Application startup complete. web-1 | level=INFO msg="Requested app info" app_id=2089300 web-1 | level=INFO msg="App info could not be found in cache" app_id=2089300 web-1 | level=INFO msg="Started requesting app info" app_id=2089300 web-1 | level=INFO msg="Retrieving app info from steamclient" app_id=2089300 retry_count=0 web-1 | level=WARNING msg="Encountered timeout when trying to connect to steam api. Retrying.." web-1 | level=INFO msg="Retrieving app info from steamclient" app_id=2089300 retry_count=1 web-1 | level=WARNING msg="Encountered timeout when trying to connect to steam api. Retrying.." web-1 | level=ERROR msg="Max connect retries exceeded" connect_retries=2 web-1 | level=ERROR msg="Failed in retrieving app info" app_id=2089300 web-1 | level=ERROR msg="Max connect retries (2) exceeded" app_id=2089300 web-1 | level=INFO msg="The SteamCMD backend returned no actual data and failed" app_id=2089300

@jonakoudijs
Copy link
Member

jonakoudijs commented Oct 11, 2024

Thank you for reporting and the extra information. Much appreciated.

I was already afraid that this would be the case. It seems that the steam Python module is not working properly. Maybe Valve changed something on their side.

Sadly I am not available now for further debugging. Tomorrow afternoon I will have a look (if it’s not already fixes by then)

@denizkoekden
Copy link
Author

Okay. I will look into this issue. Maybe I can find an easy fix for this Problem.

@denizkoekden
Copy link
Author

I did some debugging and I even tried it with "client.login("USER", "PASSWORD" but it seems like the Steam Client always stays offline. I did some prints and printed the client variable and thats what I got back.

`INFO: Application startup complete.

  • Debug - Lets go
  • Debug - We are in the 0 try...
    Initialising Steam Client...
    <SteamClient(None) offline>
    Logging in with user...
    <SteamClient(('155.133.226.75', 27022)) offline>
    Set Client to verbose_Debug True...
    <SteamClient(('155.133.226.75', 27022)) offline>
    Getting App Info from SteamCMD...
    level=WARNING msg="Encountered timeout when trying to connect to steam api. Retrying.."
  • Debug - We are in the 1 try...
    Initialising Steam Client...
    <SteamClient(None) offline>
    Logging in with user...
    <SteamClient(('155.133.226.75', 27028)) offline>
    Set Client to verbose_Debug True...
    <SteamClient(('155.133.226.75', 27028)) offline>
    Getting App Info from SteamCMD...
    level=WARNING msg="Encountered timeout when trying to connect to steam api. Retrying.."
    level=ERROR msg="Max connect retries exceeded" connect_retries=2`

@jonakoudijs
Copy link
Member

Thanks for debugging. The issue is flagged in the steam module repository: ValvePython/steam#474. Hopefully someone finds the problem there and we can fix it soon.

@Olrik-WP
Copy link

Same problem thx for help waiting for fix

@jonakoudijs jonakoudijs changed the title Not working ATM Errors retrieving app info Oct 11, 2024
@jonakoudijs jonakoudijs added the bug Something isn't working label Oct 11, 2024
@jonakoudijs jonakoudijs self-assigned this Oct 11, 2024
@denizkoekden
Copy link
Author

Here’s a temporary fix for the issue. I’m not submitting a PR or anything, as I hope this will be resolved within a few days.

The Issue:
It seems that the old connection method used by the ValvePython/steam package has become unreliable.

The Solution:
Switching to WebSocket resolves the problem. There’s already a PR addressing this: #469.

My Approach:
You can check out what I did here: Commit.
I’m using the branch from the PR and included it in the requirements.txt instead of the official package. I also changed the connection method in the client object.

Additionally, I had to modify the requirements.txt to build a working Docker image (not entirely sure why).

I’ve also created and pushed a ready-to-use Docker image that works for me: denizkoekden/steamcmd-api.

You can use it just like the one from jonakoudijs:

docker run -p 8000:8000 -d denizkoekden/steamcmd-api:latest

I’m using it with Redis in a docker-compose.yaml file like this:

services:
  web:
    image: denizkoekden/steamcmd-api:latest
    ports:
      - "8000:8000"
    environment:
      VERSION: 1.0.0
      CACHE: "True"
      CACHE_TYPE: "redis"
      CACHE_EXPIRATION: 120
      REDIS_HOST: redis
      REDIS_PORT: 6379
      LOG_LEVEL: "info"
      PYTHONUNBUFFERED: "1"
    restart: always

  redis:
    image: "redis:6.0"

For now, my scripts are working again.

@jonakoudijs
Copy link
Member

Hi Deniz, that is great work! I deployed your image on the production environment of api.steamcmd.net and it seems to work like a charm. Good stuff.

And I assume this will be resolved in the steam Python module soon as you mentioned. I will use your image for now and will keep a close eye on this issue and the other related ones.

@Olrik-WP
Copy link

Olrik-WP commented Oct 14, 2024

Hi Deniz, thanks for your awesome work i use your docker image in test environment and every thing is working well can I use it in my production environment ?

https://hub.docker.com/r/denizkoekden/steamcmd-api

@denizkoekden
Copy link
Author

Hello,
of course you can. After all I just ductaped everything I found together, to get it working again ^^

@Olrik-WP
Copy link

ok thank you very much for your response you saved my application I take this opportunity to thank the developers of the API

@jonakoudijs
Copy link
Member

The original issue seems to have been fixed for the time being. The latest version of steamcmd/api (v1.14.0) is working as expected and is now the active image again running in production on api.steamcmd.net.

This needs improvements for the future but seeing the issue is mitigated for now and changes in the steamcmd library are tracked in this issue: ValvePython/steam#469, I am closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants