Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

kh branch of ices : trouble connecting to localhost:8000

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Dev Branches
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Mon Apr 23, 2007 4:53 pm    Post subject: kh branch of ices : trouble connecting to localhost:8000 Reply with quote

Hi All (and I suppose Karl in particular),
I am an icecast/ices/libshout newbie, but know my way around linux. I'm very much looking forward to use ices & icecast to stream my jack based audio (hence I'm using the kh branch). Thankyou Karl for building in jack capability!

But am having a basic problem with the getting ices to connect to port 8000. I'm running icecast and ices on the same box.

The problem lines in the ices log file are:

[2007-04-23 11:00:10] DBUG reencode/reencode_new_init Reencoder setup complete
[2007-04-23 11:00:10] INFO encode/encode_setup Encoder initialising in VBR mode: 2 channels, 44100 Hz, nominal 65536
[2007-04-23 11:00:10] DBUG stream/_output_oggpacket seen new stream, better get headers
[2007-04-23 11:00:10] DBUG stream/_output_oggpacket samplerate is 44100, channels is 2
[2007-04-23 11:00:10] DBUG om_shout/check_shout_connected Time we started stream on localhost:8000/volesunited.ogg
[2007-04-23 11:00:10] EROR om_shout/check_shout_connected Failed to connect to localhost:8000/volesunited.ogg (Operation pending completion)
[2007-04-23 11:00:10] DBUG om_shout/_output_connection_close closed shout connection
[2007-04-23 11:00:12] DBUG om_shout/check_shout_connected Time we started stream on localhost:8000/volesunited.ogg
[2007-04-23 11:00:12] EROR om_shout/check_shout_connected Failed to connect to localhost:8000/volesunited.ogg (Operation pending completion)
[2007-04-23 11:00:12] DBUG om_shout/_output_connection_close closed shout connection
[2007-04-23 11:00:14] DBUG om_shout/check_shout_connected Time we started stream on localhost:8000/volesunited.ogg
[2007-04-23 11:00:14] EROR om_shout/check_shout_connected Failed to connect to localhost:8000/volesunited.ogg (Operation pending completion)
[2007-04-23 11:00:14] DBUG om_shout/_output_connection_close closed shout connection
[2007-04-23 11:00:16] DBUG om_shout/check_shout_connected Time we started stream on localhost:8000/volesunited.ogg
[2007-04-23 11:00:16] EROR om_shout/check_shout_connected Failed to connect to localhost:8000/volesunited.ogg (Operation pending completion)
[2007-04-23 11:00:16] DBUG om_shout/_output_connection_close closed shout connection
[2007-04-23 11:00:18] DBUG om_shout/check_shout_connected Time we started stream on localhost:8000/volesunited.ogg
[2007-04-23 11:00:18] EROR om_shout/check_shout_connected Failed to connect to localhost:8000/volesunited.ogg (Operation pending completion)




Now I know that port 8000 is open on this box, because I can fire up the icecast admin pages no problem. And a netstat -an gives:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN

And a nmap -p8000 localhost gives:

[root@localhost src]# nmap -p8000 localhost

Starting Nmap 4.03 ( http://www.insecure.org/nmap/ ) at 2007-04-23 11:32 CDT
Interesting ports on localhost.localdomain (127.0.0.1):
PORT STATE SERVICE
8000/tcp open http-alt


So the port seems to be open...but ices can't connect to it.

Any help would be greatly appreciated!!!




The rest of the post describes my build procedure and configuration files. Thanks!


My procedure:
============
I checked out, built and installed the following packages yesterday:

svn co http://svn.xiph.org/trunk/ogg
svn co http://svn.xiph.org/trunk/ogg2
svn co http://svn.xiph.org/trunk/theora
svn co http://svn.xiph.org/trunk/speex

And then I checked out, build and installed the following:

svn co http://svn.xiph.org/icecast/branches/kh/ices
svn co http://svn.xiph.org/icecast/branches/kh/icecast
svn co http://svn.xiph.org/icecast/branches/kh/libshout


Only had one problem building ices:

om_shout.o(.text+0x605): In function `output_ogg_shout':
/root/ices_kh_svndir/ices/src/om_shout.c:285: undefined reference to `shout_queuelen'

So I commented out the call to shout_queuelen(..) and recompiled. It then installed fine.


Configuration files
===============

Now I'm running ices with the example ices-playlist.xml file:

<?xml version="1.0"?>
<ices>

<background>0</background> <!-- run in background? (unimplemented) -->
<logpath>/tmp</logpath> <!-- where logs, etc go. -->
<logfile>ices.log</logfile>
<loglevel>4</loglevel> <!-- 1=error,2=warn,3=info,4=debug -->
<logsize>2048</logsize> <!-- the size the log file must be before rotation -->
<consolelog>0</consolelog> <!-- set this to 1 to log to the console instead
of to the file above -->
<pidfile>/var/ices/ices.pid</pidfile> <!-- file to write process id to -->

<stream>

<!-- input module -->
<input>
<module>playlist</module>
<param name="type">basic</param> <!-- Only 'basic' and script implemented -->
<param name="file">playlist.txt</param> <!-- be sure this exists -->
<param name="random">0</param> <!-- random play -->
<param name="once">0</param> <!-- if set to 1 , plays once through, then exits. -->
</input>

<runner>
<!-- Stream instance -->
<instance>
<shout>
<!-- Server details: -->
<hostname>localhost</hostname>
<port>8000</port>
<password>hackme</password>
<mount>/volesunited.ogg</mount>

<reconnectdelay>2</reconnectdelay>
<reconnectattempts>5</reconnectattempts>
</shout>

<encode>
<!-- VBR mode can be selected via quality or nominal-bitrate -->
<!-- selecting enabling managed has to be done separately as -->
<!-- it's slower, but can be used to limit a high threshold -->
<nominal-bitrate>65536</nominal-bitrate> <!-- bps. e.g. 64 kbps -->
</encode>
</instance>
</runner>
</stream>
</ices>





The only change I made was to the name of the mount point (/volesunited.ogg)

My icecast configuration file is very little different from the default icecast file. I include it below for completeness:

<icecast>
<limits>
<clients>100</clients>
<sources>2</sources>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<!-- same as burst-on-connect, but this allows for being more
specific on how much to burst. Most people won't need to
change from the default 64k. Applies to all mountpoints -->
<burst-size>65535</burst-size>
</limits>

<authentication>
<!-- Sources log in with username 'source' -->
<source-password>hackme</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>hackme</relay-password>

<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>hackme</admin-password>
</authentication>

<!-- Uncomment this if you want directory listings -->
<!--
<directory>
<yp-url-timeout>15</yp-url-timeout>
<yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
</directory>
-->

<!-- This is the hostname other people will use to connect to your server.
It affects mainly the urls generated by Icecast for playlists and yp
listings. -->
<hostname>localhost</hostname>

<!-- You can use these two if you only want a single listener -->
<!--<port>8000</port> -->
<!--<bind-address>127.0.0.1</bind-address>-->

<!-- You may have multiple <listener> elements -->
<listen-socket>
<port>8000</port>
<!-- <bind-address>127.0.0.1</bind-address> -->
</listen-socket>
<!--
<listen-socket>
<port>8001</port>
<ssl>1</ssl>
</listen-socket>
-->

<!--<master-server>127.0.0.1</master-server>-->
<!--<master-server-port>8001</master-server-port>-->
<!--<master-update-interval>120</master-update-interval>-->

<!--<master-username>hackme</master-username>-->
<!--<master-password>hackme</master-password>-->

<!-- issue above authentication for relays in slave setup -->
<!--<master-relay-auth>1</master-relay-auth>-->

<!-- setting this makes all relays on-demand unless overridden, this is
useful for master relays which do not have <relay> definitions here.
The default is 0 -->
<!--<relays-on-demand>1</relays-on-demand>-->


<!-- Request the master server to redirect new listeners to this slave
the details passed are based on <hostname> and <port> -->
<!--<master-redirect>1</master-redirect>-->

<!-- The maximum nuber of slaves that can register for new listener
redirection. -->
<!--<max-redirect-slaves>10</max-redirect-slaves>-->

<!-- Relays. State connection information, and by default
request inline metadata for mp3 streams if available.
An on-demand relay will only retrieve the stream if
there are listeners connected -->
<!--
<relay>
<server>127.0.0.1</server>
<port>8001</port>
<mount>/example.ogg</mount>
<local-mount>/different.ogg</local-mount>
<on-demand>1</on-demand>

<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>
-->

<mount>
<mount-name>/vole.ogg</mount-name>
</mount>

<!-- Only define a <mount> section if you want to use advanced options,
like alternative usernames or passwords
<mount>
<mount-name>/example-complex.ogg</mount-name>

<username>othersource</username>
<password>hackmemore</password>

<max-listeners>1</max-listeners>
<dump-file>/tmp/dump-example1.ogg</dump-file>
<burst-size>65536</burst-size>
<fallback-mount>/example2.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<intro>/path/to/stream-intro.ogg</intro>
<max-listener-duration>3600</max-listener-duration>
<hidden>1</hidden>
<authentication type="htpasswd">
<option name="filename" value="myauth"/>
<option name="allow_duplicate_users" value="0"/>
</authentication>
<on-connect>/home/icecast/bin/stream-start</on-connect>
<on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
</mount>
-->
<!-- other auth possibilities include running a command
to do the auth, mount, user and pass are passed via
stdin to the program
<mount>
....
<authentication type="command">
<option name="filename" value="auth_verify"/>
</authentication>

or

for url auth, the add url needs to return a "icecast-auth-user: 1" http
header for a user to authenicate. Both urls are sent params via POST,
add is sent id, mount, user, pass, ip, useragent
remove is passed id, mount, user, pass, duration

<authentication type="url">

state username/password if url requires it

<option name="username" value="admin"/>
<option name="password" value="hackme"/>
<option name="add" value="http://myauthserver.com/scripts/add_listener.php"/>
<option name="remove" value="http://myauthserver.com/scripts/del_listener.php"/>
</authentication>
</mount -->


<fileserve>1</fileserve>

<!-- set the mountpoint for a shoutcast source to use, the default if not
specified is /stream but you can change it here if an alternative is
wanted or an extension is required
<shoutcast-mount>/live.nsv</shoutcast-mount>
-->

<paths>
<!-- basedir is only used if chroot is enabled -->
<basedir>/usr/local/share/icecast</basedir>

<!-- Note that if <chroot> is turned on below, these paths must both
be relative to the new root, not the original root -->
<logdir>/home/msmartin/logs/icecast</logdir>
<webroot>/usr/local/share/icecast/web</webroot>
<adminroot>/usr/local/share/icecast/admin</adminroot>
<!-- <pidfile>/usr/local/share/icecast/icecast.pid</pidfile> -->
<!-- <ssl_certificate>/usr/local/share/icecast/icecast.pem</ssl_certificate> -->

<!-- Aliases: treat requests for 'source' path as being for 'dest' path
May be made specific to a port or bound address using the "port"
and "bind-address" attributes.
-->
<!--
<alias source="/foo" dest="/bar"/>
-->
<!-- Aliases: can also be used for simple redirections as well,
this example will redirect all requests for http://server:port/ to
the status page
-->
<alias source="/" dest="/status.xsl"/>
</paths>

<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<!-- <playlistlog>playlist.log</playlistlog> -->
<loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
<!-- If logarchive is enabled (1), then when logsize is reached
the logfile will be moved to [error|access|playlist].log.DATESTAMP,
otherwise it will be moved to [error|access|playlist].log.old.
Default is non-archive mode (i.e. overwrite)
-->
<!-- <logarchive>1</logarchive> -->
</logging>

<security>
<chroot>0</chroot>
<!--
<changeowner>
<user>msmartin</user>
<group>msmartin</group>
</changeowner>
-->
</security>
</icecast>
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Apr 23, 2007 6:01 pm    Post subject: Reply with quote

Use the standard libshout 2.2.2 release. The libshout code in svn was earlier work to get non-blocking access working. This was merged some time ago, but some of the api changed and the latest ices-kh uses the changed libshout api. This could be the reason why you are having issues.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Thu Apr 26, 2007 12:50 am    Post subject: That worked, thanks! Reply with quote

Hi Karl,
That worked! Thanks!!

cheers

Mat
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Dev Branches All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber