mandanai / php-sip

Automatically exported from code.google.com/p/php-sip
0 stars 0 forks source link

Failed to bind 192.168.32.5:12 Permission denied #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I was getting proper responses for a bit, but am now getting the following 
message:
Failed to bind 192.168.32.5:61 Unknown host

Not sure what I did to make that happen, but I cant seem to get it to do 
anytihng but that.  Contents to $api are as follows:

                                $api = new PhpSIP('192.168.32.5');
                                $api->setUsername($ext);
                                $api->setPassword($ext_secret);
                                $api->addHeader('Event: resync');
                                $api->setMethod('NOTIFY');
                                $api->setFrom($uri);
                                $api->setUri($uri);

I have tried using no IP with the same result.

What is the expected output? What do you see instead?
I suppose I should get some response back from my endpoint.

What version of the product are you using? On what operating system?
latest, on ubuntu 10.10

Original issue reported on code.google.com by cullenlo...@openipsolutions.com on 27 Jul 2011 at 5:18

GoogleCodeExporter commented 9 years ago
I should note that the port increases by one every time the script is run.

Original comment by cullenlo...@openipsolutions.com on 27 Jul 2011 at 5:19

GoogleCodeExporter commented 9 years ago
Hi, can you try deleting /dev/shm/cache/PhpSIP.lock and run your script again?

Original comment by ch...@wima.co.uk on 27 Jul 2011 at 5:26

GoogleCodeExporter commented 9 years ago
Does not exist anywhere on the system.

Original comment by cullenlo...@openipsolutions.com on 27 Jul 2011 at 5:41

GoogleCodeExporter commented 9 years ago
Rebooting fixed it for now, but I still dont know hwy it happened.

Original comment by cullenlo...@openipsolutions.com on 27 Jul 2011 at 5:50

GoogleCodeExporter commented 9 years ago
I'm having the same kind of problem with "Failed to bind {local_ip}:{port} 
Permission denied"
The problem is that only root can bind ports <= 1024 (privileged ports)...
How come that php-sip tries to bind to such ports? - In my case, I had such low 
numbers in the file /tmp/phpSIP.lock .
But I have no clue, how this happened. Usually, this file doesn't even exist on 
my system - but in some cases, it seems to be created (and/or not deleted 
afterwards...)

Original comment by pfig...@gmail.com on 21 Dec 2011 at 10:44

GoogleCodeExporter commented 9 years ago
same for me /tmp/phpSIP.lock contained:

5065,1,2,3,4,5,6,7,8,9,10,11,12,13,5066,14

I deleted it and now it is incrementing correctly from min_port. It looks like 
a bug in the getPort() function, possibly asort($pids,SORT_NUMERIC); is in the 
wrong place?

Original comment by alanbell...@gmail.com on 27 Sep 2013 at 11:18