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.

Can't start Linux64 Server

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

  1. necrogami

    necrogami Yeah, You!

    Upon starting of linux64 server (archlinux)

    [root@charlie linux64]# ./launch_starbound_server.sh
    ./starbound_server: /usr/lib/libcrypto.so.1.0.0: no version information available (required by ./starbound_server)
    Info: Creating Star::Root with 1 assets sources and config file: './starbound.config'
    Info: Loading Star::Assets from: '../assets'
    Info: Loading Star::Root...
    Info: Creating default Star::Configuration
    Error: Could not load /celestial/names.config asset, attempting to use default.
    AssetException: Could not read variant asset /celestial/names.config
    ./starbound_server(_ZN4Star13StarExceptionC1ERKSsRKSt9exception+0x126) [0xa586a6]
    ./starbound_server() [0x516755]
    ./starbound_server() [0x5167c4]
    ./starbound_server() [0x50ed1a]
    ./starbound_server() [0x50f1cf]
    ./starbound_server() [0x516be3]
    ./starbound_server() [0x517b85]
    ./starbound_server() [0x51a7fb]
    ./starbound_server() [0x51aeeb]
    ./starbound_server() [0x540e58]
    ./starbound_server() [0x557bef]
    ./starbound_server() [0x55a155]
    ./starbound_server() [0x5072f6]
    /usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7f7cc358cbc5]
    ./starbound_server() [0x50b3ed]

    caused by: AssetException: No such asset '/celestial/names.config'
    ./starbound_server(_ZN4Star13StarExceptionC2ERKSs+0xfe) [0xa57f1e]
    ./starbound_server() [0x51c2a1]
    ./starbound_server() [0x50fef3]
    ./starbound_server() [0x50ff92]
    ./starbound_server() [0x516666]
    ./starbound_server() [0x5167c4]
    ./starbound_server() [0x50ed1a]
    ./starbound_server() [0x50f1cf]
    ./starbound_server() [0x516be3]
    ./starbound_server() [0x517b85]
    ./starbound_server() [0x51a7fb]
    ./starbound_server() [0x51aeeb]
    ./starbound_server() [0x540e58]
    ./starbound_server() [0x557bef]
    ./starbound_server() [0x55a155]
    ./starbound_server() [0x5072f6]
    /usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7f7cc358cbc5]
    ./starbound_server() [0x50b3ed]

    Info: Shutting down Star::Root
    Error: Fatal Exception Caught: VariantException: Variant type not map for get("planetarySuffixes"), is of type null
    ./starbound_server(_ZN4Star13StarExceptionC2ERKSs+0xfe) [0xa57f1e]
    ./starbound_server() [0x70a231]
    ./starbound_server(_ZNK4Star7Variant3getERKNS_6StringE+0xa0) [0xa3a5c0]
    ./starbound_server() [0x540e9a]
    ./starbound_server() [0x557bef]
    ./starbound_server() [0x55a155]
    ./starbound_server() [0x5072f6]
    /usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7f7cc358cbc5]
    ./starbound_server() [0x50b3ed]
     
  2. Wyvern

    Wyvern Hard-To-Destroy Reptile

    Have you even checked to make sure that file exists? Also jesus christ why are you running a game server as root.
     
  3. necrogami

    necrogami Yeah, You!

    Yes, The file exists ../assets/celestial/names.config exists also /usr/lib/libcrypto exists aswell.

    I was just testing it's a throw away server So if something borks i re-install no big deal.
     
  4. cavelurker

    cavelurker Space Spelunker

    I've done some investigation and managed to find the problem with not reading ../assets/celestial/names.config. You can't run the starbound server on a server using a XFS filesystem. If you instead run on it EXT4 it works!
     
    boni and Jansen like this.
  5. FrozenSUSHI

    FrozenSUSHI Aquatic Astronaut

    That would be a peculiar error indeed. I use XFS on all my servers and it would be a shame if I'd need an ext4 partition just for Starbound :(
    Anyone got a tip for the devs to fix this problem?
     
  6. boni

    boni Aquatic Astronaut

    I have the same problem. Using XFS, same error.
     
  7. xlevus

    xlevus Space Hobo

    Also suffering from the same problem.

    It also appears to not work on UFS, but that may be due to the underlying file systems using XFS too.
     
  8. boni

    boni Aquatic Astronaut

    Well, looks like this is a real bug. Let's get the devs attention so we can have our servers! ;)
     
  9. furrycat

    furrycat Aquatic Astronaut

    The following hack is pretty ugly but works on my XFS filesystem. The problem seems to be that the game is looking in the d_type field of dirent structs returned by the readdir function but the XFS filesystem driver doesn't populate it.

    We can fix that with an LD_PRELOAD hack.

    Create starbound.c in the linux64 directory.
    Code:
    #define _GNU_SOURCE
    
    #include <sys/stat.h>
    #include <sys/types.h>
    #include <dirent.h>
    #include <dlfcn.h>
    #include <fcntl.h>
    #include <stdint.h>
    #include <stdio.h>
    #include <string.h>
    #include <unistd.h>
    
    static char hackpath[PATH_MAX];
    static char hacktmp[PATH_MAX];
    
    DIR *opendir(const char *name) {
      static DIR *(*opendir_orig)(const char *) = NULL;
    
      if (! opendir_orig) opendir_orig = dlsym(RTLD_NEXT, "opendir");
    
      memmove(hackpath, name, strlen(name) + 1);
    
      return opendir_orig(name);
    }
    
    struct dirent *readdir(DIR *dirp) {
      static struct dirent *(*readdir_orig)(DIR *) = NULL;
      struct dirent *res;
      struct stat buf;
    
      if (! readdir_orig) readdir_orig = dlsym(RTLD_NEXT, "readdir");
      res = readdir_orig(dirp);
    
      if (res) {
        snprintf(hacktmp, sizeof(hacktmp), "%s/%s", hackpath, res->d_name);
        if (! stat(hacktmp, &buf)) {
          if (S_ISDIR(buf.st_mode)) res->d_type = 4;
          else if (S_ISREG(buf.st_mode)) res->d_type = 8;
        }
      }
    
      return res;
    }
    Compile it with
    Code:
    gcc -fPIC -shared -ldl -o starbound.so starbound.c
    Then run the game with
    Code:
    LD_PRELOAD=$PWD/starbound.so LD_LIBRARY_PATH=$PWD ./starbound
     
  10. boni

    boni Aquatic Astronaut

    Oh, cool. I didn't know there were such differences between the filesystems. I've tried solving it by preloading different versions, but yours works! Thanks for the fix. Now we can restart on the server after the patch :3
     
  11. cavelurker

    cavelurker Space Spelunker

    Whoa awesome! Now I'm gonna have to reinstall my server AGAIN so I get back on XFS.
     
  12. FrozenSUSHI

    FrozenSUSHI Aquatic Astronaut

    Loading the compiled XFS fix works flawlessly.
    Thx for the fix and maybe one of the devs will fix this Problem for all of us in one of the next patches.
     
  13. Timbus

    Timbus Space Hobo

    Duuuude you rule! I signed up just to thank you.
    How'd you manage to debug that? I gave up after getting to somewhere around Star::Assets::fileExists failing and couldn't really go anywhere from there because GDB is just.. just awful. I miss ollydbg and IDA :(

    Also thanks for the neat symbol table override trick, I didn't realise it was so easy on linux! I would have installed a hook in the import section of the ELF, ugh.
     
  14. cavelurker

    cavelurker Space Spelunker

    Anyone know if they fixed this with the latest update?
     
  15. furrycat

    furrycat Aquatic Astronaut

    It looks like the latest patch has fixed the problem for real.

    I'm glad my little hack helped you guys out. Credit must go to cavelurker for figuring out that XFS was the problem. I would literally never have considered that the filesystem could be the root cause. And that isn't just me being modest; it's entirely possible that I might have thought about it eventually but I would certainly have shrugged, decided that the beta was flawed and gone off to play on Windows long before exhausting more plausible possibilities.
     

Share This Page