Old 3rd March 2012, 02:05   #1
LCCSBroadcastin
Junior Member
 
Join Date: Nov 2009
Posts: 7
multi cpu - could not bind

Hello,

I am using DNAS/posix(linux x64) v2.0.0.29 (Jul 31 2011) on a dual-core Opteron, 64-bit Linux system.

I tried setting cpucount to 0, 1 and 2 (and removing it), but I always get this when I try to start up:

Quote:
2012-03-02 20:59:36 I msg:<***> Logger startup
2012-03-02 20:59:36 I msg:<***> version 2.0.0.29
2012-03-02 20:59:36 D msg:<***>
2012-03-02 20:59:36 I msg:***************************************************************
2012-03-02 20:59:36 I msg:** SHOUTcast Distributed Network Audio Server (DNAS)
2012-03-02 20:59:36 I msg:** Copyright (C) 1999-2011 Nullsoft, Inc. All Rights Reserved.
2012-03-02 20:59:36 I msg:** Use "sc_serv filename.conf" to specify a config file.
2012-03-02 20:59:36 I msg:***************************************************************
2012-03-02 20:59:36 I msg:[SHOUTcast] DNAS/posix(linux x64) v2.0.0.29 (Jul 31 2011) starting up...
2012-03-02 20:59:36 I msg:[MAIN] PID: 6845
2012-03-02 20:59:36 I msg:[MAIN] Loaded config from dnas_config.ini
2012-03-02 20:59:36 I msg:[MAIN] Calculated CPU count is 2
2012-03-02 20:59:36 I msg:[MAIN] Starting 2 network threads
2012-03-02 20:59:36 I msg:[MICROSERVER] Listening for connection on port 12345
2012-03-02 20:59:36 I msg:[MICROSERVER] Listening for connection on port 12345
2012-03-02 20:59:36 E msg:Error opening port 12345 because Could not bind to :12345 because Address already in use
2012-03-02 20:59:36 I msg:[MAIN] Runner shutdown
2012-03-02 20:59:37 I msg:<***> Logger shutdown

Nothing else is listening on that port, srcip is specified (but doesn't seem to be logged here, not sure if it should) and no other instances are running (nothing is listening on port 12345).

It seems like it starting these two network threads (based on calculated cpu count) and they are each trying to listen - which will never work...

Also, I'm unsure why the 'cpucount' setting doesn't seem to override. It always says "Calculated CPU count is 2"

Any ideas would be greatly appreciated.
LCCSBroadcastin is offline   Reply With Quote
Old 3rd March 2012, 02:26   #2
LCCSBroadcastin
Junior Member
 
Join Date: Nov 2009
Posts: 7
srcip vs serverip

changing srcip to serverip resolved the issue, but clearly something is not working properly (and not documented properly)
LCCSBroadcastin is offline   Reply With Quote
Old 3rd March 2012, 03:07   #3
LCCSBroadcastin
Junior Member
 
Join Date: Nov 2009
Posts: 7
when srcip is not used, it start up - but listens on 0.0.0.0, not serverip.

Clearly this is broken. Has anyone else run into this?
LCCSBroadcastin is offline   Reply With Quote
Old 3rd March 2012, 03:13   #4
LCCSBroadcastin
Junior Member
 
Join Date: Nov 2009
Posts: 7
when the wiki says: "Also you cannot set srcip and dstip / destip to be the same IP value" - it really means, if you want this to work properly, set them to the same value.
LCCSBroadcastin is offline   Reply With Quote
Old 4th March 2012, 22:20   #5
DrO
 
Join Date: Sep 2003
Posts: 27,873
srcip is only there to control the IP of source connections made to the DNAS so i don't see the documentation as being wrong since there's no other way to say what it is there to do. unless you have a specific reason to even set srcip, it should not need to be used.

so if srcip isn't set, then 0.0.0.0 internally means allow any source connection (as long as the password, etc is correct).

------------------------------

with the cpu count, that is working correctly since the message clearly states it's the 'calculated' count and does not mean the same as the number actually being used. yes the message probably should be different to indicate what is being used vs what is calculated (will log it as something to consider being reviewed for a later release).

so the current way to determine what is actually being used is to look at the 'Starting xxx network threads' line which shows how many are actually being used.

in all honesty, i'm surprised someone has even posted about that when pretty much most people don't generally seem to pay any attention to the log messages, let alone something specific like that.

[edit]
Have changed things internally to show either of the following for that message:
Calculated CPU count is 4 -> using all available CPU(s)
Calculated CPU count is 4 -> 2 CPU specified to be used


-daz
DrO is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Tags
bind, cpu, dnas, network, shoutcast

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