Open denizkoekden opened 3 weeks ago
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)
Okay. I will look into this issue. Maybe I can find an easy fix for this Problem.
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.
Thanks for debugging. The issue is flagged in the steam module repository: https://github.com/ValvePython/steam/issues/474. Hopefully someone finds the problem there and we can fix it soon.
Same problem thx for help waiting for fix
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.
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.
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 ?
Hello, of course you can. After all I just ductaped everything I found together, to get it working again ^^
ok thank you very much for your response you saved my application I take this opportunity to thank the developers of the API
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