Hi Bogdan : The issue is some variables are empty in the function write2fifo_new in module web/common/mi_comm.php :
function write2fifo_new($command, &$errors, &$status){ global $config; global $fifo_file ; ---------------> missing ----------> $config->reply_fifo_filename="webfifo_".rand(); ---------------> missing ----------> $config->reply_fifo_path="/tmp/".$config->reply_fifo_filename; These variables are used further on this function - Moreover 'reply_fifo_path' is hardcoded; which should not be the case I presume. Brgds Erik -----Oorspronkelijk bericht----- Van: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] Namens Bogdan-Andrei Iancu Verzonden: maandag 15 maart 2010 22:17 Aan: OpenSIPS users mailling list Onderwerp: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo Here you have 2 errors: - first you do not have the drouting module loaded in opensips cfg - second in the generic fifo error (mentioned it the prev email) Regards, Bogdan erik pepermans wrote: > Hi, > > Got the same problem : > > 'opensipsctl fifo dr_reload' returns in syslog : > Mar 15 21:09:22 ns1 /sbin/opensips[22244]: > INFO:drouting:dr_reload_cmd: "dr_reload" MI command received! Mar 15 > 21:09:22 ns1 /sbin/opensips[22244]: > WARNING:drouting:dr_load_routing_info: using old-style tables for > dr_gateways, probing will be disabled > > Via opensips-cp 'fifo dr_reload' returns in syslog : > Mar 15 21:09:50 ns1 /sbin/opensips[22244]: ERROR:mi_fifo:mi_fifo_server: > command fifo is not available > Mar 15 21:09:50 ns1 /sbin/opensips[22244]: ERROR:mi_fifo:mi_fifo_server: > cannot open reply pipe (null) > > Via opensips-cp 'ps' returns in syslog : > Mar 15 21:10:27 ns1 /sbin/opensips[22244]: > ERROR:mi_fifo:mi_fifo_server: cannot open reply pipe (null) > > Brgds > Erik > > -----Oorspronkelijk bericht----- > Van: users-boun...@lists.opensips.org > [mailto:users-boun...@lists.opensips.org] Namens Erick Chinchilla > Berrocal > Verzonden: maandag 15 maart 2010 19:16 > Aan: 'OpenSIPS users mailling list' > Onderwerp: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo > > > Bodgab > In the syslog I have the error: > > opensips-lab /usr/local/sbin/opensips[3047]: > ERROR:mi_fifo:mi_fifo_server: cannot open reply pipe (null) > > Instead in the apache2 error.log: > > mkfifo: missing operand > Try `mkfifo --help' for more information. > > I think that the reply_fifo it was not create > > Any idea that can help me to solve this problem? > > Thanks > Erick Ch. > > -----Original Message----- > From: users-boun...@lists.opensips.org > [mailto:users-boun...@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 <r...@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 r...@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-boun...@lists.opensips.org >> [mailto:users-boun...@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 _______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. _______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users