Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

Closed Thread
Thread Tools Search this Thread Display Modes
Old 22nd October 2013, 21:12   #41
winduss
Junior Member
 
Join Date: Oct 2013
Posts: 4
Quote:
Originally Posted by DrO View Post
are you only connecting to the DNAS with sc_trans or are there direct connections made to it? either way, i'd make sure that _any_ source connected to the DNAS server is using the same details (by running it privately, you don't get the fixed title behaviour that comes from a v2 DNAS + authhash).
The DNAS server only has the connection of sc_trans and has no authhash and all this in private, the connection to sc_trans connects from sam broadcaster to broadcast live.

winduss is offline  
Old 23rd October 2013, 08:26   #42
DrO
 
Join Date: Sep 2003
Posts: 27,873
well there's no reason then for the details to be changing if it is definitely just sc_trans which is connecting to the DNAS and nothing else. as there isn't support in sc_trans to relay different station titles from DJ connections provided through it and it should just be showing "Radio PlayMusic".

all i can suggest is making sure that only the sources you want to connect can connect, that there's no remote port access enabled and no duplicate / alternative configurations which might be used to run sc_trans, etc which would allow another instance to connect.

also check the DNAS's logs for anything suspicious as based on what you've said, there's no viable way for the title to do as you're seeing unless something else is connecting to the DNAS with a different title from what you're expecting to see.
DrO is offline  
Old 25th October 2013, 09:41   #43
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
Some problems with new server...

Linux 32 bit

Ran the the new sc_serv in the test environment- removed the old sc_serv, copied the new sc_serv to that directory and then fired up that new sc_serv using the existing sc_serv.conf it seemed to run just fine. (sc_trans running too of course)

So I put the new sc_serv into the production server. Seemed to run OK. Looked at it 6 hours later, sc_serv was at 70% CPU, the sc_serv log was full of this error:
ERROR [YP] Could not resolve host address yp.shoutcast.com Restarting in 30 seconds.
Seen earlier in the log was:
ERROR [MICROSERVER] Could not create signal pipe [Increase the open files (ulimit -n) limit]
I killed sc_serv and did ulimit -n 1024000 then restarted sc_serv

For about 10 minutes the log was filled with:
ERROR SHOUTcast 1 client connection rejected. Stream not available as waiting on a Directory response
On the STATUS html page for the server, it said:
"Server is currently up and waiting on a Directory response.
Listeners are not allowed until the Directory fully responds."

This stopped of it's own accord after about 10 minutes and now everything is running normally.

I'm wondering why I got ERROR [MICROSERVER] Could not create signal pipe [Increase the open files (ulimit -n) limit] I was hoping the whole open files thing would be gone with the new code. As far as I can tell, problems started when connected listener numbers got above about 350~400.
milosz is offline  
Old 25th October 2013, 12:03   #44
DrO
 
Join Date: Sep 2003
Posts: 27,873
you still have to adjust the ulimit -n value according to the listener number requirements - without a complete re-implementation of the DNAS's network handling (which is not viable), that limitation is not possible to be avoided when going over 300+ concurrent listener connections on Linux setups due to the defaults used on that platform.

that is why you were getting that error message and unlike before, it didn't crash which is what would have happened.

for that number of listeners (350-400+), a ulimit -n 2048 should be more than enough to cope with going higher (800-900).

everything else with the v2.2 DNAS will cope fine with large numbers of concurrent listeners, it's that you need to configure the system it's being run on to provide the means for the DNAS to be able to do so (hence having to alter ulimit -b as required for your needs on a Linux setup).


and the delay to be seen and re-listed might be related to the issue Robster400 is having (which i'm still trying to determine the cause off) though if you were getting lots of failed connection requests, it's possible that the YP test connection timed out before it could be appropriately handled (which i have seen with heavy concurrent listener connections).

though i might be making some changes with v2.2.1 so client connections will be allowed even without the Directory response normally needed as long as there's enough appropriate information from the source software (which should already happen on YP connection failures but i'll need to re-check).
DrO is offline  
Old 25th October 2013, 22:26   #45
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
It's odd, I set ulimit -n 1024000 the day before I started the new DNAS in production, it should have been OK. When I checked it after I got the errors, using ulimit -a, it showed a value of 1024. So I set ulimit -n 1024000 and then ulimit -a showed 1024000.

I just checked it now and ulimit -a shows open files as set to 1024. Something changed the value since last night.

I did ulimit -n 4096 just now, and ulimit -a showed the new value "took" - I'll check it again later see if it changes.

I wonder what is changing the value? If I can't figure it out, I can always run a cron job every 5 minutes to set ulimit -n to 4096 I guess.
milosz is offline  
Old 25th October 2013, 22:29   #46
DrO
 
Join Date: Sep 2003
Posts: 27,873
as long as you've got the correct permissions to set it globally, then it should persist. the fact it resets back to the defaults is most likely due to the shell instance timing out.
DrO is offline  
Old 25th October 2013, 22:40   #47
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
Ahh, I see. Even though I am logging in as root, ulimit -n is just setting the open file limit for that session. I thought that since I was root, the change would be global, until the next reboot.

I need to edit etc/security/limits.conf and reboot.

What a pain.
milosz is offline  
Old 25th October 2013, 22:47   #48
DrO
 
Join Date: Sep 2003
Posts: 27,873
ain't linux fun
DrO is offline  
Old 25th October 2013, 23:07   #49
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
OK, I got 4096 to be the new default for open files, everything should be swell now.

With linux at least there are plenty of answers out there for the skilled Googler.
milosz is offline  
Old 26th October 2013, 06:40   #50
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
4096 open files, still getting ERROR [MICROSERVER] Could not create signal pipe

With ulimit -a showing

open files (-n) 4096


sc_serv still gave me:
ERROR [MICROSERVER] Could not create signal pipe [Increase the open files (ulimit -n) limit]
Please advise.....
milosz is offline  
Old 26th October 2013, 09:12   #51
DrO
 
Join Date: Sep 2003
Posts: 27,873
would need a copy of the log as a starting point. probably best to pm me a link so I can see the whole log contents.
DrO is offline  
Old 26th October 2013, 09:36   #52
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
OK, done.
milosz is offline  
Old 26th October 2013, 22:35   #53
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Wow! DrO you are THE KING!
Smelter is offline  
Old 27th October 2013, 15:19   #54
tigac
Junior Member
 
Join Date: Oct 2013
Posts: 1
Hello DrO,

I got a question here, I'm planning to buy a Synology NAS (DS-213J) and this NAS is using LINUX with ARM CPU. Is it possible to install shoutcast server into this device?

I know a little about code and programming, can I use the raspberry one for my NAS?

thank yoh
tigac is offline  
Old 27th October 2013, 15:28   #55
DrO
 
Join Date: Sep 2003
Posts: 27,873
probably not - the raspberry pi version is compiled specifically for that device and is unlikely to be usable on another ARM based device.
DrO is offline  
Old 30th October 2013, 07:44   #56
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
I have to kill and restart my sc_serv every day, just as I did the old one, when too many listeners join. The old version would fire right back up, but the new sc_serv does this thing-
Server is currently up and waiting on a Directory response.
Listeners are not allowed until the Directory fully responds.
Is there a way to prevent this?
milosz is offline  
Old 30th October 2013, 10:33   #57
DrO
 
Join Date: Sep 2003
Posts: 27,873
the old one did the same thing as well, it's just that it's probably more prominent (especially with the DNAS showing it) and because there's a delay added to allow for auto authhash generation etc from the source.

as it waits for the authhash details to come back before it'll allow clients. it's only if there's no YP connection now that it'll allow them through (unless that got broken since it was added internally in early 2012). but there's probably merit in just allowing clients to connect as long as a reasonable name and genre are available from the source being used, is just then some will most likely show different information to a client connected when the YP response has been received (as too many setups don't pay attention to what's set in the source and what's on the authhash - especially in multi-DJ setups).

there is some room for improvement to things and i'll try to do something for the next build. though it still doesn't explain why your setup freaks out when no one elses is doing so even with all of the fixes in the DNAS (as i still suspect it's something to do with the VM that you're using).
DrO is offline  
Old 30th October 2013, 17:10   #58
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
Never ever saw that on the old sc_serv, it must have taken a very short time. Last night, it took 15 min 29 sec before connections were accepted after restarting sc_serv

I've set max users to 250 now, we'll see if microserver still gets open file error at 250, if not then I'll increase to 275 and so on till I find the max it can take.
milosz is offline  
Old 30th October 2013, 17:12   #59
DrO
 
Join Date: Sep 2003
Posts: 27,873
would be more helpful to let it run without limits with all debug logging enabled and send me a copy of that to work through before i start having to make custom builds...
DrO is offline  
Old 30th October 2013, 17:48   #60
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
OK I turned on some debugging

Is this the way to do it in sc_serv.conf?

yp2debug = 1
uvox2sourcedebug =1
microserverdebug = 1
threadrunnerdebug =1
milosz is offline  
Old 30th October 2013, 17:50   #61
DrO
 
Join Date: Sep 2003
Posts: 27,873
i'd just include everything from sc_serv_debug.conf in the examples folder.


[edit]
related posts from alfabravo14 about the lack of v2.2 being on the main download site and other complaints about SHOUTcast have been split into http://forums.winamp.com/showthread.php?t=373428
DrO is offline  
Old 1st November 2013, 21:47   #62
djcenk
Junior Member
 
Join Date: Jan 2005
Posts: 42
Hi DrO
we are waiting for next build.
we need a disconnected listener UID in log file.
When you share a next build approximately
best regards.
thank you, thank you, thank you.
djcenk is offline  
Old 2nd November 2013, 06:29   #63
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
Ubuntu 12.04 32 bit server

New sc_serv is run as root, and root is confirmed to have a limit of 4096 open files

At about 280 listeners I am getting the following from the new sc_serv

2013-11-02 02:25:12 DEBUG [MICROSERVER] Connection received from 24.144.217.62:54978
2013-11-02 02:25:12 DEBUG [THREADRUNNER] Thread 0 amt=153
2013-11-02 02:25:12 DEBUG [THREADRUNNER] Thread 1 amt=152
2013-11-02 02:25:12 DEBUG [THREADRUNNER] Adding microConnection to thread 1
2013-11-02 02:25:12 DEBUG [THREADRUNNER] Thread 0 amt=153
2013-11-02 02:25:12 DEBUG [THREADRUNNER] Thread 1 amt=153
2013-11-02 02:25:12 DEBUG [THREADRUNNER] Adding protocol_HTTPStyle to thread 0
2013-11-02 02:25:12 DEBUG [THREADRUNNER] Removing microConnection from thread 1
2013-11-02 02:25:12 ERROR [MICROSERVER] Could not create signal pipe [Increase the open files (ulimit -n) limit]
2013-11-02 02:25:12 DEBUG [THREADRUNNER] Removing protocol_HTTPStyle from thread 1
2013-11-02 02:25:12 ERROR [MICROSERVER] Could not create signal pipe [Increase the open files (ulimit -n) limit]
2013-11-02 02:25:12 DEBUG [THREADRUNNER] Removing protocol_HTTPStyle from thread 0
2013-11-02 02:25:12 ERROR [MICROSERVER] Could not create signal pipe [Increase the open files (ulimit -n) limit]
2013-11-02 02:25:12 DEBUG [THREADRUNNER] Removing protocol_HTTPStyle from thread 0
milosz is offline  
Old 2nd November 2013, 06:34   #64
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
Under the same conditions listed above, I am also getting

2013-11-02 02:28:02 ERROR [YP] Could not resolve host address yp.shoutcast.com Restarting in 30 seconds.
2013-11-02 02:28:02 DEBUG [YP] gotFailure Request key=1 cmd=2
2013-11-02 02:28:32 ERROR [YP] Could not resolve host address yp.shoutcast.com Restarting in 30 seconds.
2013-11-02 02:28:32 DEBUG [YP] gotFailure Request key=1 cmd=2
2013-11-02 02:29:02 ERROR [YP] Could not resolve host address yp.shoutcast.com Restarting in 30 seconds.
2013-11-02 02:29:02 DEBUG [YP] gotFailure Request key=1 cmd=2
2013-11-02 02:29:32 ERROR [YP] Could not resolve host address yp.shoutcast.com Restarting in 30 seconds.
2013-11-02 02:29:32 DEBUG [YP] gotFailure Request key=1 cmd=2

I do not think there is any network issue resolving yp.shoutcast.com - nslookup returns a sensible answer

root@vds:~# nslookup yp.shoutcast.com
Server: 66.90.68.26
Address: 66.90.68.26#53

Non-authoritative answer:
yp.shoutcast.com canonical name = scdp-ypc-apache.egslb.aol.com.
Name: scdp-ypc-apache.egslb.aol.com
Address: 205.188.87.240
milosz is offline  
Old 5th November 2013, 01:31   #65
kapitanluffy
Junior Member
 
Join Date: Nov 2013
Posts: 12
What is the second port that is being opened? When the portbase is 8000, another port is opened which is 8001. Is there a way to set a specific port for this?
kapitanluffy is offline  
Old 5th November 2013, 02:04   #66
DrO
 
Join Date: Sep 2003
Posts: 27,873
the 'portbase+1' is what is used to allow for legacy (v1 protocol) based sources to connect to the DNAS. if not using any legacy source software, you can use portlegacy (see docs included with the DNAS) to disable or use a different port if wanted.

so if you're using all v2 protocol based source software you can disable that legacy port and it'll all run on the single port. if not you can move it to a different port but you then have to use 'portlegacy-1' as the value entered into the source software so it'll work correctly (confusing i know but legacy source software knows to use 'portbase+1' so you have to fool it to adjust for that.
DrO is offline  
Old 5th November 2013, 02:14   #67
kapitanluffy
Junior Member
 
Join Date: Nov 2013
Posts: 12
Oh stupid me, I was looking in the online doc. The doc included is much better. Another dumber question, what is this legacy you are talking about?
kapitanluffy is offline  
Old 5th November 2013, 02:27   #68
DrO
 
Join Date: Sep 2003
Posts: 27,873
legacy is anything using the v1 protocol i.e. from the v1.x DNAS days.

the v2.x DNAS supports the legacy v1 protocol but to get the full benefit of things, it's best to try to use something that will connect using the v2 protocol e.g. sc_trans v2 or Source DSP v2.

so depending on what you're going to be using as the source software, you may need to use the legacy port, you may not.
DrO is offline  
Old 5th November 2013, 03:51   #69
kapitanluffy
Junior Member
 
Join Date: Nov 2013
Posts: 12
thanks. i can't connect to the server. here is the source login details

--
Stream ID: 1
Server Address: listen.piratelufi.com (*)
Source Port: 8080
Legacy Source Port: -1
Password: awesomepassword
Max Bitrate Allowed: Unlimited
Protocol Mode: v1 or v2
--

here is the server config
--
adminpassword=pass
maxuser=200
password=word
portbase=8080
portlegacy=0
streamadminpassword_1=pass
streamid_1=1
streampassword_1=word
streampath_1=radio
srcip=127.2.2.129
--

I am currently running it through openstack. the ip of `listen.piratelufi.com` is different than the source ip. inside the server, i can only bind to that specific ip (in this case 127.2.2.129). same with the port (port 8080). the port 80 from `listen.piratelufi.com` will be automatically routed to 8080.

when i connect to the server using the login details. it just says
"Unable to connect to the server. Try enabling ShoutcAst v1 mode"
here is the log

--
2013-11-05 12:50:44 Connecting to... Server: listen.piratelufi.com; Port: 80; Mode: v2; Stream ID: 1; DJ / User ID: n/a
2013-11-05 12:50:45 Cipher Response Received
2013-11-05 12:50:45 Unable To Connect To The Server. Try enabling 'SHOUTcast v1 mode'.
--
kapitanluffy is offline  
Old 5th November 2013, 06:30   #70
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
Is there any way to speed up the time it takes for sc_serv to get acknowledgement from YP? sc_serv stopped accepting listeners again tonight (as it does every night when 260 or more try to connect-) and so I had to restart it, and tonight it took 45 minutes before it let anyone connect as it was waiting for acknowledgement from the directory.
milosz is offline  
Old 5th November 2013, 11:41   #71
DrO
 
Join Date: Sep 2003
Posts: 27,873
milosz: 45mins??? there is something seriously not right with the interaction of the DNAS with your setup as also 280 listeners is well below the file handle threshold unless somehow something on the system is keep them alive when it's not meant to be and is then exhausting them.

as for the new question, there isn't anything in place as i've still to make the code changes needed to allow things through if there is a YP failure / taking too long (as already discussed earlier) but as i'm working on another project at the moment, until that is finished i am not in a position to be able to make DNAS changes and provide a test build as is needed to work out what on earth is going on with your setup as there's nothing to make sense of what the logs and you're reporting is happening.


kapitanluffy: remove the srcip line and instead set destip=listen.piratelufi.com in the config file. it will likely not bind (and will indicate a warning in the log output but will continue to run) though as i'm already able to hit listen.piratelufi.com and see the DNAS's root page, then it means the routing rules are ok and it'll help you in the long run in providing tune-in links with a DNS name instead of an IP address i.e. so you can move things around and it generally not break the listings.

as setting srcip will only allow connections from that IP and with how things are otherwise setup, it seems like that option isn't going to work too well (never generally does when going through routing).
DrO is offline  
Old 5th November 2013, 13:16   #72
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
Hmm. I checked and with 150 listeners sc_serv has about 300 files open, most of which are pipes. Other processes have many MORE files open...

I have now set the hardlimit and softlimit to the maximum number 65536, so root will now have the maximum permitted open files. We'll see how that goes.

In the meantime I'll track down what has got all these open files, and see if I can't rid myself of that process.
milosz is offline  
Old 5th November 2013, 14:38   #73
kapitanluffy
Junior Member
 
Join Date: Nov 2013
Posts: 12
Sorry for spamming the reply. I sent two replies thought the first one didn't get through. I already did it by tunneling to my local machine. You can check my post here if you want to do the exact same thing. http://blog.piratelufi.com/2013/11/u...utcast-server/

Kindly edit the post if this doesn't go by the rules. Thanks DrO for pointing me to the right docs.
kapitanluffy is offline  
Old 5th November 2013, 15:23   #74
DrO
 
Join Date: Sep 2003
Posts: 27,873
rightio, btw there's a typo on the post where you say access address/set when it should be address/setup, otherwise it all seems to make sense as you're setting up port-forwarding specific to that setup. though it might be an idea if i add the destip and publicport options to the setup mode (maybe even the legacy port) as that would simplify the setup process quite a bit for what you're trying to do.
DrO is offline  
Old 5th November 2013, 15:28   #75
kapitanluffy
Junior Member
 
Join Date: Nov 2013
Posts: 12
I think you can add the config builder within the setup. Like an advanced setup mode.
kapitanluffy is offline  
Old 5th November 2013, 19:14   #76
DrO
 
Join Date: Sep 2003
Posts: 27,873
that's already possible and is why there's the /setup and /builder modes, but the point of the /setup mode is to do the most common / important things and setting the destip for example makes more sense to be in there (especially as a way to make it more obvious to use DNS items. whereas /builder is more about DNAS + sc_trans setups so is not the primary option.
DrO is offline  
Old 6th November 2013, 07:51   #77
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
The sc_serv session has 65536 max open file limit now. (hard limit and soft limit)

I started getting "ERROR [MICROSERVER] Could not create signal pipe [Increase the open files (ulimit -n) limit]" at around 270 listeners again; it was not possible for new clients to connect to the server, although existing connections were getting the stream OK.

While the error was seen repeating in the log, sc_serv was showing 60% CPU. I used lsof and verified that there were 6456 open files, far less than the 65536 file limit. So I suspect that sc_serv is not actually running out of open files, but that something else is going on.

Any suggestions? Ideas? Am I the only one seeing problems at high-ish listener numbers? How do the commercial streaming services offer Shoutcast servers with listener capacities on the same port so much higher than the ~260 that sc_serv seems capable of handling? Is there some other Shoutcast server software out there, maybe commercial stuff? I mean, sc_serv is great, it's free, but doesn't seem to be able to handle the listener load that I routinely get.
milosz is offline  
Old 6th November 2013, 09:25   #78
DrO
 
Join Date: Sep 2003
Posts: 27,873
that possibly confirms my suspicion that either you've found a legit bug in the DNAS that its not releasing handles or the platform you're using is doing it. as you're the only one I'm aware off having the issue and there's a few things which can be tried once I'm able to work on a test build later this week.

and 270 is not a high number of listeners even compared to the loads I've used for general and active testing of the DNAS (typically in the 512 - 1500 range). so there's a few things which can be done which I'll follow up with you directly on later this week.
DrO is offline  
Old 6th November 2013, 09:59   #79
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
I'm wondering why sc_serv thinks there's no available open file capacity to create pipes when the limit is 65536 and there's 6456 currently in use - there's spare capacity to allow another 59,080 open files yet sc_serve thinks it can't open any more.

I see the various other processes running on the machine that have files open for their purposes.... nothing stands out as using up gobs of files. There's some un-necessary stuff that's running that I can get rid of, like a Bluetooth service (WTF? yeah it came with the distro) so I'll prune some of that away.

But even with perhaps a thousand files being opened by useless daemons, there should still be plenty of capacity.

I'll look at other system resources, maybe something else is in short supply and sc_serv experiences it as a lack of available file handles.
milosz is offline  
Old 6th November 2013, 10:17   #80
DrO
 
Join Date: Sep 2003
Posts: 27,873
because that's what it's coded to do when getting specific error messages back when trying to create the parts needed and is one of the areas i am going to start checking out. plus just because the limit is set, it doesn't mean the OS will provide access to that many. though 6000+ just doesn't seem right and i'm still thinking it's something about the VM which is causing it but won't know until we start on the test build route.
DrO is offline  
Closed Thread
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

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