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. flug

    flug Space Hobo

    thx for you tutorial . But I suggest using "tmux" rather than "screen" to get a better grip on the changes can :)
     
  2. SephGER

    SephGER Aquatic Astronaut

  3. Amr0d

    Amr0d Intergalactic Tourist

    Ok, I did exactly what the guide says and I think it worked because I haven't any errors so far. The only problem I have is: I cannot connect to my server. I am running a Ubuntu VPS and steam worked, starbound server is started etc. What could be wrong?

    I set a Username in the config file and a password aswell. But everytime I type in the Server IP I get "Connection to Server failed"
     
  4. Clanwarz

    Clanwarz Space Hobo

    Code:
    [star@starbound star]# cat update_starbound.sh
    ./steamcmd.sh +login clanwarzstar "MyFavPassword" +force_install_dir /home/starbound +app_update 211820 +exit
    
    [star@starbound star]# sh -x update_starbound.sh
    + ./steamcmd.sh +login clanwarzstar 'MyFavPassword!' +force_install_dir /home/starbound +app_update 211820 +exit
    
    Redirecting stderr to ...
    [  0%] Checking for available updates...
    [----] Verifying installation...
    Steam Console Client (c) Valve Corporation
    -- type 'quit' to exit --
    Loading Steam3...OK.
    Loading Steam2...OK.
    
    Logging in user 'clanwarzstar' to Steam Public...Success.
    ERROR! Failed to install app '211820' (No subscription)
    
    Using Cent OS 6.5 .

    Thank you in advanced.
     
  5. neonx

    neonx Yeah, You!


    You need to own the game to download it.
     
  6. artitboon

    artitboon Space Hobo

    Hello Sovredcat
    i run the server on debian wheezy 64bit. and found this error

    root@debian:~# cd /home/steam/starbound/linux64
    root@debian:/home/steam/starbound/linux64# ./launch_starbound_server.sh
    -bash: ./launch_starbound_server.sh: No such file or directory
    root@debian:/home/steam/starbound/linux64#

    it just really no have the launcher file. Please advice.

    Thankyou

    ps sorry for my English.
     
  7. sovredcat

    sovredcat Big Damn Hero

    I've updated the guide to better reflect recent changes, if anything is wrong let me know.
     
  8. Stepmaniafin

    Stepmaniafin Space Spelunker

    Hi!
    Thanks for the OP for fancy guide, but even though I followed those steps to start server, I get this strange "StarException: Could not acquire lock for the universe directory" error.. any ideas? Here is the full log:
    Code:
    rInfo: Creating Star::Root with 2 assets sources and config file: '../starbound.config'
    Info: Loading Star::Assets from: '../assets/packed.pak'
    Info: Loading Star::Assets from: '../assets/user'
    Info: Loading Star::Root...
    Info: Loading Star::Configuration from '../starbound.config'
    Warn: Missing inventoryIcon for chestplant1, using default
    Warn: Missing inventoryIcon for barvent, using default
    Warn: Missing inventoryIcon for wreckvent, using default
    Info: Done loading Star::Root.
    Info: Server version 'Beta v. Enraged Koala - Update 8', protocol 643
    Info: Running from : /home/steam/starbound/linux64/starbound_server
    Info: Scanning for router for portforwarding
    Info: Done scanning for router for portforwarding
    Info: Acquiring universe lock file
    Info: Shutting down Star::Root
    Error: Fatal Exception Caught: StarException: Could not acquire lock for the universe directory
    ./starbound_server(_ZN4Star13StarExceptionC2EPKc+0x10f) [0xe077af]
    ./starbound_server(_ZN4Star14UniverseServerC1ERKNS_6StringEbRKNS_19CelestialCoordinateE+0x1090) [0x84e4d0]
    ./starbound_server(main+0x4de) [0x7e3b2e]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7fb35310976d]
    ./starbound_server() [0x7e989d]
    
    Oh and before I forget, I am using Ubuntu 64bit (12.04 if I remember correctly?) OS!
    This is my first post to these forums by the way so feel free to tell me tips & tricks.
     
  9. sovredcat

    sovredcat Big Damn Hero

    @Stepmaniafin I've never seen that error, sounds to me your universe directory is messed up somehow, have you tried removing it and letting it recreate it? (note that: the universe directory is the world so if you remove it you will lose what you build).
     
  10. Stepmaniafin

    Stepmaniafin Space Spelunker

    Hmm, well I had a clean ubuntu installation before installing starbound and starting server, but I don't know, maybe it's some random bug, but in the universe folder, there is a file called "universe.lock", which I don't have on my windows server. Don't know where it came from, but yeah, I better try to remove the folder, gonna have to check what happens after that!
    [After couple of minutes thinking how to remove universe folder, I managed to remove it and re-create it by starting server again, and then...]
    ...Strange strange error occurs!

    Code:
    Info: Creating Star::Root with 2 assets sources and config file: '../starbound.config'
    Info: Loading Star::Assets from: '../assets/packed.pak'
    Info: Loading Star::Assets from: '../assets/user'
    Info: Loading Star::Root...
    Info: Loading Star::Configuration from '../starbound.config'
    Warn: Missing inventoryIcon for chestplant1, using default
    Warn: Missing inventoryIcon for barvent, using default
    Warn: Missing inventoryIcon for wreckvent, using default
    Info: Done loading Star::Root.
    Info: Server version 'Beta v. Enraged Koala - Update 8', protocol 643
    Info: Running from : /home/steam/starbound/linux64/starbound_server
    Info: Scanning for router for portforwarding
    Info: Done scanning for router for portforwarding
    Info: Acquiring universe lock file
    Info: UniverseServer: Creating world alpha:-72131780:2790545:-2279644:6
    Info: Generating 1 dungeons
    Info: Generating a dungeon
    Info: Placing dungeon at (6139, 1660)
    Warn: Failed to place dungeon object: avianbanner2 direction: 0 position: (6306, 1677)
    Warn: Perf: DungeonDefinition::buildDungeon millis: 2306
    Warn: Perf: DungeonGenerator::generate millis: 2313
    Warn: Perf: UniverseServer::createWorld millis: 10953
    Info: Shutting down Star::Root
    Error: Fatal Exception Caught: NetworkException: Cannot bind socket to [ipv4]*:21025: Address already in use
    ./starbound_server(_ZN4Star13StarExceptionC2ERKSs+0xfe) [0xe0753e]
    ./starbound_server(_ZN4Star16NetworkExceptionC2ERKSs+0x11) [0xda71a1]
    ./starbound_server(_ZN4Star6Socket4bindERKNS_11HostAddressE+0x2c2) [0xda6be2]
    ./starbound_server(_ZN4Star9TcpServerC1ERKNS_6StringEt+0x98) [0xda6d68]
    ./starbound_server(_ZNSt23_Sp_counted_ptr_inplaceIN4Star9TcpServerESaIS1_ELN9__gnu_cxx12_Lock_policyE2EEC2IJRNS0_6StringERtEEES2_DpOT_+0x45) [0x85a655]
    ./starbound_server(_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN4Star9TcpServerESaIS5_EJRNS4_6StringERtEEESt19_Sp_make_shared_tagPT_RKT0_DpOT1_+0x4c) [0x85a6bc]
    ./starbound_server(_ZNSt12__shared_ptrIN4Star9TcpServerELN9__gnu_cxx12_Lock_policyE2EEC1ISaIS1_EIRNS0_6StringERtEEESt19_Sp_make_shared_tagRKT_DpOT0_+0x2b) [0x85a72b]
    ./starbound_server(_ZN4Star14UniverseServer3runEv+0x1eb) [0x84ccfb]
    ./starbound_server(main+0x51f) [0x7e3b6f]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f9973e0776d]
    ./starbound_server() [0x7e989d]
    So NetworkException: Cannot bind socket to [ipv4] and so on. Could this have something to do with port forwarding?
    Good thing though is that there is no more "universe.lock" file in universe folder :)
    Any tips how to make that log expandable? Terribly long posts >_<

    EDIT:
    So I found out by using ps aux command that there was already a starbound_server already running, which probably was messing things up, so I killed that process. After that, finding out that server still didn't work, I went to check universe folder and guess what, there was that universe.lock lurking again!
     
    Last edited: May 6, 2014
  11. sovredcat

    sovredcat Big Damn Hero

    The issue is that Starbound is lacking proper server features, shutting it down sometimes doesn't work properly and you have to kill the process running on that port.

    Try this:

    1. Kill the Starbound server and make sure it's killed, you can use "fuser -n tcp -k 21025" to make sure
    2. Remove the universe folder
    3. Start the server again

    That should work. If it doesn't then try validating the installation by running steamcmd again and typing "app_update 211820 validate". If that doesn't work then I don't know.
     
  12. Stepmaniafin

    Stepmaniafin Space Spelunker

    Well, I tried everything but still ain't working, maybe it's something totally different..? I opened the server to another terminal window, as you told to do in the first post, and after that I checked with "screen -ls" command if there are any screens actually open. It says:
    Code:
    There is a screen on:
            27005.starbound (04/06/2014 04:43:39 PM)        (Dead ???)
    Remove dead screens with 'screen -wipe'.
    1 Socket in /var/run/screen/S-jt.
    
    I don't think it should say (Dead ???), and if I enter to that screen, it shows me empty window, as if it never did anything there, even though "ps aux" shows me that it is taking ~5.7% memory and ~13% CPU.
    I try to do my best to fix this, and thank you for your help so far!
     
  13. Stepmaniafin

    Stepmaniafin Space Spelunker

    GOT IT FIXED ^^
    Haha, it was all about port forwarding (how silly!), as the local IP had changed and router was forwarding the old address so that's why the server didn't work. To find this out, I had to do some strange stuff through putty and make some sort of SSH tunnel through certain port so that I could use Firefox through SSH, and go check & fix those router settings.
     
  14. dank sheet

    dank sheet Space Hobo

    Is this all pre-beta?? I have no idea why you would need to ssh ... i run my server on my laptop running kubuntu while i play starbound. If you are wanting a small server i think this is the way to go. If this is the case then setting up a server is "almost trivial" if you are interesting in this method reply and I'll do my best to guide you through what i have done to make my server work. Best of Luck
     
  15. sovredcat

    sovredcat Big Damn Hero

    Yes this is pre-beta but it's still the same, nothing has changed. This guide is for servers without a desktop.
     
  16. dank sheet

    dank sheet Space Hobo

    I see... well then best of luck with that guys and gals. I like running mine on the same box I'm playing on.
     
  17. somegreekguy

    somegreekguy Space Hobo

    Im having trouble running steamcmd.sh in linux ubutnu x64

    I get the following error:

    :/home/steam$ ./steamcmd.sh
    ./steamcmd.sh: line 29: /home/steam/linux32/steamcmd: Permission denied

    any help would be appreciated.
     
  18. allanmez

    allanmez Guest

    Code:
    allan@allanmez:/home/steam/starbound/linux32$ ./starbound_server
    Info: Creating Star::Root with 2 assets sources and config file: '../starbound.config'
    Info: Loading Star::Assets from: '../assets/packed.pak'
    Info: Loading Star::Assets from: '../assets/user'
    Info: Shutting down Star::Root
    Error: Fatal Exception Caught: StarException: Cannot open FileLogSink with filename ../starbound_server.log
    ./starbound_server(_ZN4Star13StarExceptionC2ERKSs+0xe7) [0x89cf637]
    ./starbound_server(_ZN4Star11FileLogSinkC2ERKNS_6StringENS_6Logger5LevelE+0xf8) [0x8951608]
    ./starbound_server(_ZNSt23_Sp_counted_ptr_inplaceIN4Star11FileLogSinkESaIS1_ELN9__gnu_cxx12_Lock_policyE2EEC2IJNS0_6StringENS0_6Logger5LevelEEEES2_DpOT_+0x4d) [0x840df9d]
    ./starbound_server(_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC1IN4Star11FileLogSinkESaIS5_EJNS4_6StringENS4_6Logger5LevelEEEESt19_Sp_make_shared_tagPT_RKT0_DpOT1_+0x44) [0x840e004]
    ./starbound_server(_ZNSt12__shared_ptrIN4Star11FileLogSinkELN9__gnu_cxx12_Lock_policyE2EEC1ISaIS1_EJNS0_6StringENS0_6Logger5LevelEEEESt19_Sp_make_shared_tagRKT_DpOT0_+0x3d) [0x840e07d]
    ./starbound_server(_ZN4Star4Root10initializeERKNS_6StringES3_b+0xf7) [0x84041e7]
    ./starbound_server(main+0x3e6) [0x83ea106]
    /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xb744d4d3]
    ./starbound_server() [0x83f17bd]
    
    I keep getting this error and can't figure out what to do.

    EDIT: Fixed. I just needed to run it as sudo.
     
    Last edited by a moderator: Dec 17, 2014
  19. Extreme Hollows

    Extreme Hollows Void-Bound Voyager

    Works! thanks!
     
  20. newdark

    newdark Void-Bound Voyager

    I turned the work above into a nice little bash script here is the gist.

    https://gist.github.com/newdark/9cee55c52711262b72fc

    Code:
    wget -O install_starbound.sh http://bit.ly/1Ehneqb
    chmod +x install_starbound.sh
    ./install_starbound.sh 
    when prompted for user name password that is going to be your steam username and password

    This will not work for Centos servers because of apt-get install but it has been tested on ubuntu 14.04 and 14.10. Hope it works, trying to get the files setup correctly is difficult. Also I ran this as root so it might not work if you don't have sudo access.
     
    Last edited: Feb 22, 2015

Share This Page