1 (edited by Vincent-Team 2016-08-18 11:27:44)

Topic: Hosting Teeworlds on Ubuntu [solved]

Hello!

We've recently installed Teeworlds 0.6.2 for Ubuntu (I'm on Xubuntu 14.04.4 LTS, french version), but it doesn't seem to work.
We've spend quite some time searching and combing the net, to no avail sad

We created a server_default.cfg, which we tried in both
/usr/share/games/teeworlds/server_default.cfg
and in /usr/games, just in case.

We've tried a lot of things, but we always find ourselves stumped by the same problem.

Whatever we do, in whatever place, if we type something like
./teeworlds_srv -f server_default.cfg (or ./teeworlds_srv -f s/usr/share/games/teeworlds/server_default.cfg, for exemple),
We get this: bash: ./teeworlds_srv: No such file


And if we try something like teeworlds_srv -f server_default.cfg (or, indeed, just teeworlds_srv),
We get teeworlds_srv : no such command

If we type Teeworlds in the menu, we get the connection page.
If we do the same thing with Teeworlds_srv, nothing happens.

As far as we can tell, Teeworlds_srv doens't exist on our computer.
For what it's worth, we also tried the above commands (or variation thereof) with just Teeworlds instead of Teeworlds_srv, but this just launches the game, without allowing us to host one.

What are we missing? Any help will be very much appreciated.

2

Re: Hosting Teeworlds on Ubuntu [solved]

In witch folder are you when you try to execute teeworlds_srv ? (you should write "cd <TEEWORLDSDIR>" before)

How did you installed teeworlds ? from binaries, or you tried to compile the whole thing yourself ?

Why are you using an old version of teeworlds ?

Have you check if ./teeworlds_srv exists and if the file is executable ?

3 (edited by [pieLover] 2016-07-16 09:24:53)

Re: Hosting Teeworlds on Ubuntu [solved]

assuming you installed it.. remove ./ from what you're commanding it to do

edit: disregard that, didnt read whole post because mobile. try

apt-get install teeworlds*
Clan: Riot (I'm one of three leaders: Mile, Deku, pie)
Host teeworlds maps on a fng/ctf/dm/ddrace server for testing:http://riotproductions.tk/teewo/ broken-need reinstall nginx http://riotproductions.tk/bounce?whatEven, Teeworlds NA Discord chat

4

Re: Hosting Teeworlds on Ubuntu [solved]

Thank you very much for your replies.

We're a social center, and want to try to have elderly people play some games, including teeworlds... But it's a struggle big_smile

necropotame wrote:

In witch folder are you when you try to execute teeworlds_srv ? (you should write "cd <TEEWORLDSDIR>" before

I was manually in the directory...

I tried typing cd /usr/share/games/teeworlds/
(where there's the data for the game, as well as a server_default.cfg file)
and then both ./teeworlds_srv -f server_default.cfg and teeworlds_srv -f server_default.cfg
Same answers as before: No such file, and no such command

Then I tried cd /usr/games/
(In which there's the executable file, as well as a duplicate server_default), and did the same things, with the same results.

necropotame wrote:

How did you installed teeworlds ? from binaries, or you tried to compile the whole thing yourself ?

Why are you using an old version of teeworlds ?

Have you check if ./teeworlds_srv exists and if the file is executable ?

I installed Teeworlds through
https://apps.ubuntu.com/cat/applications/teeworlds/
which was the link given on the teeworlds official page

I don't know how to install version 0.6.3

How to check this?
If I type both this and teeworlds_srv in the terminal, it says the same things as before: no such file, and no such command.
If I type this in the research field, I have nothing (I have a result for just teeworlds, but that's to connect to an existing game, right?)
If I check my system files, I find the teeworlds executable in /usr/games and the data in /usr/share/games/teeworlds/. If there's another teeworlds exec somewhere else, I don't know about it, nor have I found it.

[pieLover] wrote:

edit: disregard that, didnt read whole post because mobile. try

apt-get install teeworlds*

impossible to find the teeworlds.cfg paquet
impossible to find the paquet corresponding to the rationnal expression "teeworlds.cfg"

Reading this, I did an internet search, and tried
apt-get install teeworlds-server
It installed teeworlds-server 0.6.2+dfsg-2~build0.14.04.1, and created a teeworlds-server exec file in /usr/games
Yet, nothing happens when I click on it, nor do the commands as above work (same results)

I found this http://nathguil.free.fr/nikola/lef2014/teeworlds.cfg
but I don't know what to make of it, if it helps or whatever.

5 (edited by Pathos 2016-07-18 10:37:30)

Re: Hosting Teeworlds on Ubuntu [solved]

Oops nevermind! Retracted

6 (edited by necropotame 2016-07-18 10:47:07)

Re: Hosting Teeworlds on Ubuntu [solved]

First, remove teeworlds:

sudo apt-get remove teeworlds*

Then, download and extract the last version of teeworlds

wget https://downloads.teeworlds.com/teeworlds-0.6.3-linux_x86_64.tar.gz
tar -xvzf ./teeworlds-0.6.3-linux_x86_64.tar.gz
rm teeworlds-0.6.3-linux_x86_64.tar.gz

Now, just go in the folder "teeworlds-0.6.3-linux_x86_64" and start the server:

cd teeworlds-0.6.3-linux_x86_64
./teeworlds_srv

Good luck with your project smile

7

Re: Hosting Teeworlds on Ubuntu [solved]

Thanks!!!

I worked fine, save until I launched the command.
I got the following errors:

[578c9b5e][console]: failed to open 'autoexec.cfg'
[578c9b5e][net]: failed to bind socket with domain 2 and type 2 (98 'Address already in use')
[578c9b5e][net]: failed to bind socket with domain 10 and type 2 (98 'Address already in use')
[578c9b5e][server]: couldn't open socket. port 8303 might already be in use

I found no autoexec.cfg file in the directory. Is this normal? Is this supposed to be server_default.cfg or something else?
As for the rest, I just don't know what to do and how :-(

Sorry for the worries.
I gotta go, don't know when I'll be able to go back on this (this is not my main job), so if I fail to answer or give news until some days, don't be surprised

8

Re: Hosting Teeworlds on Ubuntu [solved]

Apparently, you already run a program that use the port "8303". I think a programm already use this port. To check that, try this command (I don't know what does -tulpn, I've found it on internet) :

sudo netstat -tulpn | grep ":8303 "

The terminal should print something like that:

tcp        0      0 127.0.1.1:8303            0.0.0.0:*               LISTEN      <PROGRAM>
udp        0      0 127.0.1.1:8303            0.0.0.0:*                            <PROGRAM>   

If the port is really already in use, you must tell the server to use a different port. Create the file "autoexec.cfg" with the following content:

sv_name <NAME OF YOUR SERVER>
sv_port 10500

Then start again the server with "./teeworlds_srv". The error with autoexec.cfg should be gone as well as the error about the port. If not, change the port 10500 to something else.

9 (edited by Vincent-Team 2016-07-21 10:14:17)

Re: Hosting Teeworlds on Ubuntu [solved]

Hello again!

Strangely, tulpn didn't work, despite checking and trying different combinations.

But I created the autoexec.cfg file, and it WORKED! big_smile The errors disappeared! Many thanks!

But...

[57907bbe][register]: WARNING: No master servers. Retrying in 60 seconds
[57907bfa][engine/mastersrv]: refreshing master server addresses
[57907bfa][register]: refreshing ip addresses

and so on.

I tried ./teeworlds_srv -f my_server_default.cfg with a file I had created, but it did the same thing

I don't know if this is normal

10

Re: Hosting Teeworlds on Ubuntu [solved]

For sure, it's not normal smile It's like teeworlds can't access to internet. If you want to create a server only in LAN, it's fine, but otherwise, you should fix that. The first question is about firewall. There is one that could block teeworlds ? Can you access to the server list in the client ? (I don't know if you use a server or a desktop)

Vincent-Team wrote:

Strangely, tulpn didn't work, despite checking and trying different combinations.

What do you mean exactly ? the option "-tulnp" produce errors ? Which ones ?

11

Re: Hosting Teeworlds on Ubuntu [solved]

We have 4 computers on the same network, so yeah, LAN. We want the people to be able to play among themselves on linked computers, not to play with strangers (they'd get trounced).
But if it doesn't work, this changes nothing.

We have no firewall on the computers, but there's probably one on the general network (We don't deal with this), but this shouldn't be a problem, shouldn't it?

Ok, it seems I wasn't clear: When I said it worked, I meant I didn't have the same errors than before (the port problem), just the ones I showed you, but the server didn't launch.

Wow. Something strange just happened. I tried to launch the _srv again, and this did the same error as before
[57908810][net]: failed to bind socket with domain 2 and type 2 (98 'Address already in use')
[57908810][net]: failed to bind socket with domain 10 and type 2 (98 'Address already in use')
[57908810][server]: couldn't open socket. port 10500 might already be in use.

I'm stumped. Is this still occupied by my previous attempt to launch teeworlds? I don't know.

necropotame wrote:

What do you mean exactly ? the option "-tulnp" produce errors ? Which ones ?

No, no errors, just nothing happened, I got back to the prompter,

:~$ sudo netstat -tulpn | grep :8303
[sudo] password for PC1:
:~$

I gotta go, I got recalled for my other job. Thanks for your time and help.

12

Re: Hosting Teeworlds on Ubuntu [solved]

Vincent-Team wrote:

I'm stumped. Is this still occupied by my previous attempt to launch teeworlds? I don't know.

It seems that it's the case. Did you kill previous the processes with Ctrl+C ?

Vincent-Team wrote:

No, no errors, just nothing happened, I got back to the prompter,

Can you do the same when the server is started ? Change the port in the CFG file in case that you still get the same error.

13

Re: Hosting Teeworlds on Ubuntu [solved]

Hello again

No, I hadn't killed the process. When I tried it again today, I didn't get the socket error message.
By the way, ctrl+c works, thanks. I'm seeing things a little more clearly now.

I did get the master server one again, though :-(
So that's the current problem: The game launches, but then

[57921820][engine]: running on unix-linux-amd64
[57921820][engine]: arch is little endian
[57921820][storage]: added path '$USERDIR' ('/home/anomander/.teeworlds')
[57921820][storage]: added path '$DATADIR' ('data')
[57921820][storage]: added path '$CURRENTDIR' ('/home/anomander/teeworlds-0.6.3-linux_x86_64')
[57921820][console]: executing 'autoexec.cfg'
[57921820][server]: starting...
[57921820][datafile]: loading. filename='maps/dm1.map'
[57921820][datafile]: allocsize=2684
[57921820][datafile]: readsize=2396
[57921820][datafile]: swaplen=2416
[57921820][datafile]: item_size=2012
[57921820][datafile]: loading done. datafile='maps/dm1.map'
[57921820][server]: maps/dm1.map crc is f2159e6e
[57921820][server]: server name is '<seniors_branches>'
[57921820][datafile]: loading data index=17 size=325 uncompressed=12000
[57921820][server]: version 0.6 626fce9a778df4d4
[57921820][engine/mastersrv]: refreshing master server addresses
[57921820][register]: refreshing ip addresses
[57921820][engine/mastersrv]: saving addresses
[57921820][register]: fetching server counts
[57921823][register]: WARNING: No master servers. Retrying in 60 seconds

and so on.

necropotame wrote:

Can you do the same when the server is started ? Change the port in the CFG file in case that you still get the same error.

Yes, that was the thing.

I'm going away on a vacation. My collegue will try to follow up with this, so don't be surprised if it feels like you're speaking to someone different: You will be!

Thank you very much, I hope that you'll find the solution together!

14 (edited by [pieLover] 2016-07-24 08:09:36)

Re: Hosting Teeworlds on Ubuntu [solved]

if the clients will be connecting over LAN, set sv_register 0 in the config to stop it from trying to contact the master servers

Clan: Riot (I'm one of three leaders: Mile, Deku, pie)
Host teeworlds maps on a fng/ctf/dm/ddrace server for testing:http://riotproductions.tk/teewo/ broken-need reinstall nginx http://riotproductions.tk/bounce?whatEven, Teeworlds NA Discord chat

15

Re: Hosting Teeworlds on Ubuntu [solved]

Hello!

Me again, back from my holidays.

Just to say that yes, this works now!

Strangely, using the command prompt still gives the same error, but if we click on the "teeworlds_srv" icon, and then the "Teeworlds" one, it works just fine, and we can then use "teeworlds" on other computers in order to join the game.

Thank you very much for your help