Old 16th July 2010, 15:59   #1
deadeyese
Junior Member
 
Join Date: Jul 2010
Posts: 12
SHOUTcast Linux Configuration

Hi guys,

Ive been trawling over the internet and through the SHOUTcast forums but ive yet to find an answer to the error that im receiving.

Im trying to setup a SHOUTcast server on a Linux (CentOS 5.5) remote system. The server has its own dedicated IP Address to the outside world (its a rented 100Mbps BT Line - yes 100Mbps outside line, not the speed from the server to the switch) and isnt behind any firewall or router (I promise). The software firewall on CentOS is set to allow ports 8000 and 8001 through on both tcp and udp.

When I try to start the SHOUTcast server (/usr/bin/sc_serv daemon /etc/sc_serv.conf) I get the following dumped to a log file and the console:

code:

2010-07-16 16:33:08 I msg:<***> Logger startup
2010-07-16 16:33:08 I msg:<***> version 0.2.0.0 build 0.0.7.0
2010-07-16 16:33:08 D msg:<***>
2010-07-16 16:33:08 I msg:[main] calculated cpu count is 4
2010-07-16 16:33:08 I msg:[main] starting 4 network threads
2010-07-16 16:33:08 I msg:[ban] Banned 0 IP's
2010-07-16 16:33:08 I msg:[rip] 0 entries in rip list
2010-07-16 16:33:08 E msg:No such file or directory
2010-07-16 16:33:08 I msg:[main] Terminating sources
2010-07-16 16:33:08 I msg:[main] Waiting for final YP remsrvs
2010-07-16 16:33:08 I msg:[main] Runner shutdown
2010-07-16 16:33:08 I msg:<***> Logger shutdown




My configuration file is as follows (I went through EVERY option double and triple checking the values).

code:

log=1
logfile=/var/log/shoutcast/sc_serv.log
screenlog=1
w3cenable=1
w3clog=/var/log/shoutcast/sc_w3c.log
webclientdebug=0
yp1debug=0
yp2debug=0
shoutcastsourcedebug=0
uvox2sourcedebug=0
shoutcast1clientdebug=0
shoutcast2clientdebug=0
relayshoutcastdebug=0
relayuvoxdebug=0
relaydebug=0
streamdatadebug=0
httpstyledebug=0
statsdebug=0
microserverdebug=0
threadrunnerdebug=0
flashpolicyfile=/var/log/shoutcast/crossdomain.xml
buffertype=0
fixedbuffersize=1024*1024
adaptivebuffersize=1
bufferhardlimit=16777216
#uvoxcihperkey=foobar
namelookups=0
portbase=8000
autodumpsourcetime=30
maxheaderlinesize=2048
maxheaderlinecount=100
password=*********
adminpassword=********
yp2=0
ypaddr=yp.shoutcast.com
ypport=80
yppath=/yp2
yptimeout=60
ypmaxretries=10
ypreportinterval=300
ypminreportinterval=10
publicserver=default
banfile=/usr/local/shoutcast/sc_serv.ban
savebanlistonexit=1
ripfile=/usr/local/shoutcast/sc_serv.rip
saveriplistonexit=1
riponly=0
maxuser=2048
listenertime=0
autodumpusers=0
#srcip
#dstip



I should also not that ive attempted to change the yppath to both "/" and "/yp" just to see if this would work but I get the same results.

Im sure its something stupidly simple, but there we go. Greatly appreciate any help provided. Any other information you need, feel free to ask, I think I covered everything.
deadeyese is offline   Reply With Quote
Old 18th July 2010, 17:30   #2
deadeyese
Junior Member
 
Join Date: Jul 2010
Posts: 12
Sorry for the bump

Anybody have any ideas? Ive seen some other topics get answered but nothing relavant to my particular problem
deadeyese is offline   Reply With Quote
Old 18th July 2010, 18:12   #3
elbow
Junior Member
 
Join Date: Apr 2010
Posts: 19
try putting the files in the home dir and start via ssh ./sc_serv sc_serv.conf
elbow is offline   Reply With Quote
Old 18th July 2010, 18:42   #4
deadeyese
Junior Member
 
Join Date: Jul 2010
Posts: 12
Same result unfortunately

I moved all related files in to the same directory (/usr/local/shoutcast) and edited the sc_serv.conf file accordingly (using non-absolute paths).

I even created a specific "shoutcast" user and assigned all the files and that folder to it (including group). I get the exact same message come up from the console "msg:No such file or directory" - it would be helpful to know what it was even looking for that caused this error.
deadeyese is offline   Reply With Quote
Old 18th July 2010, 18:45   #5
elbow
Junior Member
 
Join Date: Apr 2010
Posts: 19
Did you download the correct version of shoutcast? Centos, freebsd, etc.
elbow is offline   Reply With Quote
Old 18th July 2010, 18:51   #6
deadeyese
Junior Member
 
Join Date: Jul 2010
Posts: 12
From what I can see in the downloads section no matter what you select you get the same zip and inside contains the binaries for bsd, linux, macIntel, macPPC and win32. By process of elimination, its definitely not win32 or the mac which leaves bsd and linux. Obviously, CentOS is not bsd, therefore must be linux, right? Also, if the binaries were for the wrong distribution I would have expected sc_serv to complain and not run full stop.

I have a fair amount of experience with linux (primarily RedHat based distros such as CentOS) so im pretty certain it must be a config error.

Just for the hell of it, I downloaded and setup a system on my local win32 machine. Copied the config exactly and simply adjusted the directories to point to C:\Shoutcast\ etc and the darn thing fired up without complaining. I dont understand the error, i get that a file or directory is missing somewhere, but what one? lol
deadeyese is offline   Reply With Quote
Old 18th July 2010, 19:14   #7
elbow
Junior Member
 
Join Date: Apr 2010
Posts: 19
ahhh you're running 2.0. I've never ran 2.0 on CentOS before but from what I see in the zip it is confusing as hell. I have a copy of 1.9.8 for CentOS you can have if needed.
elbow is offline   Reply With Quote
Old 18th July 2010, 19:15   #8
deadeyese
Junior Member
 
Join Date: Jul 2010
Posts: 12
Sure, that would be pretty helpful. I need to try and get this Shoutcast server up and running as soon as possible really

Thanks for all your help none the less, its really appreciated
deadeyese is offline   Reply With Quote
Old 18th July 2010, 19:20   #9
elbow
Junior Member
 
Join Date: Apr 2010
Posts: 19
Here you go good sir

http://www.insidevside.com/radio/ser...8_Linux.tar.gz
elbow is offline   Reply With Quote
Old 18th July 2010, 20:19   #10
deadeyese
Junior Member
 
Join Date: Jul 2010
Posts: 12
Just to update, I managed to get hold of v1.9.8 (which I could have sworn I couldnt find before after searching for it) and its installation was so simple and easy and it worked first time.

If anybody having the same issue would like a copy and you dont mind reverting to the older software, feel free to contact me on these forums/this thread.
deadeyese is offline   Reply With Quote
Old 18th July 2010, 21:07   #11
elbow
Junior Member
 
Join Date: Apr 2010
Posts: 19
I had PMd you the link and posted it here, but the post had to be accepted and I'm guessing you didn't read your PMs.

But yes, I never plan on upgrading to 2.0. Ever.
elbow is offline   Reply With Quote
Old 19th July 2010, 02:01   #12
krazybadboy
Junior Member
 
Join Date: Jul 2010
Posts: 2
This is my config it works fine:
Quote:
log=1
logfile=/sc_serv.log
screenlog = 1
w3cenable = 1
w3clog = sc_w3c.log
webclientdebug = 0
yp1debug = 0
yp2debug = 0
shoutcastsourcedebug = 0
uvox2sourcedebug = 0
shoutcast1clientdebug = 0
shoutcast2clientdebug = 0
relayshoutcastdebug = 0
relayuvoxdebug = 0
relaydebug = 0
streamdatadebug = 0
httpstyledebug = 0
statsdebug = 0
microserverdebug = 0
threadrunnerdebug = 0
flashpolicyfile = crossdomain.xml
buffertype = 0
fixedbuffersize = 1024 * 1024
adaptivebuffersize = 1
bufferhardlimit = 16777216
metainterval = 8192
namelookups = 0
portbase = 8000
autodumpsourcetime=30
maxheaderlinesize = 2048
maxheaderlinecount = 100
password=*******
adminpassword=********
banfile = sc_serv.ban
savebanlistonexit = 1
ripfile = sc_serv.rip
riponly = 0
maxuser=60
listenertime = 0
autodumpusers = 0
configrewrite = 0
songhistory = 20
cpucount = 0
unique = $
allowrelay = 1
allowpublicrelay = 1
relayreconnecttime = 30
maxhttpredirects = 5
srcip=any
dstip=any
titleformat=Hero-Scape Radio
The problem is... I get this error:

Quote:
root@****** [/home/*****/linux]# ./sc_serv config.ini
2010-07-18 21:59:20 I msg:<***> Logger startup
2010-07-18 21:59:20 I msg:<***> version 0.2.0.0 build 0.0.7.0
2010-07-18 21:59:20 D msg:<***>
2010-07-18 21:59:20 I msg:[main] calculated cpu count is 4
2010-07-18 21:59:20 I msg:[main] starting 4 network threads
2010-07-18 21:59:20 I msg:[ban] Banned 0 IP's
2010-07-18 21:59:20 I msg:[rip] 0 entries in rip list
2010-07-18 21:59:20 I msg:[microServer]Listening for connection on port 8001
2010-07-18 21:59:20 I msg:[microServer]Listening for connection on port 8000
2010-07-18 21:59:23 I msg:[src 76.xx.xx.xx:53694 sid=1] Shoutcast source connection.
2010-07-18 21:59:23 E msg:[src 76.xx.xx.xx:53694 sid=1] [src 76.xx.xx.xx:53694 sid=1] connection rejected. Bad icy header string [icy-genre:]
2010-07-18 21:59:23 E msg:[src 76.xx.xx.xx:53694 sid=1] connection rejected. Bad icy header string [icy-genre:]
2010-07-18 21:59:24 I msg:[admincgi]title update [ Pitbull - Shut It Down (feat. Akon)]
2010-07-18 21:59:24 E msg:[admincgi]title rejected. Stream does not exist
2010-07-18 21:59:25 E msg:[src 76.xx.xx.xx7:53696] Remote socket closed while waiting for data
krazybadboy is offline   Reply With Quote
Old 19th July 2010, 02:47   #13
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,276
Quote:
Originally Posted by krazybadboy View Post
This is my config it works fine:


The problem is... I get this error:
Clearly there is something about the Genre that the source client is sending that sc_serv2 does not like

Is it just me or are shoutcast users getting dumber?
jaromanda is offline   Reply With Quote
Old 19th July 2010, 05:18   #14
krazybadboy
Junior Member
 
Join Date: Jul 2010
Posts: 2
Quote:
Originally Posted by jaromanda View Post
Clearly there is something about the Genre that the source client is sending that sc_serv2 does not like


got it fixed, you have to fill in a genre and a website
krazybadboy is offline   Reply With Quote
Old 19th July 2010, 09:09   #15
bored_womble
Winamp's Womble
 
bored_womble's Avatar
 
Join Date: May 2004
Location: Wimbledon Common
Posts: 1,100
2 Sc_serv2 bugs

Quote:
Originally Posted by deadeyese View Post
Sure, that would be pretty helpful. I need to try and get this Shoutcast server up and running as soon as possible really

Thanks for all your help none the less, its really appreciated
It looks like there is a DNS/Hostname resolution bug/code within sc_serv2 so if your hostname does not resolve locally or remotely sc_serv2 stops.

Debug as follows

i) DNS bug. If the hostname does not resolve then sc_serv2 stops.

How to replicate the bug

/etc/hosts

127.0.0.1 localhost
192.168.0.1 audio-stream-9.test audio-stream-9

/etc/hostname

audio-stream-2

/etc/resolv.conf

search testing
nameserver 195.92.195.92
#nameserver 8.8.4.4

strace below

Monnect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("195.92.195.92")}, 28) = 0
fcntl64(7, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(7, F_SETFL, O_RDWR|O_NONBLOCK) = 0
gettimeofday({1278415871, 724341}, NULL) = 0
poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
send(7, "\342N\1\0\0\1\0\0\0\0\0\0\16audio-stream-2\7test"..., 40, 0) = 40
poll([{fd=7, events=POLLIN}], 1, 5000) = 1 ([{fd=7, revents=POLLIN}])
ioctl(7, FIONREAD, [115]) = 0
recvfrom(7, "\342N\201\203\0\1\0\0\0\1\0\0\16audio-stream-2\7test"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("195.92.195.92")}, [16])
= 115
close(7) = 0
futex(0xb7e45be4, FUTEX_WAKE, 2147483647) = 0
time([1278415871]) = 1278415871
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
futex(0x81b9d54, FUTEX_WAKE, 1) = 1
time([1278415871]) = 1278415871
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
time([1278415871]) = 1278415871
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
time([1278415871]) = 1278415871
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(5, "\23", 1) = 1
futex(0xb6ad8bf8, FUTEX_WAIT, 1770, NULL2010-07-06 11:31:11 E msg:No such file or directory
2010-07-06 11:31:11 I msg:[main] Terminating sources
2010-07-06 11:31:11 I msg:[main] Waiting for final YP remsrvs
2010-07-06 11:31:11 I msg:[main] Runner shutdown
) = 0
shutdown(4, 2 /* send and receive */) = -1 ENOTSOCK (Socket operation on non-socket)
close(4) = 0
shutdown(5, 2 /* send and receive */) = -1 ENOTSOCK (Socket operation on non-socket)

Really if the hostname does not resolve ( ok it should but lets not dwel on stupid configuration issues
on the host), then it should bind to all addresses ie. 0.0.0.0, which it does anyway when the hostname
does resolve.

ii) If YP2=0 and multi streams are used them sc_serv2 stops working. Even if you do not want to be listed
in a YP then this must be set to 1 which seems broken, or perhaps needs renaming.

Perhaps the devs will take note and fix it.

Without open minds the world will die. Open yours and correct the mistakes you are making right now.

Last edited by bored_womble; 19th July 2010 at 10:02.
bored_womble is offline   Reply With Quote
Old 19th July 2010, 12:08   #16
deadeyese
Junior Member
 
Join Date: Jul 2010
Posts: 12
Hmm, if it is DNS issues then that might make some sense. The network is fairly complex;

The server has two connections; one to a switch and out on to the internet with its own dedicated IP and the other goes to another switch which is managed by the internal network (this is a statically assigned internal address). I know it sounds un-necessary but its so that the server can resolve names on the internal network (which is hidden from the outside world). As such, the DNS on the server points to the internal DNS server to resolve names which in-tern forwards these requests on to Google if it doesnt know.

Could this have any implication on resolving the name of the server? (which should only need to be resolved on the internal network right?)

Either way, its a complex issue just to contact yp.shoutcast.com etc


Edit:

Had some interest in the older version of shoutcast so ive uploaded to here;

code:

http://www.imperial-empire-se.com/temp/sc_serv_1.9.8_Linux.tar.gz

deadeyese is offline   Reply With Quote
Old 21st July 2010, 11:52   #17
deadeyese
Junior Member
 
Join Date: Jul 2010
Posts: 12
Hey guys, sorry for double posting, it wouldnt let me edit :s

But anyways, thought id give a final update and bits and pieces incase anyone else has this issue. SHOUTcast 2.0 is now working and broadcasting fine. The error appears to have been caused by DNS issues. Because of the strange network setup, some requests were sent to the internal network and then passed out through a different router (which has a different address) instead of the actual network card connected to the outside world. Also, the DNS server wasnt configured to inform other clients of the address of the servers name so again another issue. By forcing all external routes (only have the default gateway on the external NIC) and of course fixing the DNS means that SHOUTcast 2.0 fired up and worked straight away.

Thanks again to everyone who helped out with this problem and hopefully the development team can make "No such file or directory" a little clearer :P
deadeyese is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > SHOUTcast > SHOUTcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump