mschnitzer / ark-survival-ascended-linux-container-image

A docker/podman container that is able to run an ARK: Survival Ascended on a Linux host.
85 stars 17 forks source link

Error when attempting to exec rcon commands #29

Closed Slatenhaus closed 6 months ago

Slatenhaus commented 10 months ago

I'm receiving this error when trying to pass RCON commands as shown in your documentation. I'm not sure what would be causing this.

root@arksrv:/var/lib/asa-server# docker exec asa-server-TheIsland asa-ctrl rcon --exec 'saveworld' /usr/share/asa-ctrl/rcon/rcon.rb:25:in send_packet!': undefined methodbytesize' for an instance of Array (NoMethodError)

  packet = Packet.new(10+data.bytesize, 0, packet_id, data)
                             ^^^^^^^^^
    from /usr/share/asa-ctrl/rcon/rcon.rb:20:in `authenticate!'
    from /usr/share/asa-ctrl/rcon/rcon.rb:14:in `exec_command!'
    from /usr/share/asa-ctrl/cli/interfaces/rcon_interface.rb:20:in `run_command!'
    from /usr/share/asa-ctrl/cli/interfaces/rcon_interface.rb:12:in `execute!'
    from /usr/share/asa-ctrl/cli/interfaces/rcon_interface.rb:7:in `initialize'
    from /usr/bin/asa-ctrl:28:in `new'
    from /usr/bin/asa-ctrl:28:in `block (2 levels) in <main>'
    from /usr/lib64/ruby/gems/3.3.0+0/gems/slop-4.10.1/lib/slop/option.rb:66:in `ensure_call'
    from /usr/lib64/ruby/gems/3.3.0+0/gems/slop-4.10.1/lib/slop/parser.rb:117:in `process'
    from /usr/lib64/ruby/gems/3.3.0+0/gems/slop-4.10.1/lib/slop/parser.rb:124:in `try_process'
    from /usr/lib64/ruby/gems/3.3.0+0/gems/slop-4.10.1/lib/slop/parser.rb:59:in `block in parse'
    from /usr/lib64/ruby/gems/3.3.0+0/gems/slop-4.10.1/lib/slop/parser.rb:49:in `each'
    from /usr/lib64/ruby/gems/3.3.0+0/gems/slop-4.10.1/lib/slop/parser.rb:49:in `each_with_index'
    from /usr/lib64/ruby/gems/3.3.0+0/gems/slop-4.10.1/lib/slop/parser.rb:49:in `parse'
    from /usr/lib64/ruby/gems/3.3.0+0/gems/slop-4.10.1/lib/slop/options.rb:76:in `parse'
    from /usr/lib64/ruby/gems/3.3.0+0/gems/slop-4.10.1/lib/slop.rb:23:in `parse'
    from /usr/bin/asa-ctrl:21:in `<main>'
mschnitzer commented 10 months ago

I need some more information on this:

For how long was the server up and running when you performed the command? Do you have RCONEnabled set to True? If so, where? Where's your RCON password specified? Did you change the RCON port? If so, where did you change it?

Slatenhaus commented 10 months ago

Server was up and running for several days for configuration with several restarts for troubleshooting. RCON was tested at various time intervals.

RCON is enabled and the port and password is specified in the proper location in GameUserSettings.ini.

[ServerSettings] RCONEnabled=True ServerAdminPassword=password RCONPort=27020

It looks like it's not creating the /usr/bin/asa-ctrl or /usr/lib64/ruby folders. They don't exist.

mschnitzer commented 10 months ago

It looks like it's not creating the /usr/bin/asa-ctrl or /usr/lib64/ruby folders. They don't exist.

They seem to exist, otherwise you wouldn't be able to get this stack trace. Those directories can only be accessed from within the container.

ServerAdminPassword=password

Does your password have any special characters or spaces? Please try it with a simple password like "s3adudu1ad" and keep it in the range of 8-12 chars. Not sure what password requirements ASA has.

Slatenhaus commented 10 months ago

Thank you for the help. I didn't realize the ruby was contained in the container so I was searching the host, my bad. And my decades of complex password experience failed me. That was the cause of the problem; the password was too complex. A simple password is working just fine.

mschnitzer commented 10 months ago

I suspected that, however I think asa-ctrl should catch this case. I will leave this issue open to address it in a future release.

mschnitzer commented 6 months ago

I'm unable to reproduce this issue. I tried it with really complex passwords (even whitespaces in between). All commands are executing successfully. In case you want to share with me the password you used (given that you only tried using it on that server and not for anything else), feel free to reach out to me using the mail on my GitHub profile.