Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 370711

Summary: media-sound/teamspeak-server-bin-3.0.0_beta30: Crashes when starting from stock init script - VirtualServer(1) failed to start, error: unable to bind network port
Product: Gentoo Linux Reporter: Citrine Oak <citrine.oak>
Component: [OLD] ServerAssignee: Tom Wijsman (TomWij) (RETIRED) <tomwij>
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: This is a fix for /etc/init.d/teamspeak3-server
a temporary fix for /opt/teamspeak3-server/

Description Citrine Oak 2011-06-08 19:45:29 UTC
There are errors in 2 files that keep this program from running. I do not how to create patches but I will upload my 2 stock fixes to the problem which are by NO MEANS the correct way to fix the problem, but they illustrate the path that we need to take for the solution.

Reproducible: Always

Steps to Reproduce:
1. Unmask teamspeak-server-bin
2. Emerge
3. Start the server without changing anything
Actual Results:  
2011-06-08 12:05:42.052795|INFO    |ServerLibPriv |   | Server Version: 3.0.0-beta30 [Build: 12998], Linux
2011-06-08 12:05:42.053168|INFO    |DatabaseQuery |   | dbPlugin name:    SQLite3 plugin, Version 2, (c)TeamSpeak Systems GmbH
2011-06-08 12:05:42.053224|INFO    |DatabaseQuery |   | dbPlugin version: 3.7.3
2011-06-08 12:05:42.053608|INFO    |DatabaseQuery |   | checking database integrity (may take a while)
2011-06-08 12:05:42.074361|INFO    |SQL           |   | pruning old database log entries where timestamp is older than 90 days
2011-06-08 12:05:43.084129|ERROR   |FileManager   |   | bind() failed: 98
2011-06-08 12:05:43.084204|ERROR   |FileManager   |   | bind failed on
2011-06-08 12:05:43.304451|ERROR   |VirtualServer |  1| bind failed on
2011-06-08 12:05:43.305094|ERROR   |VirtualSvrMgr |   | loading VirtualServer(1) failed to start, error: unable to bind network port
2011-06-08 12:05:43.376259|INFO    |VirtualServer |  1| stopped
2011-06-08 12:05:43.377104|INFO    |CIDRManager   |   | updated query_ip_whitelist ips:, 
2011-06-08 12:05:43.377607|ERROR   |Query         |   | bind failed on

Expected Results:  
2011-06-08 12:07:54.023328|INFO    |ServerLibPriv |   | Server Version: 3.0.0-beta30 [Build: 12998], Linux
2011-06-08 12:07:54.023709|INFO    |DatabaseQuery |   | dbPlugin name:    SQLite3 plugin, Version 2, (c)TeamSpeak Systems GmbH
2011-06-08 12:07:54.023777|INFO    |DatabaseQuery |   | dbPlugin version: 3.7.3
2011-06-08 12:07:54.024166|INFO    |DatabaseQuery |   | checking database integrity (may take a while)
2011-06-08 12:07:54.044891|INFO    |SQL           |   | pruning old database log entries where timestamp is older than 90 days
2011-06-08 12:07:54.918845|INFO    |FileManager   |   | listening on
2011-06-08 12:07:54.987897|INFO    |VirtualServer |  1| listening on
2011-06-08 12:07:54.988659|INFO    |CIDRManager   |   | updated query_ip_whitelist ips:, 
2011-06-08 12:07:54.989142|INFO    |Query         |   | listening on

I HAVE the solution to this... I will try to add an attachment in the next post.

<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->

Portage (hardened/linux/amd64, gcc-4.4.5, libc-0-r0, 2.6.37-hardened-r7 x86_64)
System uname: Linux-2.6.37-hardened-r7-x86_64-Pentium-R-_Dual-Core_CPU_E5200_@_2.50GHz-with-gentoo-1.12.14
Timestamp of tree: Wed, 04 May 2011 21:45:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.4-r1
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
sys-libs/glibc:      2.11.3
virtual/os-headers:  0
CFLAGS="-march=core2 -O2 -pipe"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="64bit X acl acpi alsa amd64 apache apache2 berkdb bzip2 cdr cli consolekit cracklib crypt ctype cups curl cxx dba dbus dri dvd en_US exif expat extras fbcon filter gd gdbm gif gpm hardened iconv imagemagick jal java java6 javascript jpeg justify mikmod mmx mng modules mp3 mudflap multilib mysql mysqli ncurses nls nptl nptlonly opengl openmp pam pcre perl pic png pppd python readline session socks5 sql sse sse2 ssl svg sysfs tcpd tiff truetype unicode urandom webkit xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="setenvif cgi cgid alias vhost_alias userdir negotiation authz_host dir mime authz_host filter include deflate status speling actions" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Comment 1 Citrine Oak 2011-06-08 19:46:57 UTC
Created attachment 276307 [details]
This is a fix for /etc/init.d/teamspeak3-server

This is not a patch but this should be what the init script has in it or the program doesn't run.
Comment 2 Citrine Oak 2011-06-08 19:49:12 UTC
Created attachment 276309 [details]
a temporary fix for /opt/teamspeak3-server/

Both of these files need to be replaced and then the server will run.

I just wanted to help all of you because it took me HOURS to solve it...

Though there is another problem

If you get a bind error it is likely that a zombie TS3 Server is still running grep for it in ps aux... the problem still remains in the init script that the stop script doesn't work.
Comment 3 Citrine Oak 2011-06-10 13:09:27 UTC
I found out something else.... the superadmin password that will give you query admin powers and move you from level 75 to level 100 never shows up in the log.. the simple fix is to do this in your kinda a spehgetti code fix but it works... and my server is up and running... I do this because I know there are others who are going to want it and all of these fixes for everything that was broken was a lot of work... so here we go:

Look for this line...
"/usr/sbin/ts3server" $@

Change it ONCE to:

"/usr/sbin/ts3server" serveradmin_password=passwordhere $@

Then start your server and run this query:

login serveradmin passwordhere
use sid=1
servergroupaddclient sgid=2 cldbid=2

And then you can remove that line from your runscript.

This solves this thread:
Comment 4 Citrine Oak 2011-06-10 13:18:08 UTC
There is still a problem because that stop script doesn't work... the only way to do it is to kill it with:

kill `ps aux | grep teamspeak | grep -v grep | awk '{print $2}'`

It is really sloppy but like I said before it works, just change your stop script to that.
Comment 5 Pacho Ramos gentoo-dev 2012-06-09 18:49:24 UTC
Still valid with latest version in the tree?
Comment 6 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-04-25 17:58:16 UTC
> Still valid with latest version in the tree?

Please reopen the bug if this still occurs.