Giter VIP home page Giter VIP logo

Comments (9)

solidDoWant avatar solidDoWant commented on August 11, 2024 1

I'm getting a similar issue with RCON mode enabled. I've filed a fix PR here: #8. Would you mind cutting a new release if you approve and merge this PR?

@Nerus87 if you are trying to use RCON mode as your issue would indicate then you'll need to set servers.<server name>.mode: RCON as shown below:

---
options:
  connectTimeout: 5s
  cacheExpiration: 20s
  cacheCleanupInterval: 12s
servers:
  insurgency:
    address: MY_SERVER_ADDRESS
    rconPassword: MY_RCON_PASSWORD
    mode: RCON

from srcds_exporter.

galexrt avatar galexrt commented on August 11, 2024 1

@solidDoWant I have created a new release, in a few minutes the v1.6.0 release should be available.

from srcds_exporter.

galexrt avatar galexrt commented on August 11, 2024

@Nerus87 Is that with the current latest code from main branch? The version is not set properly so I can't tell.

If you are building locally, I would recommend using make build which uses the promu tool to set up the version info during the build.

What game is that? Are you starting to use the exporter or have you been already running before successfully?

from srcds_exporter.

Nerus87 avatar Nerus87 commented on August 11, 2024

I didn't build the app, I've just used the last release https://github.com/galexrt/srcds_exporter/releases/tag/v1.4.2
I'm using it for the first time, so I didn't have any other experience with it.
The game is Counter-Strike: Source.

from srcds_exporter.

solidDoWant avatar solidDoWant commented on August 11, 2024

I'm getting the same issue with Insurgency. I can confirm that other rcon clients can connect without error from within the container. Here's the output with debug logging:

/ # /bin/srcds_exporter --config.file /srcds.yaml --log-level debug
INFO[0000] Starting srcds_exporter (version=, branch=, revision=e15457e518bb299fa36bd9bdf1a0ca9aabfda9fa)
INFO[0000] Build context (go=go1.18.10, platform=linux/amd64, user=, date=)
INFO[0000] Caching is disabled by default
DEBU[0000] Connected to server: 127.0.0.1:27015
INFO[0000] Loaded config file
INFO[0000] Enabled collectors:
INFO[0000]  - map
INFO[0000]  - playercount
INFO[0000] Listening on :9137
DEBU[0001] Waiting for collectors
ERRO[0001] got panic while connecting to server, reconnecting  server=insurgency
DEBU[0001] playercount collector succeeded after 0.000025s.
ERRO[0001] got panic while connecting to server, reconnecting  server=insurgency
DEBU[0001] map collector succeeded after 0.000046s.
DEBU[0001] Finished waiting for collectors
DEBU[0001] Updated lastCollectTime to 2023-08-15 04:44:02.854651593 +0000 UTC m=+1.577396704
DEBU[0001] Waiting for outgoing Adapter
DEBU[0001] Finished pushing metrics from metricsCh to outgoingCh
DEBU[0001] Finished waiting for outgoing Adapter

Could you add the error reported by recover() to the log message? This would help users determine what the error is.

from srcds_exporter.

galexrt avatar galexrt commented on August 11, 2024

@solidDoWant I have pushed a commit to main that should log the panic/error message now. Are you able to build from the repo or want me to create a release with that change?

from srcds_exporter.

solidDoWant avatar solidDoWant commented on August 11, 2024

@galexrt thanks for the change. I built it locally, but FYI I am unable to build a container image via make docker as the dockerfile depends on a non-existent .build directory.

Here's the output when running locally with the latest code from master:

time="2023-08-15T15:15:24-05:00" level=info msg="Starting srcds_exporter (version=, branch=, revision=cf3ed98aebf599d3e2a06bb1fdc090f8ffd14231-modified)"
time="2023-08-15T15:15:24-05:00" level=info msg="Build context (go=go1.21.0, platform=linux/amd64, user=, date=)"
time="2023-08-15T15:15:24-05:00" level=info msg="Caching is disabled by default"
time="2023-08-15T15:15:24-05:00" level=debug msg="Connected to server: 10.44.0.12:27015"
time="2023-08-15T15:15:24-05:00" level=info msg="Loaded config file"
time="2023-08-15T15:15:24-05:00" level=info msg="Enabled collectors:"
time="2023-08-15T15:15:24-05:00" level=info msg=" - playercount"
time="2023-08-15T15:15:24-05:00" level=info msg=" - map"
time="2023-08-15T15:15:24-05:00" level=info msg="Listening on :9137"
time="2023-08-15T15:15:26-05:00" level=debug msg="Waiting for collectors"
time="2023-08-15T15:15:26-05:00" level=error msg="got panic while connecting to server, reconnecting: runtime error: invalid memory address or nil pointer dereference" server=insurgency
time="2023-08-15T15:15:26-05:00" level=debug msg="map collector succeeded after 0.000045s."
time="2023-08-15T15:15:26-05:00" level=error msg="got panic while connecting to server, reconnecting: runtime error: invalid memory address or nil pointer dereference" server=insurgency
time="2023-08-15T15:15:26-05:00" level=debug msg="playercount collector succeeded after 0.000589s."
time="2023-08-15T15:15:26-05:00" level=debug msg="Finished waiting for collectors"
time="2023-08-15T15:15:26-05:00" level=debug msg="Updated lastCollectTime to 2023-08-15 15:15:26.3835836 -0500 CDT m=+1.931926383"
time="2023-08-15T15:15:26-05:00" level=debug msg="Waiting for outgoing Adapter"
time="2023-08-15T15:15:26-05:00" level=debug msg="Finished pushing metrics from metricsCh to outgoingCh"
time="2023-08-15T15:15:26-05:00" level=debug msg="Finished waiting for outgoing Adapter"

from srcds_exporter.

solidDoWant avatar solidDoWant commented on August 11, 2024

Regarding this issue (with ServerQuery instead of RCON mode), Golang is reporting that the UDP connection to the server is closed when this call is made in the underlying serverquery library. That being said, I can confirm via packet capture that the Source server does in fact send the server info back to the exporter client, so I'm not sure why the connection is being prematurely closed.

from srcds_exporter.

galexrt avatar galexrt commented on August 11, 2024

Has the v1.6.0 release resolved your issue? If not, please comment and I'll reopen the issue.

from srcds_exporter.

Related Issues (8)

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.