Coder Social home page Coder Social logo

Comments (23)

winneec avatar winneec commented on May 13, 2024 2

对不起, 我真的不知道如何再次运行它。

我使用此存储库: https://github.com/joshk0/docker-quakelive-server

server.sh是运行的包装器,它反过来运行下面的命令,这是,就我所看到的,已经是蒸汽游戏本身的一部分。所以我不知道怎么把 SteamAPI. init () 更改为 GameServer. init ()?我应该联系维护者吗?他会知道该怎么做吗?run_server_x64_minql.sh

export LD_PRELOAD=$LD_PRELOAD:./minqlx.x64.so,
LD_LIBRARY_PATH="./linux64:$LD_LIBRARY_PATH" exec ./qzeroded.x64 "$@",

[S_API失败]SteamAPI_Init() 失败; SteamAPI_IsSteamRunning() 失败., dlopen 尝试加载失败:, steamclient.so,错误:, steamclient.so: 无法打开共享对象文件: 没有这样的文件或目录, [S_API FAIL] SteamAPI_Init() 失败;无法找到正在运行的 Steam 实例或本地steamclient.so。

Please try to use this to temporarily solve this problem.
export LD_LIBRARY_PATH=/home/steam/steamcmd/linux32:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/steam/steamcmd/linux64:$LD_LIBRARY_PATH

from steamcmd.

CM2Walki avatar CM2Walki commented on May 13, 2024 1

No worries. I have the exact same problem with the dedicated server I'm developing for my game right now. I'm investigating it.

from steamcmd.

CM2Walki avatar CM2Walki commented on May 13, 2024

It's been some time since I last worked on a HL1 server, but I remember that it could be looking for the steamclient.so in the place where HLDSUpdateTool used to have it which is in "~/.steam/sdk32/steamclient.so", which this image provides for see:

&& ln -s \"${STEAMCMDDIR}/linux32/steamclient.so\" \"${HOMEDIR}/.steam/sdk32/steamclient.so\" \

Can you double check if it exists in your container?

$ ls /home/steam/.steam/sdk32/steamclient.so

If it doesn't exists, then we need to find where it's looking for it somehow.

from steamcmd.

winneec avatar winneec commented on May 13, 2024

/home/steam/.steam/sdk32/steamclient.so

There is indeed this file in this path, but it is still prompted that there is no such file. This is where I am puzzled

from steamcmd.

winneec avatar winneec commented on May 13, 2024

The problem is solved, only need to add an environment variable.
export LD_LIBRARY_PATH=~./steam/sdk32:$LD_LIBRARY_PATH

from steamcmd.

CM2Walki avatar CM2Walki commented on May 13, 2024

Oh, that's nice. Would you consider opening a pull request for this?

from steamcmd.

winneec avatar winneec commented on May 13, 2024

Yes, but I still need to do some testing to make sure this is the correct solution.

from steamcmd.

CM2Walki avatar CM2Walki commented on May 13, 2024

Ah, even better. Thanks for taking care of this :)!

from steamcmd.

CM2Walki avatar CM2Walki commented on May 13, 2024

Closed by #17

from steamcmd.

CM2Walki avatar CM2Walki commented on May 13, 2024

Reopening, because "LD_LIBRARY_PATH" pointing to the 32 bit version of the steamclient.so causes problems for applications relying on steamclient.so 64 bit.

Reverted #17 using #18.

from steamcmd.

CM2Walki avatar CM2Walki commented on May 13, 2024

As a workaround, I'd recommend you set the variable yourself in your higher layer image for now. Until we can figure out at which path the hl1 servers are looking for the binary.

from steamcmd.

winneec avatar winneec commented on May 13, 2024

Well, I ignored this problem, and this problem can only be solved by setting different temporary environment variables according to different applications.

from steamcmd.

winneec avatar winneec commented on May 13, 2024

Maybe it can be changed like this:
export LD_LIBRARY_PATH=/home/steam/steamcmd/linux32:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/steam/steamcmd/linux64:$LD_LIBRARY_PATH
Use two or only 64-bit.
My test conditions are limited,I can't guarantee that it has no problems.
Need a lot of applications to test whether this is feasible.
I'm trying to solve this problem, I feel sorry for this problem.

from steamcmd.

CM2Walki avatar CM2Walki commented on May 13, 2024

I was considering offering two versions of the image (32bit & 64bit).

EDIT:
According to this:
https://stackoverflow.com/questions/1706328/how-do-shared-libraries-work-in-a-mixed-64bit-32bit-system

Your approach should work, too. I'll give it a go.

from steamcmd.

h4de5 avatar h4de5 commented on May 13, 2024

having a similar problem with my quale live dedicated server.

during start:

[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.,
dlopen failed trying to load:,
steamclient.so,
with error:,
steamclient.so: cannot open shared object file: No such file or directory,
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.,

during build:

Warning: failed to init SDL thread priority manager: SDL not found

from steamcmd.

CM2Walki avatar CM2Walki commented on May 13, 2024

Alright. I was able to fix the issue in my dedicated server. To sum it up:

[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.

In my case was caused by unintentional usage of SteamAPI.Init() (Steamworks.NET) in a dedicated server. This essentially tried to load the "client-side" version of the API, which requires an active steam client session in the background (which is also the only true workaround to the issue). The correct way of initializing a server that uses SteamCMD is using GameServer.Init(). Since I was the developer, I also addressed the issue...

Practically, you can probably ignore the issue. LinuxGSM, agrees on this matter, at least in regards to SteamCMD. If the dedicated server you are hosting is correctly responding to A2S Queries and all other Steam integrations (lobby system, p2p networking over Steam) are working as expected you should be fine to do so.

So this covers the part you can't really do anything about. You might be able to suppress the issue by trying to put the SteamCMD's steamclient.so in the location the server is looking for. The way I managed to find these paths comes from this thread. Launch your binary using strace -f -o /tmp/file [binaryname], then search for steamclient.so in /tmp/file. Place the steamclient.so (32 or 64 bit) from SteamCMD in the locations that complain about "File not found".
This usually suppresses the issue, however the true way of fixing it would be from the side of the developer.

Let me know if you managed to progress on your specific game server use-cases @h4de5 @Marieyr, it's unlikely that I will be able to do anything else from my side.

from steamcmd.

winneec avatar winneec commented on May 13, 2024

I understand, thank you very much.

from steamcmd.

h4de5 avatar h4de5 commented on May 13, 2024

I am sorry - I don't really understand how to get it running again.

I use this repo: https://github.com/joshk0/docker-quakelive-server

server.sh is a wrapper for running run_server_x64_minql.sh which in turn runs the command below, which is, as far as I can see, already part of the steam game itself. So I don't know how to change SteamAPI.Init() to GameServer.Init() ? Should I contact the maintainer? would he know what to do?

export LD_PRELOAD=$LD_PRELOAD:./minqlx.x64.so,
LD_LIBRARY_PATH="./linux64:$LD_LIBRARY_PATH" exec ./qzeroded.x64 "$@",

[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.,
dlopen failed trying to load:,
steamclient.so,
with error:,
steamclient.so: cannot open shared object file: No such file or directory,
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.,

from steamcmd.

h4de5 avatar h4de5 commented on May 13, 2024

@Marieyr the quake live container is starting now :) thanks to everyone!

There seems to be no more startup errors - but I still cannot connect :( so i guess there must be something else wrong with it.

from steamcmd.

CM2Walki avatar CM2Walki commented on May 13, 2024

docker run -p 27960:27960/udp --link redis -d --name ql -e name="Test Server" -e admin="12345" dpadgett/ql-docker

If you still use this launch command, then you are not opening enough ports, since in your Dockerfile it says:

# ports to connect to: 27960 is udp and tcp, 28960 is tcp
EXPOSE 27960 28960

You are only opening udp in your docker run. Usually the initial server connection is done via tcp (client details etc), then udp is used for game traffic (positions, rotations etc.).

from steamcmd.

h4de5 avatar h4de5 commented on May 13, 2024

using my own docker-compose - which worked for quiet a while - but stopped like a week ago:

version: "3.3"
services:
  ql-docker:
    ports:
      - "27960:27960/udp"
      - "27960:27960/tcp"
      - "28960:28960/tcp"
    container_name: quakelive
    environment:
      - "location=Europe"
      - "tags=ffa,ctf,instagib,ca,Europe,125fps"
      - "admin=xxxx"
    build:
      context: ./docker-quakelive-server
    image: quakelive:latest
    sysctls:
      - net.ipv6.conf.all.disable_ipv6=1

from steamcmd.

CM2Walki avatar CM2Walki commented on May 13, 2024

I reintroduced two symlinks in #20. Can you try it again?

from steamcmd.

h4de5 avatar h4de5 commented on May 13, 2024

it did work for me prior to this - not sure what actually caused the problem, but after some restarts and rebuilds the server is available for at least two weeks again.

from steamcmd.

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.