ryansheehan / terraria

Dockerfile for terraria
MIT License
294 stars 104 forks source link

Some issue starting ur container #46

Closed SakiiR closed 4 years ago

SakiiR commented 4 years ago

Hey,

Here is the stacktrace I receive when running ur container:

erraria_1           | Copying plugins...
terraria_1           | Environment WORLD_FILENAME specified
terraria_1           | Loading to world myworld.wld...
terraria_1           | cp: cannot stat '/plugins/*': No such file or directory
terraria_1           | Error Logging Enabled.
terraria_1           | TerrariaAPI Version: 2.1.0.0 (Protocol v1.4.0.4 (228), OTAPI 1.4.0.4)
terraria_1           | [TShock] Info Config path has been set to /root/.local/share/Terraria/Worlds
terraria_1           | [TShock] Info Log path has been set to /tshock/logs
terraria_1           | TShock 4.4.0.0 (Go to sleep Patrikkk, Icy, Chris, Death, Axeel, Zaicon, hakusaro, Zack, and Yoraiz0r <3) now running.
terraria_1           | AutoSave Enabled
terraria_1           | Backups Disabled
terraria_1           | Welcome to TShock for Terraria!
terraria_1           | TShock comes with no warranty & is free software.
terraria_1           | You can modify & distribute it under the terms of the GNU GPLv3.
terraria_1           | [Server API] Info Plugin TShock v4.4.0.0 (by The TShock Team) initiated.
terraria_1           | Server crash: 6/7/2020 11:19:48 AM
terraria_1           | System.NullReferenceException: Object reference not set to an instance of an object
terraria_1           |   at Terraria.Main.DedServ () [0x00a07] in <369575e6d12f4f6eaab9caefb2264450>:0
terraria_1           |   at Terraria.Program.LaunchGame (System.String[] args, System.Boolean monoArgs) [0x000ac] in <369575e6d12f4f6eaab9caefb2264450>:0
terraria_1           |
terraria_1           | Please send crashlog.txt to support@terraria.org
terraria_1           | newenv_terraria_1 exited with code 0
 0% 0!  Jun 07 11:19:49 newenv @ 5199f7 →

Docker-compose service entry:

    terraria:
        build:
            context: './terraria'
        volumes:
            - "./volumes/terraria/worlds:/root/.local/share/Terraria/Worlds"
            - "./volumes/terraria/logs:/tshock/logs"
            - "./volumes/terraria/plugins:/plugins"
        environment:
            - WORLD_FILENAME=myworld.wld
        ports:
            - '7777:7777'
Klemen1337 commented 4 years ago

I have the same issue.

Starting container, CMD: ./TerrariaServer -x64 -config /config/serverconfig.txt -banlist /config/banlist.txt -world /config/world.wld ./run.sh
Error Logging Enabled.
]0;Terraria Server v1.4.0.5Terraria Server v1.4.0.5
Server crash: 6/8/2020 6:56:14 PM
System.NullReferenceException: Object reference not set to an instance of an object
  at Terraria.Main.WriteFancyWorldLoadErrorToConsole () [0x00005] in <0ebea07e9a804a06a9f1dd17904b9c9c>:0 
  at Terraria.Main.DedServ () [0x00b21] in <0ebea07e9a804a06a9f1dd17904b9c9c>:0 
  at Terraria.Program.LaunchGame (System.String[] args, System.Boolean monoArgs) [0x000ac] in <0ebea07e9a804a06a9f1dd17904b9c9c>:0 
Please send crashlog.txt to support@terraria.org
ryansheehan commented 4 years ago

This looks like an issue with TShock crashing. They recently unwound a decision they made a while back to eliminate the -worldpath. I may be able to simplify the container again. I suspect the errors you're seeing involve this issue. I'll try and take a look.

ryansheehan commented 4 years ago

Does the WORLD_FILENAME specified in the environment variable actually exist in the directory you're voluming?

Also so we are clear. This is a world generated by 1.4.0.5, or is it older?

SakiiR commented 4 years ago

yeap, everything is in order ryan ;) (and it works)

This is what I am using for now:

docker-compose.yml

terraria:
build:
context: './terraria'
volumes:
- "./volumes/terraria/worlds:/root/.local/share/Terraria/Worlds"
- "./volumes/terraria/logs:/tshock/logs"
- "./volumes/terraria/plugins:/plugins"
ports:
- '7777:7777'

Dockerfile


FROM debian:latest

RUN apt update && apt install -y mono-complete unzip wget && \ wget 'https://github.com/Pryaxis/TShock/releases/download/v4.4.0-pre11/TShock4.4.0_Pre11_Terraria1.4.0.5.zip' -O /tmp/tshock.zip && \ mkdir -p /usr/src/app && \ cd /usr/src/app && \ unzip /tmp/tshock.zip && \ mkdir -p /tshock/logs

CMD mono /usr/src/app/TerrariaServer.exe -logpath "/tshock/logs" -world "/root/.local/share/Terraria/Worlds/myworld.wld"

SakiiR commented 4 years ago

-wordpath you said ? it works with -world

ryansheehan commented 4 years ago

-worldpath was removed by the tshock team, they added an equivalent, but I haven't had a chance to try it out much. I was running into issues last night, but I haven't had a chance to deep dive into it yet.

On Tue, Jun 9, 2020 at 1:50 AM SakiiR notifications@github.com wrote:

-wordpath you said ? it works with -world

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ryansheehan/terraria/issues/46#issuecomment-641070863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB46ERZDFCWPHVESIIOHQH3RVXLSJANCNFSM4NXDR4UA .

SakiiR commented 4 years ago

Thanks for your quick answers, my alternative works for now so let's wait :)