[OpenSIPS-Users] Problem with /tmp/opensips_fifo

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Mar 15 18:50:06 CET 2010


Erick,

For the CP error:

##
In the control panel 
Module "Diallog" = Array ( [0] => sorry -- reply fifo opening error )


what is the corresponding error in opensips logs ?

Regards,
Bogdan

Erick Chinchilla Berrocal wrote:
> Hi
> Bogdan
> The problem continues
>
> I have these modules
>
> ##
> /lib/opensips/modules# ls
> aaa_radius.so     call_control.so  diversion.so     load_balancer.so
> options.so            rr.so          textops.so
> acc.so            cfgutils.so      domainpolicy.so  localcache.so
> path.so               seas.so        tm.so
> alias_db.so       closeddial.so    domain.so        mangler.so        pdt.so
> signaling.so   uac_redirect.so
> auth_aaa.so       db_flatstore.so  drouting.so      maxfwd.so
> peering.so            siptrace.so    uac.so
> auth_db.so        db_mysql.so      enum.so          mediaproxy.so
> permissions.so        sl.so          uri.so
> auth_diameter.so  db_text.so       exec.so          mi_datagram.so
> pike.so               sms.so         userblacklist.so
> auth.so           db_virtual.so    gflags.so        mi_fifo.so
> presence_xcapdiff.so  speeddial.so   usrloc.so
> avpops.so         dialog.so        group.so         msilo.so          qos.so
> sst.so         xlog.so
> b2b_entities.so   dialplan.so      imc.so           nathelper.so
> ratelimit.so          statistics.so
> benchmark.so      dispatcher.so    lcr.so           nat_traversal.so
> registrar.so          stun.so
>
> ##
> /etc/opensips/opensips.cfg
> /* uncomment next line for MySQL DB support */
> loadmodule "db_mysql.so"
> loadmodule "signaling.so"
> loadmodule "sl.so"
> loadmodule "tm.so"
> loadmodule "rr.so"
> loadmodule "maxfwd.so"
> loadmodule "usrloc.so"
> loadmodule "registrar.so"
> loadmodule "textops.so"
> modparam("dialog", "db_mode", 1)
> loadmodule "mi_fifo.so"
> loadmodule "uri.so"
> loadmodule "xlog.so"
> loadmodule "acc.so"
> loadmodule "dialog.so"
>
>
> #------- dialog ---------
> modparam("dialog", "db_url",
> "mysql://(username):(password)@localhost/opensips")
> modparam("dialog", "dlg_flag", 4)
>
> Reference:
> http://www.opensips.org/Resources/PuaDialoinfoConfig
>
> I tried with this options and get the same problem
> ##################### DIALOG #########################
> loadmodule "dialog.so"
> modparam("dialog", "enable_stats", 1)
> modparam("dialog", "default_timeout", 21600)
> modparam("dialog", "db_url", "mysql://opensips:opensips@database/opensips")
> modparam("dialog", "db_mode", 1)
> modparam("dialog", "dlg_flag", 4)
>
> Reference
> http://gventure.wordpress.com/2009/03/30/opensips-installation/
>
>
> ##
>
> opensips -c
> Listening on 
>              udp: 127.0.0.1 [127.0.0.1]:5060
>              udp: 192.168.50.10 [192.168.50.10]:5060
>              tcp: 127.0.0.1 [127.0.0.1]:5060
>              tcp: 192.168.50.10 [192.168.50.10]:5060
> Aliases: 
>              tcp: net:5060
>              tcp: server.dominio.com:5060
>              tcp: localhost:5060
>              udp: server:5060
>              udp: server.dominio.com:5060
>              udp: localhost:5060
>
> Mar 15 13:06:03 [3014] NOTICE:core:main: config file ok, exit
>
> ##
> # opensipsctl online
> database engine 'MYSQL' loaded
> Control engine 'FIFO' loaded
> 1001
>
> ##
> In the control panel 
> Module "Diallog" = Array ( [0] => sorry -- reply fifo opening error )
>
> Any ideas
>
> Thanks
> Erick
>
> -----Original Message-----
> From: users-bounces at lists.opensips.org
> [mailto:users-bounces at lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
> Sent: Monday, March 15, 2010 3:47 AM
> To: OpenSIPS users mailling list
> Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
>
> Hi Erick,
>
> For the failing tools, do you have the corresponding opensips modules 
> loaded ?
>
> Like, for  Dialog tool, do you have the dialog module loaded ?
>
> Regards,
> Bogdan
>
>
> Erick Chinchilla Berrocal wrote:
>   
>> Bodgan 
>> I made the following change in the file "etc/monit/monitrc
>> The manual said insert the line 
>> "check process opensips with pidfile /var/run/opensips.pid"
>> and i changed to 
>> "check process opensips with pidfile /var/run/opensips/opensips.pid"
>>  with this change in the control panel the module "MONIT" is working well
>>
>> with this change in the control panel the module "MONIT" is working well
>> now the problem continues with the following modules, please let me know
>>     
> if
>   
>> you have idea, I read the manual for several times and no ....
>>
>> - CDRViever = ok 
>> - Dialog = Array ( [0] => sorry -- reply fifo opening error )
>> - DialPlan = ok
>> - Dispatcher = Array ( [0] => sorry -- reply fifo opening error [1] =>
>>     
> sorry
>   
>> -- reply fifo opening error )
>> - Domain = ok
>> - Dymanic Routing = ok
>> - Load Balancer = ok
>> - MI Comands = /tmp/opensips_fifo
>> - Monit = ok
>> - Nathelper = ok
>> - Permissions = ok
>> - Prefix 2 Domain = ok
>> - SIP Trace = Array ( [0] => sorry -- reply fifo opening error )
>> - Static Monitor = sorry -- reply fifo opening error
>>
>> I understand the important for the files "db.inc.php" and
>> "boxes.global.inc.php" , my current setup is the example in the book
>> charpter 6, page 132. the only difference is the password, the "primary
>>     
> name
>   
>> server"
>>
>> This is the log 
>> Mar 12 17:44:42 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>> Mar 12 18:04:22 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> command dlg_list is not available
>> Mar 12 18:04:22 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>> Mar 12 18:04:32 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> command dlg_list is not available
>> Mar 12 18:04:32 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>> Mar 12 18:04:32 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> command dlg_list is not available
>> Mar 12 18:04:32 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>> Mar 12 18:04:55 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> command ds_list is not available
>> Mar 12 18:04:55 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>> Mar 12 18:04:55 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> command ds_reload is not available
>> Mar 12 18:04:55 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>> Mar 12 18:07:59 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> command sip_trace is not available
>> Mar 12 18:07:59 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>> Mar 12 18:08:24 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>>
>>
>> Thanks
>>
>> To: 'OpenSIPS users mailling list'
>> Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
>>
>> Bodgan
>> Thanks for your assistant.
>> After of change the file "opensips.cfg" the configuration is
>> # ----- mi_fifo params -----
>> modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
>> modparam ( "mi_fifo", "fifo_mode", 0666)
>>
>> if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)" not work
>>
>> Now in the Control Panel continues with problems a:
>> -Dialog = if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)"
>> not work
>> -Dispatcher = 
>> 			Array ( [0] => sorry -- reply fifo opening error )
>> 			Array ( [0] => sorry -- reply fifo opening error
>> [1] => sorry -- reply fifo opening error )
>> -MI Commands = /tmp/opensips_fifo
>> 		sorry -- reply fifo opening error
>>
>> -Monit = opensips - Execution Failed
>>
>> -SIP trace  = Array ( [0] => sorry -- reply fifo opening error )
>>
>> -Static Monitor = sorry --reply fifo opening error
>>
>> ###
>> The is the email from the server
>>
>> Subject: Cron <root at net>        php
>> /var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
>> Content-Type: text/plain; charset=UTF-8
>> X-Cron-Env: <SHELL=/bin/sh>
>> X-Cron-Env:
>> <PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi
>>
>> ###
>> This is the log from Opensips-Server
>> Mar 12 13:55:01 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>> Mar 12 13:56:01 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>> Mar 12 13:56:30 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>> Mar 12 13:56:34 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
>> command ds_list is not available
>> Mar 12 13:56:34 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>> Mar 12 13:56:34 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
>> command ds_reload is not available
>> Mar 12 13:56:34 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>> Mar 12 13:57:01 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
>> cannot open reply pipe (null)
>>
>> ###
>> The configuration for the file /etc/crontab
>>
>> SHELL=/bin/sh
>> PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
>>
>> # m h dom mon dow user  command
>> 17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
>> 25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts
>> --report /etc/cron.daily )
>> 47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts
>> --report /etc/cron.weekly )
>> 52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts
>> --report /etc/cron.monthly )
>> */3 *   * * *   root
>> /var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
>> * *     * * *   root    php
>> /var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
>>
>> ##
>> /etc/monit/monitrc
>>
>> set daemon  120
>> set logfile syslog facility log_daemon
>> set alert root at localhost
>> set httpd port 2812 and
>>      use address localhost  # only accept connection from localhost
>>      allow localhost        # allow localhost to connect to the server and
>>      allow x.x.x.x  # allow ipaddress to connect to the server, you can
>> give only one per entry
>>    allow admin:monit      # require user 'admin' with password 'monit'
>> check process opensips with pidfile /var/run/opensips.pid
>> #Below is actions taken by monit when service got stuck.
>> start program = "/etc/init.d/opensips start"
>> stop program = "/etc/init.d/opensips stop"
>> # Admin will notify by mail if below of the condition satisfied.
>> if cpu is greater than 70% for 2 cycles then alert
>> if cpu > 90% for 5 cycles then restart
>>
>> ##
>> monit -t
>> Control file syntax OK
>>
>> ##
>> /var/www/opensips-cp/config# less db.inc.php 
>> <?php
>> /*
>>  * $Id$
>>  * Copyright (C) 2008 Voice Sistem SRL
>>  *
>>  * This file is part of opensips-cp, a free Web Control Panel Application
>> for 
>>  * OpenSIPS SIP server.
>>  *
>>  * opensips-cp is free software; you can redistribute it and/or modify
>>  * it under the terms of the GNU General Public License as published by
>>  * the Free Software Foundation; either version 2 of the License, or
>>  * (at your option) any later version.
>>  *
>>  * opensips-cp is distributed in the hope that it will be useful,
>>  * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>  * GNU General Public License for more details.
>>  *
>>  * You should have received a copy of the GNU General Public License
>>  * along with this program; if not, write to the Free Software
>>  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
>> USA.
>>  */
>>
>>  //database driver mysql or pgsql
>>  $config->db_driver = "mysql";  
>>
>>  //database host
>>  $config->db_host = "localhost";
>>  
>>  //database port - leave empty for default
>>  $config->db_port = "";
>>  
>>  //database connection user
>>  $config->db_user = "root";
>>  
>>  //database connection password
>>  $config->db_pass = "(password for "root"";
>>  
>>  //database name
>>  $config->db_name = "opensips";
>>
>>  if (!empty($config->db_port) ) $config->db_host = $config->db_host . ":"
>> . $config->db_port;
>>  
>> ?>
>> (END)
>>
>> ##
>>
>> /var/www/opensips-cp/config# less boxes.global.inc.php 
>> <?php
>>
>> /*
>>  * $Id$
>>  * Copyright (C) 2008 Voice Sistem SRL
>>  *
>>  * This file is part of opensips-cp, a free Web Control Panel Application
>> for 
>>  * OpenSIPS SIP server.
>>  *
>>  * opensips-cp is free software; you can redistribute it and/or modify
>>  * it under the terms of the GNU General Public License as published by
>>  * the Free Software Foundation; either version 2 of the License, or
>>  * (at your option) any later version.
>>  *
>>  * opensips-cp is distributed in the hope that it will be useful,
>>  * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>  * GNU General Public License for more details.
>>  *
>>  * You should have received a copy of the GNU General Public License
>>  * along with this program; if not, write to the Free Software
>>  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
>> USA.
>>  */
>>
>> /*==================== DEFINITION OF BOXES (servers)
>> ========================*/
>> // each server is a box
>>
>> $box_id=0;
>>
>> // mi host:port pair || fifo_file
>> $boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
>>
>> // monit host:port
>> $boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
>> $boxes[$box_id]['monit']['user']="admin";
>> $boxes[$box_id]['monit']['pass']="monit"; (default user and password)
>> $boxes[$box_id]['monit']['has_ssl']=0;
>>
>>
>> // description (appears in mi , monit )
>> $boxes[$box_id]['desc']="190.x.x.x"; (IP address)
>>
>>  
>> $boxes[$box_id]['assoc_id']=1;
>>
>> // enable local smonitor charts on this box : 0=disabled 1=enabled
>> // (cron)
>> $boxes[$box_id]['smonitor']['charts']=1;
>>
>>
>> /*------------------------------------------------------------------------
>> ---
>> $box_id=1;
>>
>> // mi host:port pair || fifo_file 
>> $boxes[$box_id]['mi']['conn']="192.168.0.2:8080";
>>
>>
>> // monit host:port
>> $boxes[$box_id]['monit']['conn']="192.168.0.2:2812";
>> $boxes[$box_id]['monit']['user']="admin";
>> $boxes[$box_id]['monit']['pass']="pass";
>> $boxes[$box_id]['monit']['has_ssl']=1;
>>
>>
>> // description (appears in mi , monit )
>> $boxes[$box_id]['desc']="Presence server";
>>
>>
>> $boxes[$box_id]['assoc_id']=2;
>>
>> // enable local smonitor charts on this box : 0=disabled 1=enabled
>> // (cron)
>> $boxes[$box_id]['smonitor']['charts']=1;
>> */
>>
>>
>>
>> /*======================== DEFINITION OF SYSTEMS
>> ========================*/
>> // each system is a set of servers with the same
>> // functionality on the platform (like sets of
>> // SIP servers, sets of Load-Balancers, sets of
>> // Presence agents, etc)
>>
>> $_system_id=0;
>> $systems[$_system_id]['name']="SIP Servers";
>> $systems[$_system_id]['desc']="OpenSIPS SIP server cluster";
>> //boxes with this assoc_id are assigned to this system
>> $systems[$_system_id]['assoc_id']=1;
>> // 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
>> $systems[$_system_id]['system_type_id']=1;
>>
>>
>> /*------------------------------------------------------------------------
>> ---
>> $_system_id=1;
>> $systems[$_system_id]['name']="Presence Servers";
>> $systems[$_system_id]['desc']="OpenSIPS Presence server cluster";
>> //boxes with this assoc_id are assigned to this system
>> $systems[$_system_id]['assoc_id']=2;
>> // 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
>> $systems[$_system_id]['system_type_id']=5;
>> */
>>
>>
>> ?>
>> (END)
>>
>> Thanks
>> Erick Ch.
>> -----Original Message-----
>> From: users-bounces at lists.opensips.org
>> [mailto:users-bounces at lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
>> Sent: Friday, March 12, 2010 11:55 AM
>> To: OpenSIPS users mailling list
>> Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
>>
>> Erick,
>>
>> as probably you run opensips as user root, the fifo file is owned by 
>> root, so opensips-cp (run by apache, with user apache/www-data) has no 
>> permission to write into the fifo.
>>
>> A simple solution will be to grant larger permissions to the fifo file 
>> (in opensips.cfg):  
>>
>> 	modparam("mi_fifo", "fifo_mode", 0666)
>>
>>
>> http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261
>>
>> you need to restart opensips!
>>
>> Regards,
>> Bogdan
>>
>> Erick Chinchilla Berrocal wrote:
>>   
>>     
>>> Now the problem with the Control Panel 4.0 continues
>>> This is the situation with each module
>>>
>>>
>>> -Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
>>>     
>>>       
>> open
>>   
>>     
>>> stream: Permission denied in /var/www/opensips-
>>> cp/web/common/mi_comm.php  on line 147
>>> 			Array ( [0] => sorry -- cannot open write fifo )
>>>
>>>
>>> -Dispatcher = Warning: fopen(/tmp/opensips_fifo) [function.fopen]:
>>>     
>>>       
>> failed to
>>   
>>     
>>> open stream: Permission denied in
>>> /var/www/opensips-cp/web/common/mi_comm.php on line 147
>>> 		Array ( [0] => sorry -- cannot open write fifo )
>>>
>>> 		Warning: fopen(/tmp/opensips_fifo) [function.fopen]:
>>>     
>>>       
>> failed
>>   
>>     
>>> to open stream: Permission denied in /var/www/opensips-
>>> cp/web/common/mi_comm.php  on line 147
>>> 		Array ( [0] => sorry -- cannot open write fifo [1] =>
>>>     
>>>       
>> sorry
>>   
>>     
>>> -- cannot open write fifo )
>>>
>>> -MI Commands = /tmp/opensips_fifo
>>> 			Warning: fopen(/tmp/opensips_fifo)
>>>     
>>>       
>> [function.fopen]:
>>   
>>     
>>> failed to open stream: Permission denied in
>>> /var/www/opensips-cp/web/common/mi_comm.php  on line 147
>>>
>>> -Monit = Process - opensips
>>> 	   Status - Execution Failed
>>>
>>> -SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
>>>     
>>>       
>> to
>>   
>>     
>>> open stream: Permission denied in
>>> /var/www/opensips-cp/web/common/mi_comm.php  on line 147
>>> 		Array ( [0] => sorry -- cannot open write fifo )
>>>
>>> -Statics Monitor = Warning: fopen(/tmp/opensips_fifo) [function.fopen]:
>>> failed to open stream: Permission denied in
>>> /var/www/opensips-cp/web/common/mi_comm.php  on line 147
>>> 			sorry -- cannot open write fifo
>>>
>>>   
>>>     
>>>       
>>   
>>     
>
>
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list