alinmear / docker-conanexiles

A docker container to easily provision and manage a conanexiles dedicated server using wine
MIT License
105 stars 74 forks source link

Conan exiles server files ? #27

Closed thiphariel closed 6 years ago

thiphariel commented 6 years ago

Hi. Sorry for the noob question, but how does you boot the server with your Dockerfile ? I tried a docker-compose up where the docker-compose.yml is located but I got many errors and the server won't boot.

I don't understand if your script downloads by itself all server files or if I need to have them and add the folder into a volume.

Again, sorry if the question is stupid :D

Thanks.

Here are the logs :

Starting docker-conanexiles_conanexiles0_1 ... done
Attaching to docker-conanexiles_conanexiles0_1
conanexiles0_1  | >> WARN: Failed to connect to redis instance - redis:6379. Skipping redis call: redis_set_master_server_instance
conanexiles0_1  |
conanexiles0_1  | gzip: stdin: unexpected end of file
conanexiles0_1  | tar: Child returned status 1
conanexiles0_1  | tar: Error is not recoverable: exiting now
conanexiles0_1  | /usr/lib/python2.7/dist-packages/supervisor/options.py:297: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
conanexiles0_1  |   'Supervisord is running as root and it is searching '
conanexiles0_1  | 2018-07-23 12:52:29,562 CRIT Supervisor running as root (no user in config file)
conanexiles0_1  | 2018-07-23 12:52:29,562 WARN Included extra file "/etc/supervisor/conf.d/conanexiles.conf" during parsing
conanexiles0_1  | Unlinking stale socket /var/run/supervisor.sock
conanexiles0_1  | 2018-07-23 12:52:29,876 INFO RPC interface 'supervisor' initialized
conanexiles0_1  | 2018-07-23 12:52:29,876 CRIT Server 'unix_http_server' running without any HTTP authentication checking
conanexiles0_1  | 2018-07-23 12:52:29,876 INFO supervisord started with pid 137
conanexiles0_1  | 2018-07-23 12:52:30,879 INFO spawned: 'conanexilesController' with pid 146
conanexiles0_1  | >> INFO: Mode: Master - Instance: 2568666cdfda
conanexiles0_1  | >> WARN: No binaries found. Doing a fresh installation
conanexiles0_1  | 2018-07-23 12:52:31,890 INFO success: conanexilesController entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
conanexiles0_1  | >> WARN: Failed to connect to redis instance - redis:6379. Skipping redis call: redis_set_update_running_start
conanexiles0_1  | 2018-07-23 12:52:51,113 INFO spawned: 'conanexilesUpdate' with pid 153
conanexiles0_1  | 2018-07-23 12:52:51,118 INFO exited: conanexilesUpdate (exit status 127; not expected)
conanexiles0_1  | 2018-07-23 12:52:52,120 INFO spawned: 'conanexilesUpdate' with pid 154
conanexiles0_1  | 2018-07-23 12:52:52,127 INFO exited: conanexilesUpdate (exit status 127; not expected)
conanexiles0_1  | conanexilesUpdate: ERROR (spawn error)
conanexiles0_1  | Info: Updated to build () successfully.
conanexiles0_1  | 2018-07-23 12:52:54,261 INFO spawned: 'conanexilesUpdate' with pid 176
conanexiles0_1  | 2018-07-23 12:52:54,269 INFO exited: conanexilesUpdate (exit status 127; not expected)
conanexiles0_1  | 2018-07-23 12:52:57,274 INFO spawned: 'conanexilesUpdate' with pid 177
conanexiles0_1  | 2018-07-23 12:52:57,281 INFO exited: conanexilesUpdate (exit status 127; not expected)
conanexiles0_1  | 2018-07-23 12:52:58,282 INFO gave up: conanexilesUpdate entered FATAL state, too many start retries too quickly
conanexiles0_1  | >> WARN: Failed to connect to redis instance - redis:6379. Skipping redis call: redis_set_update_running_stop
conanexiles0_1  | 2018-07-23 12:53:13,473 INFO spawned: 'conanexilesServer' with pid 185
conanexiles0_1  | 2018-07-23 12:53:13,483 INFO exited: conanexilesServer (exit status 2; not expected)
conanexiles0_1  | 2018-07-23 12:53:14,486 INFO spawned: 'conanexilesServer' with pid 188
conanexiles0_1  | 2018-07-23 12:53:14,497 INFO exited: conanexilesServer (exit status 2; not expected)
conanexiles0_1  | conanexilesServer: ERROR (spawn error)
conanexiles0_1  | >> DEBUG: Initial installation finished.
conanexiles0_1  | conanexilesServer: ERROR (already started)
conanexiles0_1  | 2018-07-23 12:53:16,715 INFO spawned: 'conanexilesServer' with pid 213
conanexiles0_1  | 2018-07-23 12:53:16,726 INFO exited: conanexilesServer (exit status 2; not expected)
conanexiles0_1  | 2018-07-23 12:53:19,730 INFO spawned: 'conanexilesServer' with pid 214
conanexiles0_1  | 2018-07-23 12:53:19,743 INFO exited: conanexilesServer (exit status 2; not expected)
conanexiles0_1  | 2018-07-23 12:53:20,745 INFO gave up: conanexilesServer entered FATAL state, too many start retries too quickly
conanexiles0_1  | >> WARN: No binaries found. Doing a fresh installation
conanexiles0_1  | >> WARN: Failed to connect to redis instance - redis:6379. Skipping redis call: redis_set_update_running_start
conanexiles0_1  | 2018-07-23 12:58:35,946 INFO spawned: 'conanexilesUpdate' with pid 222
conanexiles0_1  | 2018-07-23 12:58:35,951 INFO exited: conanexilesUpdate (exit status 127; not expected)
conanexiles0_1  | 2018-07-23 12:58:36,954 INFO spawned: 'conanexilesUpdate' with pid 223
conanexiles0_1  | 2018-07-23 12:58:36,961 INFO exited: conanexilesUpdate (exit status 127; not expected)
conanexiles0_1  | conanexilesUpdate: ERROR (spawn error)
conanexiles0_1  | Info: Updated to build () successfully.
conanexiles0_1  | 2018-07-23 12:58:39,092 INFO spawned: 'conanexilesUpdate' with pid 245
conanexiles0_1  | 2018-07-23 12:58:39,100 INFO exited: conanexilesUpdate (exit status 127; not expected)
conanexiles0_1  | 2018-07-23 12:58:42,105 INFO spawned: 'conanexilesUpdate' with pid 246
conanexiles0_1  | 2018-07-23 12:58:42,112 INFO exited: conanexilesUpdate (exit status 127; not expected)
conanexiles0_1  | 2018-07-23 12:58:43,114 INFO gave up: conanexilesUpdate entered FATAL state, too many start retries too quickly
conanexiles0_1  | >> WARN: Failed to connect to redis instance - redis:6379. Skipping redis call: redis_set_update_running_stop
conanexiles0_1  | 2018-07-23 12:58:58,314 INFO spawned: 'conanexilesServer' with pid 254
conanexiles0_1  | 2018-07-23 12:58:58,323 INFO exited: conanexilesServer (exit status 2; not expected)
conanexiles0_1  | 2018-07-23 12:58:59,326 INFO spawned: 'conanexilesServer' with pid 257
conanexiles0_1  | 2018-07-23 12:58:59,337 INFO exited: conanexilesServer (exit status 2; not expected)
conanexiles0_1  | conanexilesServer: ERROR (spawn error)
conanexiles0_1  | >> DEBUG: Initial installation finished.
conanexiles0_1  | conanexilesServer: ERROR (already started)
conanexiles0_1  | 2018-07-23 12:59:01,558 INFO spawned: 'conanexilesServer' with pid 282
conanexiles0_1  | 2018-07-23 12:59:01,569 INFO exited: conanexilesServer (exit status 2; not expected)
conanexiles0_1  | 2018-07-23 12:59:04,574 INFO spawned: 'conanexilesServer' with pid 283
conanexiles0_1  | 2018-07-23 12:59:04,587 INFO exited: conanexilesServer (exit status 2; not expected)
conanexiles0_1  | 2018-07-23 12:59:05,589 INFO gave up: conanexilesServer entered FATAL state, too many start retries too quickly

And again and again ... :)

acelan commented 6 years ago

It fails to download the game. Try running this inside docker, you may see more logs bash /steamcmd/steamcmd.sh +runscript /install.txt

thiphariel commented 6 years ago

Allright I'll try ! Thanks

thiphariel commented 6 years ago

After checking in the docker direclty, my /steamcmd directory is empty... So I can't run steamcmd.sh ahah. Any idea about this ?

EDIT : Oh, my container seems not have acess to internet... SteamUpdater: Error: Steam needs to be online to update. Please confirm your network connection and try again. Should I give it some access ? If yes, how ?

If I edit /etc/resolv.conf I can connect through the Internet... But it's override when I reboot

EDIT 2 : Soooo, I edit /etc/resolv.conf to get internet, then I ran your command to install the game and it works. But my current setup is kinda not good ahah

Do you know why my container do not have access to internet by default ? Thanks

acelan commented 6 years ago

Not sure, but I don't think you have to edit /etc/resolv.conf. The settings should be passed from host. Maybe describe more how you start the docker and paste docker-compose.yml here for us to check.

thiphariel commented 6 years ago

I leave it as default for testons purpose (it’s from your fork, wanna try mods)

docker-compose up

version: '2'                                                                                 

services:                                                                                    
  conanexiles0:                                                                              
    image: alinmear/docker-conanexiles                                                       
    restart: always                                                                          
    environment:                                                                             
      - "CONANEXILES_ServerSettings_ServerSettings_AdminPassword=ThanksForThisSmartSolution" 
      - "CONANEXILES_Engine_OnlineSubSystemSteam_ServerName='My Cool Server'"                
      - "CONANEXILES_Engine_OnlineSubSystemSteam_ServerPassword=MySecret"                    
      - "CONANEXILES_INSTANCENAME=exiles0"                                                   
      - "CONANEXILES_Game_RconPlugin_RconEnabled=1"                                          
      - "CONANEXILES_Game_RconPlugin_RconPassword=REDACTED"                                  
      - "CONANEXILES_Game_RconPlugin_RconPort=25575"                                         
      - "CONANEXILES_Game_RconPlugin_RconMaxKarma=60"                                        
      - "CONANEXILES_Game_DiscordPlugin_Token=[DISCORD TOKEN]"                               
      - "CONANEXILES_Game_DiscordPlugin_Channel=[DISCORD CHANNEL ID]"                        
    ports:                                                                                   
        - 7777:7777/udp                                                                      
        - 7778:7778/udp                                                                      
        - 27015:27015/udp                                                                    
    volumes:                                                                                 
        - data:/conanexiles                                                                  

volumes:
    data:
        driver: local
acelan commented 6 years ago

Humm, the docker-compose.yml looks pretty simple, and should not introduce any errors. The issue may come from how you install your docker environment.

BTW, you can't launch the server that way if you want to use my fork, it doesn't work.

  1. run docker build -t conan_exiles_server . in "docker-conanexiles" directory(my fork)
  2. modify docker-compose.yml (suggest you to copy this file to other directory and modify it there) 2.1 set image: conan_exiles_server, instead of image: alinmear/docker-conanexiles 2.2 remove CONANEXILES_INSTANCENAME=exiles0, I didn't consider instances case, so I'm not sure if this instance name break anything. 2.3 if you don't use discrod, remove CONANEXILES_Game_DiscordPlugin_Token=[DISCORD TOKEN]

I paste my docker-compose.yml here for your reference

version: '2'

services:
  conanexiles:
    image: conan_exiles_server
    restart: always
    environment:
        - "CONANEXILES_Engine_OnlineSubSystemSteam_ServerName=[TW][AceLan] Conan Exiles Server"
        - "CONANEXILES_ServerSettings_ServerSettings_IsBattlEyeEnabled=True"
        - "CONANEXILES_ServerSettings_ServerSettings_ServerRegion=2"
        ...
    ports:
        - 7777:7777/udp
        - 7778:7778/udp
        - 27015:27015/udp
    volumes:
        - ./mydata:/conanexiles

  redis:
    image: redis:alpine
    restart: always
thiphariel commented 6 years ago

Ok so, it was really an internet thing problem. I add a default config to the docker daemon dns and everything is ok now. Thanks for your help :)

Thoughtscape2014 commented 4 years ago

Hey guys, I know its been a long time but I'm having some dramas with getting this to work. I've yet to implement Acelan's suggestion above so will advise once I've done that.

The thing I was curious about now was with respect to these lines:

  - "CONANEXILES_Game_DiscordPlugin_Token=[DISCORD TOKEN]"                               
  - "CONANEXILES_Game_DiscordPlugin_Channel=[DISCORD CHANNEL ID]" 

Is Token, the chatbot's url? Is Channel, the channel ID of the discord channel itself?

Also, regarding your docker-compose file:

volumes:
    - ./mydata:/conanexiles

Does that mean I have to mkdir a /mydata folder in my linux system. Is that like a link between the created folder and the docker container? If you could explain this I'd be greatly appreciative.

Cheers, more to follow (eventually)

Mick,

acelan commented 4 years ago
  1. No, the token is not webhook. Please check this page https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token
  2. Channel is the discord channel ID you want the forward the game message to.
  3. Yes, just create mydata directory before you run the docker the first time. This directory will be the game directory contains completely Conan Exiles and other data.