[OpenSIPS-Users] osipsconsole address failed

Mimi Cafe mimicafe at gmail.com
Mon Dec 17 10:18:16 CET 2012


Hi Bogdan-Andrei

This is not a big issue for me because I added the values for database 
connectivity into osipsconsole script, and it works fine for me. My idea 
was to share this so it can be fixed in future revisions (if 
necessarry), otherwise I'm fine.

My OpenSIPS installation is in a lab environment within my local LAN and 
it's not accessible from the internet. BUt if you really want to take a 
look to try to find the root cause to fix in future revisions, then I'm 
happy to allow you access to the network.

Ciao

Mimi

On 14/12/2012 12:22, Bogdan-Andrei Iancu wrote:
> Strange, I would say .... It may be something really particular to 
> your setup or so.
>
> I there any possibility to investigate it directly on the system ?
>
> Regards,
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> On 12/13/2012 09:30 PM, Mimi Cafe wrote:
>>
>> I have looked at my command history and as you can see below, I 
>> pulled version 1.8 from the svn branch (that was before you fixed the 
>> osipsconfig two days ago).
>>
>>
>>   640  sudo svn co 
>> https://opensips.svn.sourceforge.net/svnroot/opensips/branches/1.8 
>> opensips-1.8
>>   641  cd opensips-1.8/
>>   642  sudo make menuconfig
>>
>> Also, version info shows reveal the following:
>>
>> version: opensips 1.8.2-notls (x86_64/linux)
>> flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, 
>> SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
>> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
>> MAX_URI_SIZE 1024, BUF_SIZE 65535
>> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>> svnrevision: 2:9454M
>> @(#) $Id: main.c 9330 2012-10-16 17:25:38Z bogdan_iancu $
>> main.c compiled on 11:53:21 Nov 28 2012 with gcc 4.4.6
>>
>>
>> Hope this helps.
>>
>> Mimi
>>
>>
>>
>> On 13/12/2012 13:56, Bogdan-Andrei Iancu wrote:
>>> Hi,
>>>
>>> Just made a test, using "make menuconfig", setting a install path to 
>>> "/tmp/foo" ->
>>>
>>> $ grep PATH_CTLRC /tmp/foo/sbin/osipsconsole
>>> my $PATH_CTLRC = "/tmp/foo//etc/opensips/";
>>> if ( -e  $PATH_CTLRC . "osipsconsolerc" ) {
>>>     $OSIPSCONSOLERC = $PATH_CTLRC . "osipsconsolerc";
>>>
>>> It looks like the path to RC was properly set.
>>>
>>> Are you sure you are using the latest 1.8 SVN branch (1.8.2) ?
>>>
>>> Regards,
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developer
>>> http://www.opensips-solutions.com
>>>
>>> On 12/12/2012 10:12 PM, Mimi Cafe wrote:
>>>> Hi Bogdan
>>>>
>>>> I used the graphical interface by executing  "make menuconfig". I 
>>>> then specified the installation path as 
>>>> "/usr/local/opensips_proxy/" and everything is installed within 
>>>> /usr/local/opensips_proxy/ and the config files are in 
>>>> /usr/local/opensips_proxy/etc/opensips.
>>>>
>>>> It should be noted that, opensips is able find the other config 
>>>> files in /usr/local/opensips_proxy/etc/opensips, but it fails to 
>>>> find osipconsolerc.
>>>>
>>>> Mimi
>>>>
>>>>
>>>> On 12/12/2012 12:22, Bogdan-Andrei Iancu wrote:
>>>>> Mimi, when doing "make install", the osipsconsile $PATH_CTLRC is 
>>>>> automatically updated with the installation path (prefix 
>>>>> variable). So, how did you compile and install opensips (the exact 
>>>>> commands) ?
>>>>>
>>>>> Regards,
>>>>> Bogdan-Andrei Iancu
>>>>> OpenSIPS Founder and Developer
>>>>> http://www.opensips-solutions.com
>>>>>
>>>>> On 12/12/2012 01:37 PM, Mimi Cafe wrote:
>>>>>> Thanks for your input. It explains why I  couldn't add the new 
>>>>>> gateway earlier on. it now worked fine with 24 bit mask.
>>>>>>
>>>>>> I'm running version 1.8  (sorry I forgit to mention it), and 
>>>>>> osipconsole and osipconsolerc are installed in the paths below.
>>>>>>
>>>>>> -rwxr-xr-x. 1 opensips opensips 202930 Dec 11 20:33 
>>>>>> /usr/local/opensips_proxy/sbin/osipsconsole
>>>>>> -rw-r--r--. 1 opensips opensips 2978 Dec  8 20:21 
>>>>>> /usr/local/opensips_proxy/etc/opensips/osipsconsolerc
>>>>>>
>>>>>> Looking in osipsconsole again, I now realise $PATH_CTLRC = 
>>>>>> "./scripts/" could be the reason why the config script is not 
>>>>>> found. Is this the case?
>>>>>>
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> Mimi
>>>>>>
>>>>>>
>>>>>> On 12/12/2012 10:37, Bogdan-Andrei Iancu wrote:
>>>>>>> Hi Mimi,
>>>>>>>
>>>>>>> starting with 1.7 (if I remember correctly), the address mask is 
>>>>>>> not anymore as 255.255.255.0, but as length 24 (number of 
>>>>>>> bites). So, the osipsconsole works the same now.
>>>>>>>
>>>>>>> Simply do: osipsconsole address add 0 192.168.1.192 24 5060 UDP
>>>>>>>
>>>>>>>
>>>>>>> Regarrding the DB issue - do you use osipsconsole from the 
>>>>>>> source tree or installed ? if installed, what is the path of 
>>>>>>> osipsconsole and what is the path of osipsconsolerc ? BTW, what 
>>>>>>> version of opensips are you using ?
>>>>>>>
>>>>>>> Regards,
>>>>>>> Bogdan-Andrei Iancu
>>>>>>> OpenSIPS Founder and Developer
>>>>>>> http://www.opensips-solutions.com
>>>>>>>
>>>>>>> On 12/11/2012 11:17 PM, Mimi Cafe wrote:
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> I have updated osipsconsole via svn and it appears the previous 
>>>>>>>> issue is resolved, but I now see two more issues.
>>>>>>>>
>>>>>>>> The mattern below does not match the dot in netmask $cmd[4] !~ 
>>>>>>>> /^[0-9]+$/. This seem to look for only one octet?
>>>>>>>>
>>>>>>>> if ( $cmd[4] !~ /^[0-9]+$/ || $cmd[4] < 0 || $cmd[4] > 32 ) {
>>>>>>>>                                 print "mask '$cmd[4]' is not 
>>>>>>>> valid - it must be between 0 and 32 (biti)\n";
>>>>>>>>                                 return;
>>>>>>>>                         }
>>>>>>>>
>>>>>>>>
>>>>>>>> The resulting error is:
>>>>>>>>
>>>>>>>> Control engine FIFO loaded
>>>>>>>> Used database is mysql
>>>>>>>> Warn fallback to local workdir ./mysql
>>>>>>>> mask '255.255.255.255' is not valid - it must be between 0 and 
>>>>>>>> 32 (biti)
>>>>>>>> [sbin]$ sudo ./osipsconsole address add 0 192.168.1.192 
>>>>>>>> 255.255.255.0 5060 UDP
>>>>>>>> which: no md5 in (/sbin:/bin:/usr/sbin:/usr/bin)
>>>>>>>> Control engine FIFO loaded
>>>>>>>> Used database is mysql
>>>>>>>> Warn fallback to local workdir ./mysql
>>>>>>>> mask '255.255.255.0' is not valid - it must be between 0 and 32 
>>>>>>>> (biti)
>>>>>>>>
>>>>>>>>
>>>>>>>> The other (trivial) issue is that osipsconsole does not use the 
>>>>>>>> database parameters specified in my osicpsconsolerc. Instead, 
>>>>>>>> it attempts to use detail values here.
>>>>>>>>
>>>>>>>> [sbin]$ sudo ./osipsconsole address add 0 192.168.1.192 
>>>>>>>> 255.255.255.255 5060 UDP
>>>>>>>> which: no md5 in (/sbin:/bin:/usr/sbin:/usr/bin)
>>>>>>>> which: no db4.4_dump in (/sbin:/bin:/usr/sbin:/usr/bin)
>>>>>>>> Control engine FIFO loaded
>>>>>>>> Used database is mysql
>>>>>>>> Warn fallback to local workdir ./mysql
>>>>>>>> Failed to connect the configured Database 
>>>>>>>> (database=opensips;host=localhost;user=opensips)[babs at mognoreborder 
>>>>>>>> sbin]$ sudo vim osipsconsole
>>>>>>>>
>>>>>>>> Mimi
>>>>>>>>
>>>>>>>>
>>>>>>>> On 10/12/2012 14:38, Bogdan-Andrei Iancu wrote:
>>>>>>>>> Hi Mimi,
>>>>>>>>>
>>>>>>>>> I made some fixes in osipsconsole on SVN (trunk and 1.8 
>>>>>>>>> branch) - please update and let me know if now works for you.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> Bogdan-Andrei Iancu
>>>>>>>>> OpenSIPS Founder and Developer
>>>>>>>>> http://www.opensips-solutions.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 12/08/2012 11:00 PM, Mimi Cafe wrote:
>>>>>>>>>> I attempted using osipsconsole to add a gateway address, but 
>>>>>>>>>> it failed because there is no data in the dbaliases table. 
>>>>>>>>>> How is this linked to the dbaliases tables? What is the 
>>>>>>>>>> prerequisite to adding a gateway address in addresses table?
>>>>>>>>>>
>>>>>>>>>> osipsconsole address add 0 192.168.18.89 255.255.255.255 5060 
>>>>>>>>>> UDP
>>>>>>>>>>
>>>>>>>>>> Control engine FIFO loaded
>>>>>>>>>> Used database is mysql
>>>>>>>>>> Retrieving data from table failedYou have an error in your 
>>>>>>>>>> SQL syntax; check the manual that corresponds to your MySQL 
>>>>>>>>>> server version for the right syntax to use near 'WHERE 
>>>>>>>>>> ip='192.168.18.89'' at line 1
>>>>>>>>>> Introducing the address rule 0 192.168.18.89 255.255.255.255 
>>>>>>>>>> 5060 UDP to the database failed
>>>>>>>>>> You have an error in your SQL syntax; check the manual that 
>>>>>>>>>> corresponds to your MySQL server version for the right syntax 
>>>>>>>>>> to use near '( grp, ip, mask, port, proto , context_info ) 
>>>>>>>>>> VALUES ( 0, '192.168.18.89', '255.' at line 1
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Mimi
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Users mailing list
>>>>>>>>>> Users at lists.opensips.org
>>>>>>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>>>>>>
>>>>>>>>
>>>>>>
>>>>
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20121217/ceaad6c5/attachment-0001.htm>


More information about the Users mailing list