It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
I own this game on GOG and i want to play it with my friend, so how can i make a server?
avatar
miki071: I own this game on GOG and i want to play it with my friend, so how can i make a server?
You can find "starbound_server.exe" inside the folder win64/win32 in the starbound folder.
avatar
miki071: I own this game on GOG and i want to play it with my friend, so how can i make a server?
avatar
Phoenixtear: You can find "starbound_server.exe" inside the folder win64/win32 in the starbound folder.
I am hosting on Linux (Mint). Attempting to run the run-server.sh file does start the server in a terminal window, it lists a bunch of lines quickly, then closes itself shortly thereafter.

What am I missing? Is there a guide for this setup?
avatar
NodCommander: I am hosting on Linux (Mint). Attempting to run the run-server.sh file does start the server in a terminal window, it lists a bunch of lines quickly, then closes itself shortly thereafter.

What am I missing? Is there a guide for this setup?
Don't use run-server.sh, just start starbound_server and watch the output.
avatar
NodCommander: I am hosting on Linux (Mint). Attempting to run the run-server.sh file does start the server in a terminal window, it lists a bunch of lines quickly, then closes itself shortly thereafter.

What am I missing? Is there a guide for this setup?
avatar
clarry: Don't use run-server.sh, just start starbound_server and watch the output.
That was the first thing I tried, however attepmting to open/click it it does nothing what so ever; might as well have clicked on an empty space of the folder...
Post edited December 26, 2016 by NodCommander
avatar
clarry: Don't use run-server.sh, just start starbound_server and watch the output.
avatar
NodCommander: That was the first thing I tried, however attepmting to open/click it it does nothing what so ever; might as well have clicked on an empty space of the folder...
Don't click it. Start it in a terminal.
avatar
NodCommander: That was the first thing I tried, however attepmting to open/click it it does nothing what so ever; might as well have clicked on an empty space of the folder...
avatar
clarry: Don't click it. Start it in a terminal.
Ah, now we are getting somewhere. Now I can see the error message which causes the server to fail launching.

"[Info] Server Version 1.2.1 (linux x86_64) Source ID: f15286d545debbcdb4e5e73680a1805ad29308da Protocol: 729
[Info] UniverseServer: Acquiring universe lock file
[Info] Root: Shutting down Root
[Info] Root: Writing runtime configuration to '../storage/starbound_server.config'
[Error] Fatal Exception caught: (UniverseServerException) Could not acquire lock for the universe directory
./starbound_server(_ZN4Star13StarExceptionC1EPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x66) [0x974776]
./starbound_server(_ZN4Star23UniverseServerExceptionC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x 52) [0xf030d2]
./starbound_server(_ZN4Star14UniverseServerC2ERKNS_6StringE+0x15cc) [0xeef7dc]
./starbound_server(main+0x1fc) [0x855a9c]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f620fa9df45]
./starbound_server() [0x86005c]
Caught at:
./starbound_server(_ZN4Star14fatalExceptionERKSt9exceptionb+0x42) [0x976a72]
./starbound_server(main+0x7ef) [0x85608f]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f620fa9df45]
./starbound_server() [0x86005c]
Aborted (SIGABRT)"

If I understand it right, the Universe Directory is where the game world is kept. Though, I do not know why the server cannot lock onto it. Any ideas?
avatar
clarry: Don't click it. Start it in a terminal.
avatar
NodCommander: Ah, now we are getting somewhere. Now I can see the error message which causes the server to fail launching.

"[Info] Server Version 1.2.1 (linux x86_64) Source ID: f15286d545debbcdb4e5e73680a1805ad29308da Protocol: 729
[Info] UniverseServer: Acquiring universe lock file
[Info] Root: Shutting down Root
[Info] Root: Writing runtime configuration to '../storage/starbound_server.config'
[Error] Fatal Exception caught: (UniverseServerException) Could not acquire lock for the universe directory
./starbound_server(_ZN4Star13StarExceptionC1EPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x66) [0x974776]
./starbound_server(_ZN4Star23UniverseServerExceptionC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x 52) [0xf030d2]
./starbound_server(_ZN4Star14UniverseServerC2ERKNS_6StringE+0x15cc) [0xeef7dc]
./starbound_server(main+0x1fc) [0x855a9c]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f620fa9df45]
./starbound_server() [0x86005c]
Caught at:
./starbound_server(_ZN4Star14fatalExceptionERKSt9exceptionb+0x42) [0x976a72]
./starbound_server(main+0x7ef) [0x85608f]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f620fa9df45]
./starbound_server() [0x86005c]
Aborted (SIGABRT)"

If I understand it right, the Universe Directory is where the game world is kept. Though, I do not know why the server cannot lock onto it. Any ideas?
It uses flock... it would fail if there is already a server running. There are a few other possible error conditions (see man 2 flock).

One thing you can do is strace the server and log its stderr to a file, then see if the flock calls are failing. This should also reveal the error code they return with:
strace ./starbound_server > /tmp/log 2>&1
Now open /tmp/log, and search for universe, and keep an eye out on flock calls. In my case, if I have a server already running, I can find output like this:

write(1, "[Info] UniverseServer: Acquiring"..., 52[Info] UniverseServer: Acquiring universe lock file
) = 52
open("../storage/universe/universe.lock", O_RDONLY|O_CREAT, 0644) = 6
flock(6, LOCK_EX|LOCK_NB) = -1 EAGAIN (Resource temporarily unavailable)
close(6) = 0
The solution in this case would be to kill the running server... but I don't know if something else could result in flock failing like that. Did you try rebooting? Anyway, let's see what we find in your log.
avatar
NodCommander: Ah, now we are getting somewhere. Now I can see the error message which causes the server to fail launching.

"[Info] Server Version 1.2.1 (linux x86_64) Source ID: f15286d545debbcdb4e5e73680a1805ad29308da Protocol: 729
[Info] UniverseServer: Acquiring universe lock file
[Info] Root: Shutting down Root
[Info] Root: Writing runtime configuration to '../storage/starbound_server.config'
[Error] Fatal Exception caught: (UniverseServerException) Could not acquire lock for the universe directory
./starbound_server(_ZN4Star13StarExceptionC1EPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x66) [0x974776]
./starbound_server(_ZN4Star23UniverseServerExceptionC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x 52) [0xf030d2]
./starbound_server(_ZN4Star14UniverseServerC2ERKNS_6StringE+0x15cc) [0xeef7dc]
./starbound_server(main+0x1fc) [0x855a9c]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f620fa9df45]
./starbound_server() [0x86005c]
Caught at:
./starbound_server(_ZN4Star14fatalExceptionERKSt9exceptionb+0x42) [0x976a72]
./starbound_server(main+0x7ef) [0x85608f]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f620fa9df45]
./starbound_server() [0x86005c]
Aborted (SIGABRT)"

If I understand it right, the Universe Directory is where the game world is kept. Though, I do not know why the server cannot lock onto it. Any ideas?
avatar
clarry: It uses flock... it would fail if there is already a server running. There are a few other possible error conditions (see man 2 flock).

One thing you can do is strace the server and log its stderr to a file, then see if the flock calls are failing. This should also reveal the error code they return with:

strace ./starbound_server > /tmp/log 2>&1
avatar
clarry: Now open /tmp/log, and search for universe, and keep an eye out on flock calls. In my case, if I have a server already running, I can find output like this:

write(1, "[Info] UniverseServer: Acquiring"..., 52[Info] UniverseServer: Acquiring universe lock file
) = 52
open("../storage/universe/universe.lock", O_RDONLY|O_CREAT, 0644) = 6
flock(6, LOCK_EX|LOCK_NB) = -1 EAGAIN (Resource temporarily unavailable)
close(6) = 0
avatar
clarry: The solution in this case would be to kill the running server... but I don't know if something else could result in flock failing like that. Did you try rebooting? Anyway, let's see what we find in your log.
"[12:23:31.563] [Info] Root: Preparing Root...
[12:23:31.564] [Info] Root: Done preparing Root.
[12:23:31.568] [Info] Root: Scanning for asset sources in directory '../assets/'
[12:23:31.585] [Info] Root: Loaded Configuration in 0.000945799 seconds[12:23:31.659] [Info] Root: Scanning for asset sources in directory '../mods/'
[12:23:31.662] [Warn] Root: Unrecognized file in asset directory 'mods_go_here', skipping
[12:23:31.663] [Info] Root: Detected asset source named 'base' at '../assets/packed.pak'
[12:23:31.663] [Info] Root: Detected unnamed asset source at '../assets/user'
[12:23:31.663] [Info] Loading assets from: '../assets/packed.pak'
sset source at '../assets/user'
[12:23:31.606] [Info] Loading assets from: '../assets/packed.pak'"

This is the result of the "latest" log, there is 6 total in the log folder. Will try rebooting later, a lot of services depend on the server to be up.

Edit: Alright, got some room for a reboot. Here is the result:

"[Info] Root: Preparing Root...
[Info] Root: Done preparing Root.
[Info] Root: Scanning for asset sources in directory '../assets/'
[Info] Root: Loaded Configuration in 0.00200658 seconds
[Info] Root: Scanning for asset sources in directory '../mods/'
[Warn] Root: Unrecognized file in asset directory 'mods_go_here', skipping
[Info] Root: Detected asset source named 'base' at '../assets/packed.pak'
[Info] Root: Detected unnamed asset source at '../assets/user'
[Info] Loading assets from: '../assets/packed.pak'
[Info] Loading assets from: '../assets/user'
[Info] Assets digest is e50bdbcb21170ac0da24ea03ce5b2963dd8fa65b8235e02ee1cae9b08cdc3bd6
[Info] Root: Loaded Assets in 1.14088 seconds
[Info] Root: Loaded NameGenerator in 1.15446 seconds
[Info] Root: Loaded PlantDatabase in 0.111445 seconds
[Info] Root: Loaded ObjectDatabase in 0.28785 seconds
[Info] Root: Loaded MonsterDatabase in 0.131901 seconds
[Info] Root: Loaded NpcDatabase in 0.0342466 seconds
[Info] Root: Loaded StagehandDatabase in 0.00125892 seconds
[Info] Root: Loaded VehicleDatabase in 0.00259343 seconds
[Info] Root: Loaded PlayerFactory in 0.00488 seconds
[Info] Root: Loaded ProjectileDatabase in 0.337287 seconds
[Info] Root: Loaded VersioningDatabase in 0.00328766 seconds
[Info] Root: Loaded EntityFactory in 0.00489009 seconds
[Info] Root: Loaded ParticleDatabase in 0.0351726 seconds
[Info] Root: Loaded ImageMetadataDatabase in 8.46e-07 seconds
[Info] Root: Loaded MaterialDatabase in 0.302965 seconds
[Info] Root: Loaded TerrainDatabase in 0.00617004 seconds
[Info] Root: Loaded BiomeDatabase in 0.0400368 seconds
[Info] Root: Loaded LiquidsDatabase in 0.000657852 seconds
[Info] Root: Loaded StatusEffectDatabase in 0.00771872 seconds
[Info] Root: Loaded DamageDatabase in 0.211183 seconds
[Info] Root: Loaded EffectSourceDatabase in 0.0072332 seconds
[Info] Root: Loaded FunctionDatabase in 0.00277287 seconds
[Info] Root: Loaded TreasureDatabase in 0.0245727 seconds
[Info] Root: Loaded DungeonDefinitions in 0.242312 seconds
[Info] Root: Loaded TilesetDatabase in 1.0482e-05 seconds
[Info] Root: Loaded StatisticsDatabase in 0.00376478 seconds
[Info] Root: Loaded EmoteProcessor in 0.00036384 seconds
[Info] Root: Loaded SpeciesDatabase in 0.0051514 seconds
[Info] Root: Loaded QuestTemplateDatabase in 0.0168681 seconds
[Info] Root: Loaded AiDatabase in 0.00194787 seconds
[Info] Root: Loaded TechDatabase in 0.000680119 seconds
[Info] Root: Loaded CodexDatabase in 0.00370213 seconds
[Info] Root: Loaded BehaviorDatabase in 0.207674 seconds
[Info] Root: Loaded DanceDatabase in 0.00474869 seconds
[Info] Root: Loaded SpawnTypeDatabase in 0.00469003 seconds
[Info] Root: Loaded RadioMessageDatabase in 0.00220447 seconds
[Info] Root: Loaded ItemDatabase in 2.70613 seconds
[Info] Root: Loaded CollectionDatabase in 1.73725 seconds
[Info] Server Version 1.2.1 (linux x86_64) Source ID: f15286d545debbcdb4e5e73680a1805ad29308da Protocol: 729
[Info] UniverseServer: Acquiring universe lock file
[Info] UniverseServer: Loading settings
[Info] UniverseServer: Starting UniverseServer with UUID: 574e7fefb825270d36f140042499f310
[Info] UniverseServer: listening for incoming TCP connections on 0000:0000:0000:0000:0000:0000:0000:0000:21025
[Info] Root: Writing runtime configuration to '../storage/starbound_server.config'"

And nothing more, client unable to connect to server. (Unless you are supposed to fill in server username/password? I've yet to see a place where to specify these though.
Post edited December 26, 2016 by NodCommander
avatar
NodCommander: Edit: Alright, got some room for a reboot. Here is the result:

"[Info] Root: Preparing Root...
[Info] Root: Done preparing Root.
[Info] Root: Scanning for asset sources in directory '../assets/'
[Info] Root: Loaded Configuration in 0.00200658 seconds
[Info] Root: Scanning for asset sources in directory '../mods/'
[Warn] Root: Unrecognized file in asset directory 'mods_go_here', skipping
[Info] Root: Detected asset source named 'base' at '../assets/packed.pak'
[Info] Root: Detected unnamed asset source at '../assets/user'
[Info] Loading assets from: '../assets/packed.pak'
[Info] Loading assets from: '../assets/user'
[Info] Assets digest is e50bdbcb21170ac0da24ea03ce5b2963dd8fa65b8235e02ee1cae9b08cdc3bd6
[Info] Root: Loaded Assets in 1.14088 seconds
[Info] Root: Loaded NameGenerator in 1.15446 seconds
[Info] Root: Loaded PlantDatabase in 0.111445 seconds
[Info] Root: Loaded ObjectDatabase in 0.28785 seconds
[Info] Root: Loaded MonsterDatabase in 0.131901 seconds
[Info] Root: Loaded NpcDatabase in 0.0342466 seconds
[Info] Root: Loaded StagehandDatabase in 0.00125892 seconds
[Info] Root: Loaded VehicleDatabase in 0.00259343 seconds
[Info] Root: Loaded PlayerFactory in 0.00488 seconds
[Info] Root: Loaded ProjectileDatabase in 0.337287 seconds
[Info] Root: Loaded VersioningDatabase in 0.00328766 seconds
[Info] Root: Loaded EntityFactory in 0.00489009 seconds
[Info] Root: Loaded ParticleDatabase in 0.0351726 seconds
[Info] Root: Loaded ImageMetadataDatabase in 8.46e-07 seconds
[Info] Root: Loaded MaterialDatabase in 0.302965 seconds
[Info] Root: Loaded TerrainDatabase in 0.00617004 seconds
[Info] Root: Loaded BiomeDatabase in 0.0400368 seconds
[Info] Root: Loaded LiquidsDatabase in 0.000657852 seconds
[Info] Root: Loaded StatusEffectDatabase in 0.00771872 seconds
[Info] Root: Loaded DamageDatabase in 0.211183 seconds
[Info] Root: Loaded EffectSourceDatabase in 0.0072332 seconds
[Info] Root: Loaded FunctionDatabase in 0.00277287 seconds
[Info] Root: Loaded TreasureDatabase in 0.0245727 seconds
[Info] Root: Loaded DungeonDefinitions in 0.242312 seconds
[Info] Root: Loaded TilesetDatabase in 1.0482e-05 seconds
[Info] Root: Loaded StatisticsDatabase in 0.00376478 seconds
[Info] Root: Loaded EmoteProcessor in 0.00036384 seconds
[Info] Root: Loaded SpeciesDatabase in 0.0051514 seconds
[Info] Root: Loaded QuestTemplateDatabase in 0.0168681 seconds
[Info] Root: Loaded AiDatabase in 0.00194787 seconds
[Info] Root: Loaded TechDatabase in 0.000680119 seconds
[Info] Root: Loaded CodexDatabase in 0.00370213 seconds
[Info] Root: Loaded BehaviorDatabase in 0.207674 seconds
[Info] Root: Loaded DanceDatabase in 0.00474869 seconds
[Info] Root: Loaded SpawnTypeDatabase in 0.00469003 seconds
[Info] Root: Loaded RadioMessageDatabase in 0.00220447 seconds
[Info] Root: Loaded ItemDatabase in 2.70613 seconds
[Info] Root: Loaded CollectionDatabase in 1.73725 seconds
[Info] Server Version 1.2.1 (linux x86_64) Source ID: f15286d545debbcdb4e5e73680a1805ad29308da Protocol: 729
[Info] UniverseServer: Acquiring universe lock file
[Info] UniverseServer: Loading settings
[Info] UniverseServer: Starting UniverseServer with UUID: 574e7fefb825270d36f140042499f310
[Info] UniverseServer: listening for incoming TCP connections on 0000:0000:0000:0000:0000:0000:0000:0000:21025
[Info] Root: Writing runtime configuration to '../storage/starbound_server.config'"

And nothing more, client unable to connect to server. (Unless you are supposed to fill in server username/password? I've yet to see a place where to specify these though.
This looks like a perfectly normal server startup. It's up and running. No, there is no need to specify username or password. I'd say check your firewall rules.
avatar
NodCommander: And nothing more, client unable to connect to server. (Unless you are supposed to fill in server username/password? I've yet to see a place where to specify these though.
Are you getting anywhere yet? You can verify that the server has an open socket waiting for connections:

ss -l|grep 21025
tcp LISTEN 0 32 :::21025 :::*
You can also connect to it and send some junk from localhost, with netcat. When you do this, the server should log a new connection (and abort it):

dd if=/dev/urandom|nc localhost 21025

[Info] UniverseServer: Connection received from: 0000:0000:0000:0000:0000:0000:0000:0001:45258
[Warn] I/O error in TcpPacketSocket::readPackets, closing: (StarPacketException) Unrecognized packet type 235
[Warn] UniverseServer: client connection aborted, expected ProtocolRequestPacket
This indicates the server is indeed up and running, and you should be able to connect to it with the client. But if you can't, that hints at a firewall or port fowarding issue. You might also notice that the server binds to a v6 address by default. I don't know if this should be a problem; historically, if I'm not entirely mistaken, I think some distros had these sockets be v6-exclusive, meaning you couldn't connect to them from another machine over IPv4. So if you still cannot connect, you could poke the server config a little. Find the bind line and change the "::" to a "*", or even your local IP address ("192.168.1.103" in my case) in storage/starbound_server.config:

"gameServerBind" : "*",
Post edited December 27, 2016 by clarry