[Icecast] ices2 not re-connecting on live stream
Keith Whyte
keith at media-solutions.ie
Thu Nov 25 01:26:27 UTC 2004
hi everyone, congratulations on the release of icecast 2.1.0
I presume this is the right place to post about iceS. please correct if
wrong.
I have a two instance setup, and have been finding that after a network
error occurs, the instance does not reconnect.
The source server is behind a linux NAT box.
I have simulated the problem by using iptables REJECT with tcp-reset and
here is the resulting log file from iceS:
ice at debian:~$ /usr/local/bin/ices /usr/local/share/ices/live_debug.xml
[ 02:17:19] INFO ices-core/main IceS 2.0.0 started...
[ 02:17:19] INFO input-alsa/alsa_open_module Opened audio device plughw:0,0
[ 02:17:19] INFO input-alsa/alsa_open_module using 2 channel(s), 44100
Hz, buffer 371 ms (2 periods)
[ 02:17:19] INFO input-alsa/alsa_open_module Starting metadata update thread
[ 02:17:19] INFO encode/encode_initialise Encoder initialising in VBR
mode: 2 channel(s), 44100 Hz, quality 0.500000
[ 02:17:19] INFO audio/downmix_initialise Enabling stereo->mono downmixing
[ 02:17:19] INFO audio/resample_initialise Initialised resampler for 1
channels, from 44100 Hz to 11025 Hz
[ 02:17:19] INFO encode/encode_initialise Encoder initialising with
bitrate management: 1 channels, 11025 Hz, minimum bitrate 16000, nominal
20000, maximum 24000
[ 02:17:19] INFO signals/signal_usr1_handler Metadata update requested
[ 02:17:19] DBUG metadata/metadata_thread_signal meta thread wakeup
[ 02:17:19] DBUG metadata/metadata_thread_signal reading metadata from
"/home/ice/metadata"
[ 02:17:19] INFO metadata/metadata_thread_signal tag 1 is artist=Near FM
101.6
[ 02:17:19] INFO metadata/metadata_thread_signal tag 2 is title=Live
[ 02:17:19] INFO metadata/metadata_thread_signal Updating metadata
[ 02:17:20] INFO stream/ices_instance_stream Connected to server:
radioserver:8000/radio_low.ogg
[ 02:17:20] INFO audio/resample_initialise Initialised resampler for 1
channels, from 44100 Hz to 11025 Hz
[ 02:17:20] DBUG encode/encode_clear Clearing encoder engine
[ 02:17:20] INFO encode/encode_initialise Encoder initialising with
bitrate management: 1 channels, 11025 Hz, minimum bitrate 16000, nominal
20000, maximum 24000
[ 02:17:20] INFO stream/ices_instance_stream Connected to server:
radioserver:8000/radio.ogg
[ 02:17:20] DBUG encode/encode_clear Clearing encoder engine
[ 02:17:20] INFO encode/encode_initialise Encoder initialising in VBR
mode: 2 channel(s), 44100 Hz, quality 0.500000
At this point, I simulate loss of network connectivity:
[ 02:17:43] EROR stream/ices_instance_stream Send error: Socket error
(Connection reset by peer)
[ 02:17:43] DBUG input/input_flush_queue Input queue flush requested
[ 02:17:43] WARN stream/ices_instance_stream Trying reconnect after
server socket error
[ 02:17:44] EROR stream/ices_instance_stream Failed to reconnect to
radioserver:8000 (Login failed)
[ 02:17:46] WARN stream/ices_instance_stream Trying reconnect after
server socket error
[ 02:17:47] EROR stream/ices_instance_stream Failed to reconnect to
radioserver:8000 (Login failed)
[ 02:17:49] WARN stream/ices_instance_stream Trying reconnect after
server socket error
[ 02:17:49] EROR stream/ices_instance_stream Failed to reconnect to
radioserver:8000 (Login failed)
[ 02:17:51] WARN stream/ices_instance_stream Trying reconnect after
server socket error
[ 02:17:52] EROR stream/ices_instance_stream Failed to reconnect to
radioserver:8000 (Login failed)
[ 02:17:54] WARN stream/ices_instance_stream Trying reconnect after
server socket error
Restore network connectivity:
[ 02:17:55] INFO stream/ices_instance_stream Connected to server:
radioserver:8000/radio_low.ogg
[ 02:17:55] DBUG input/input_flush_queue Input queue flush requested
only, the stream has not reconnected.
the source box netstat shows:
tcp 1 0 192.168.1.20:32822 radioserver:8000 CLOSE_WAIT
tcp 27 0 192.168.1.20:32820 radioserver:8000 CLOSE_WAIT
tcp 27 0 192.168.1.20:32821 radioserver:8000 CLOSE_WAIT
tcp 27 0 192.168.1.20:32818 radioserver:8000 CLOSE_WAIT
tcp 27 0 192.168.1.20:32819 radioserver:8000 CLOSE_WAIT
tcp 0 4107 192.168.1.20:32816 radioserver:8000 ESTABLISHED
The ESTABLISHED connection is the instance which didn't get blocked by
iptables.
and those sockets seem to remain in CLOSE_WAIT until i kill the ices
process.
any help is much appreciated.
thanks,
Keith.
More information about the Icecast
mailing list