1. When making a thread, please tag your thread accordingly using the menu to the left of the textfield where you name your thread where applicable. Server Advertisements and Mod Releases should be contained to their respective subforums.

Server Discussion How to: Set up a linux server on ubuntu

Discussion in 'Multiplayer' started by sovredcat, Dec 4, 2013.

  1. marilio

    marilio Big Damn Hero

    Great guide. I had to add the linux 32 libraries, which I got from the STEAM cmd page. Other than that works perfectly.

    The only issue I'm having is that the server is getting "killed" at times.
     
  2. Jansen

    Jansen Aquatic Astronaut

    Killed by the linux kernel? Run "dmesg" and post the last 10 lines after it gets killed. Perhaps you have not enough memory.
     
  3. Flylowguy

    Flylowguy Void-Bound Voyager

    Hmmm. Getting the following error from ./launch_starbound_server.sh
    ./starbound_server: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

    EDIT: Installed the package libpng12-0 and it's good now.
     
    Last edited: Dec 7, 2013
  4. VlperX

    VlperX Intergalactic Tourist

    why is
    Code:
    app_update 211820
    taking SO LONG !?!?

    Code:
     App state (0x300502) downloading, progress: 1.08 (33140391 / 3066576978)
     App state (0x300502) downloading, progress: 1.08 (33141480 / 3066576978)
     App state (0x300502) downloading, progress: 1.08 (33144455 / 3066576978)
     App state (0x300502) downloading, progress: 1.08 (33147429 / 3066576978)
     App state (0x300502) downloading, progress: 1.08 (33149963 / 3066576978)
     App state (0x300502) downloading, progress: 1.08 (33156078 / 3066576978)
     App state (0x300502) downloading, progress: 1.08 (33158923 / 3066576978)
    
    It's been an hour now.
    It's as if I'm on dialup!
     
  5. AlCapwn

    AlCapwn Space Hobo

    Code:
    Info: Shutting down Star::Root
    Error: Fatal Exception Caught: NetworkException: Cannot bind socket on port 21025: Transport endpoint is not connected
    
    Anyone know how to fix this? I've already port forwarded TCP/UDP 21025
     
  6. Possemaster

    Possemaster Space Hobo

    HI Got this;


    ./starbound_server: /usr/local/lib/libpng12.so.0: no version information available (required by ./starbound_server)
    ./starbound_server: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ./starbound_server)
    ./starbound_server: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by ./starbound_server)
    ./starbound_server: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./starbound_server)


    What to do????
     
  7. Jansen

    Jansen Aquatic Astronaut

  8. jamiehutber

    jamiehutber Intergalactic Tourist

    Awesome, thanks guys for posting this :)

    One quick one, which I assume is easy to fix but, I've got everything running:
    Code:
    There is a screen on:
            9149.starbound  (07/12/13 13:47:03)    (Attached)
    1 Socket in /var/run/screen/S-root.
    
    I connect to xxx.xxx.xxx.xxx:9149 and it says port is closed. Can i enquire for some advice on how to open this port :)

    Bloody excited to try the game out :)
     
  9. Ruan

    Ruan Scruffy Nerf-Herder

    You don't have to use any specific port, but 9149 is the PID of the server, not the port
    Just connect to xxx.xxx.xxx.xxx
     
  10. sovredcat

    sovredcat Big Damn Hero

    Try:

    Code:
    netstat -tulpn
    And check if starbound server is in running/there and kill -9 the PID.
     
  11. dryblood

    dryblood Space Hobo

    Tutorial works a treat, just don't forget to open the port.
     
  12. sovredcat

    sovredcat Big Damn Hero

    Due to the server using tons of resources it will need to be restarted every 4 hours or so. If any of you guys know how to achieve this with crontab let me know, I'm rather confused how the time thingy works and what commands exactly I'd need to type.

    Also so far I found one command which is /pvp. I talked to devs and they said there are commands but they're not possible to use at the moment.

    Edit: Also prone to crashes, if anyone knows a auto restart on crash script let us know!

    Edit2: For those having this issue:

    Code:
    cd /home/steam/starbound/linux64
    nano star_restart.sh
    Input this:

    Code:
    #!/bin/sh
    
    # Kill 1
    screen -X -S starbound kill
    
    # Kill 2
    kill -9 | grep starbound_server
    
    # Change directory
    cd /home/steam/starbound/linux64
    
    # Start the server again
    screen -S starbound -d -m ./launch_starbound_server.sh
    This is assuming you have followed the first posts tutorial and your screen is actually called "starbound". It will kill the screen, then kill the process using -9 (cause sometimes when you restart the server you get a port in use error) and will cd into the starbound directory then start the server again.

    But it wont do this on it's own, we need to actually execute this script every 4 hours, so we'll do this with a crontab:

    Code:
    crontab -e
    Then input this line:

    Code:
    * */4 * * * cd /home/steam/starbound/linux64 && ./star_restart.sh
    This will cd into the starbound directory and run the script we just created. It will execute it every 4 hours. If would recommend using 4 hours because: I am running a server with a constant 20 players, and every 4 hours it would start lagging really badly, so yeah :)

    For reference, if you want to change it:

    Code:
    # .---------------- minute (0 - 59)
    # |  .------------- hour (0 - 23)
    # |  |  .---------- day of month (1 - 31)
    # |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
    # |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
    # |  |  |  |  |
    # *  *  *  *  * user-name  command to be executed
     
    Last edited: Dec 8, 2013
  13. cavelurker

    cavelurker Space Spelunker

    I've managed to daemonize the server, sorta, and have it automagically restarted after it crashes.
    https://github.com/lmas/starbound_server/blob/master/start_server.sh
    Grab this file and simply run it instead of the default server launcher.

    Edit: Don't forget to change the settings, most importantly the server arch you want to run and where the server files are located.
     
  14. sovredcat

    sovredcat Big Damn Hero

    Awesome!! I'm sure this will help a lot of people!

    Will it need to be updated when they update the server files?
     
  15. cavelurker

    cavelurker Space Spelunker

    That depends sovredcat. If the devteam changes any dir/file names or the debug output format my script would have to be updated. Anyone's welcome to fork my repo and/or update the script. I'll try to keep up with the starbound updates too.
     
  16. WallyWakka18434

    WallyWakka18434 Space Hobo

    I get the error "ERROR! Failed to install app '211820' (No subscription)" when I try to run the file. Can't run server.
     
  17. refringe

    refringe Space Hobo

  18. rogre78

    rogre78 Space Hobo

    Thank you SO much for this. I got it to work just fine the last two days, but now I'm getting this error in the client:

    Client connect failed! Error connecting to xxx.xxx.xxx.xxx port 21025. I assume this has something to do with port forwarding? Sorry, I'm very much a noob when is comes to this.
     
  19. Ubeermench

    Ubeermench Space Hobo

    I keep getting this error . Went through the guide a bunch of times to make sure i did everything else correct
     
  20. sovredcat

    sovredcat Big Damn Hero

    It's "starbound_server.sh" not "starbound_server".
     

Share This Page