Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo)

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo)

jhchinn
Greetings,

I am running control panel v6.2 on OpenSIPS v2.3.1 on centos-release-7-3.1611.el7.centos.x86_64.
When CP is loaded I get the following error on the Load Balancer display: Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo).

I have verified that the opensips_fifo file is present in the tmp directory:
[root@jhchinnfs ~]# cd /tmp
[root@jhchinnfs tmp]# ls
opensips_fifo
pear
systemd-private-3ec9d05546f7423196c5843c339bfeba-httpd.service-bXanPw
systemd-private-a8a03bab03fd4cf7bae7555a9923a5f9-httpd.service-PUJo1Z
systemd-private-d63de36b3da94bddba2494cc36aef558-httpd.service-12nIa9

And have checked the config/boxes.global.inc.php file:
$box_id=0;

// Options:
//   FIFO backend:   fifo:/path/to/fifo_file
//   XMLRPC backend: xmlrpc:host:port/RPC2
//   UDP backend:    udp:host:port
//   JSON backedn:   json:json_url/JSON
$boxes[$box_id]['mi']['conn']="fifo:/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";
$boxes[$box_id]['monit']['has_ssl']=0;


// description (appears in mi , monit )
$boxes[$box_id]['desc']="SIP server";

 
$boxes[$box_id]['assoc_id']=1;

// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;

Here is a netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 10.2.112.29:80          0.0.0.0:*               LISTEN      2629/httpd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1022/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      2366/master
tcp        0      0 127.0.0.1:2812          0.0.0.0:*               LISTEN      2650/monit
tcp6       0      0 :::3306                 :::*                    LISTEN      2039/mysqld
tcp6       0      0 :::22                   :::*                    LISTEN      1022/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      2366/master

Any ideas why this is not connecting to the opensips server?

I have this up and working in Debian 8 but need to make it work in Centos7.

Thanks,

Jerry Chinn
Telecom VoIP Specialist
NAVIS More Performance. More Profit.
tel 541-330-3562  
www.TheNavisWay.com
Facebook | Twitter | LinkedIn | Blog


Reply | Threaded
Open this post in threaded view
|

Re: Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo)

Liviu Chircu
Hi jhchinn,

Are you sure it's not a SElinux problem?

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 16.08.2017 21:24, jhchinn wrote:

> Greetings,
>
> I am running control panel v6.2 on OpenSIPS v2.3.1 on
> centos-release-7-3.1611.el7.centos.x86_64.
> When CP is loaded I get the following error on the Load Balancer display:
> Cannot connect to OpenSIPS Server via Management Interface
> (/tmp/opensips_fifo).
>
> I have verified that the opensips_fifo file is present in the tmp directory:
> [root@jhchinnfs ~]# cd /tmp
> [root@jhchinnfs tmp]# ls
> opensips_fifo
> pear
> systemd-private-3ec9d05546f7423196c5843c339bfeba-httpd.service-bXanPw
> systemd-private-a8a03bab03fd4cf7bae7555a9923a5f9-httpd.service-PUJo1Z
> systemd-private-d63de36b3da94bddba2494cc36aef558-httpd.service-12nIa9
>
> And have checked the config/boxes.global.inc.php file:
> $box_id=0;
>
> // Options:
> //   FIFO backend:   fifo:/path/to/fifo_file
> //   XMLRPC backend: xmlrpc:host:port/RPC2
> //   UDP backend:    udp:host:port
> //   JSON backedn:   json:json_url/JSON
> $boxes[$box_id]['mi']['conn']="fifo:/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";
> $boxes[$box_id]['monit']['has_ssl']=0;
>
>
> // description (appears in mi , monit )
> $boxes[$box_id]['desc']="SIP server";
>
>  
> $boxes[$box_id]['assoc_id']=1;
>
> // enable local smonitor charts on this box : 0=disabled 1=enabled
> // (cron)
> $boxes[$box_id]['smonitor']['charts']=1;
>
> Here is a netstat -tlnp
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State
> PID/Program name
> tcp        0      0 10.2.112.29:80          0.0.0.0:*               LISTEN
> 2629/httpd
> tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
> 1022/sshd
> tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN
> 2366/master
> tcp        0      0 127.0.0.1:2812          0.0.0.0:*               LISTEN
> 2650/monit
> tcp6       0      0 :::3306                 :::*                    LISTEN
> 2039/mysqld
> tcp6       0      0 :::22                   :::*                    LISTEN
> 1022/sshd
> tcp6       0      0 ::1:25                  :::*                    LISTEN
> 2366/master
>
> Any ideas why this is not connecting to the opensips server?
>
> I have this up and working in Debian 8 but need to make it work in Centos7.
>
> Thanks,
>
> Jerry Chinn
> Telecom VoIP Specialist
> NAVIS More Performance. More Profit.
> tel 541-330-3562
> www.TheNavisWay.com
> Facebook | Twitter | LinkedIn | Blog
>
>
>
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Cannot-connect-to-OpenSIPS-Server-via-Management-Interface-tmp-opensips-fifo-tp7608288.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo)

jhchinn
Liviu,

I am not sure what you mean.
Can you elaborate?

Jerry Chinn
Telecom VoIP Specialist
NAVIS More Performance. More Profit.
tel 541-330-3562   
www.TheNavisWay.com
Facebook | Twitter | LinkedIn | Blog

-----Original Message-----
From: Users [mailto:[hidden email]] On Behalf Of Liviu Chircu
Sent: Thursday, August 17, 2017 12:44 AM
To: [hidden email]
Subject: Re: [OpenSIPS-Users] Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo)

Hi jhchinn,

Are you sure it's not a SElinux problem?

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 16.08.2017 21:24, jhchinn wrote:

> Greetings,
>
> I am running control panel v6.2 on OpenSIPS v2.3.1 on
> centos-release-7-3.1611.el7.centos.x86_64.
> When CP is loaded I get the following error on the Load Balancer display:
> Cannot connect to OpenSIPS Server via Management Interface
> (/tmp/opensips_fifo).
>
> I have verified that the opensips_fifo file is present in the tmp directory:
> [root@jhchinnfs ~]# cd /tmp
> [root@jhchinnfs tmp]# ls
> opensips_fifo
> pear
> systemd-private-3ec9d05546f7423196c5843c339bfeba-httpd.service-bXanPw
> systemd-private-a8a03bab03fd4cf7bae7555a9923a5f9-httpd.service-PUJo1Z
> systemd-private-d63de36b3da94bddba2494cc36aef558-httpd.service-12nIa9
>
> And have checked the config/boxes.global.inc.php file:
> $box_id=0;
>
> // Options:
> //   FIFO backend:   fifo:/path/to/fifo_file
> //   XMLRPC backend: xmlrpc:host:port/RPC2
> //   UDP backend:    udp:host:port
> //   JSON backedn:   json:json_url/JSON
> $boxes[$box_id]['mi']['conn']="fifo:/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";
> $boxes[$box_id]['monit']['has_ssl']=0;
>
>
> // description (appears in mi , monit ) $boxes[$box_id]['desc']="SIP
> server";
>
>  
> $boxes[$box_id]['assoc_id']=1;
>
> // enable local smonitor charts on this box : 0=disabled 1=enabled //
> (cron) $boxes[$box_id]['smonitor']['charts']=1;
>
> Here is a netstat -tlnp
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State
> PID/Program name
> tcp        0      0 10.2.112.29:80          0.0.0.0:*               LISTEN
> 2629/httpd
> tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
> 1022/sshd
> tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN
> 2366/master
> tcp        0      0 127.0.0.1:2812          0.0.0.0:*               LISTEN
> 2650/monit
> tcp6       0      0 :::3306                 :::*                    LISTEN
> 2039/mysqld
> tcp6       0      0 :::22                   :::*                    LISTEN
> 1022/sshd
> tcp6       0      0 ::1:25                  :::*                    LISTEN
> 2366/master
>
> Any ideas why this is not connecting to the opensips server?
>
> I have this up and working in Debian 8 but need to make it work in Centos7.
>
> Thanks,
>
> Jerry Chinn
> Telecom VoIP Specialist
> NAVIS More Performance. More Profit.
> tel 541-330-3562
> www.TheNavisWay.com
> Facebook | Twitter | LinkedIn | Blog
>
>
>
>
>
>
> --
> View this message in context:
> http://opensips-open-sip-server.1449251.n2.nabble.com/Cannot-connect-t
> o-OpenSIPS-Server-via-Management-Interface-tmp-opensips-fifo-tp7608288
> .html Sent from the OpenSIPS - Users mailing list archive at
> Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo)

Liviu Chircu
Just making sure that apache is not restricted from accessing
/tmp/opensips_fifo in any way by SELinux policies. Run "getenforce", if
it's set to "Enforcing", you might want to take a closer look at
/var/log/audit/audit.log while you're opening up the LB display tab.

Regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 17.08.2017 19:34, Jerry Chinn wrote:

> Liviu,
>
> I am not sure what you mean.
> Can you elaborate?
>
> Jerry Chinn
> Telecom VoIP Specialist
> NAVIS More Performance. More Profit.
> tel 541-330-3562
> www.TheNavisWay.com
> Facebook | Twitter | LinkedIn | Blog
>
> -----Original Message-----
> From: Users [mailto:[hidden email]] On Behalf Of Liviu Chircu
> Sent: Thursday, August 17, 2017 12:44 AM
> To: [hidden email]
> Subject: Re: [OpenSIPS-Users] Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo)
>
> Hi jhchinn,
>
> Are you sure it's not a SElinux problem?
>
> Liviu Chircu
> OpenSIPS Developer
> http://www.opensips-solutions.com
>
> On 16.08.2017 21:24, jhchinn wrote:
>> Greetings,
>>
>> I am running control panel v6.2 on OpenSIPS v2.3.1 on
>> centos-release-7-3.1611.el7.centos.x86_64.
>> When CP is loaded I get the following error on the Load Balancer display:
>> Cannot connect to OpenSIPS Server via Management Interface
>> (/tmp/opensips_fifo).
>>
>> I have verified that the opensips_fifo file is present in the tmp directory:
>> [root@jhchinnfs ~]# cd /tmp
>> [root@jhchinnfs tmp]# ls
>> opensips_fifo
>> pear
>> systemd-private-3ec9d05546f7423196c5843c339bfeba-httpd.service-bXanPw
>> systemd-private-a8a03bab03fd4cf7bae7555a9923a5f9-httpd.service-PUJo1Z
>> systemd-private-d63de36b3da94bddba2494cc36aef558-httpd.service-12nIa9
>>
>> And have checked the config/boxes.global.inc.php file:
>> $box_id=0;
>>
>> // Options:
>> //   FIFO backend:   fifo:/path/to/fifo_file
>> //   XMLRPC backend: xmlrpc:host:port/RPC2
>> //   UDP backend:    udp:host:port
>> //   JSON backedn:   json:json_url/JSON
>> $boxes[$box_id]['mi']['conn']="fifo:/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";
>> $boxes[$box_id]['monit']['has_ssl']=0;
>>
>>
>> // description (appears in mi , monit ) $boxes[$box_id]['desc']="SIP
>> server";
>>
>>    
>> $boxes[$box_id]['assoc_id']=1;
>>
>> // enable local smonitor charts on this box : 0=disabled 1=enabled //
>> (cron) $boxes[$box_id]['smonitor']['charts']=1;
>>
>> Here is a netstat -tlnp
>> Active Internet connections (only servers)
>> Proto Recv-Q Send-Q Local Address           Foreign Address         State
>> PID/Program name
>> tcp        0      0 10.2.112.29:80          0.0.0.0:*               LISTEN
>> 2629/httpd
>> tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
>> 1022/sshd
>> tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN
>> 2366/master
>> tcp        0      0 127.0.0.1:2812          0.0.0.0:*               LISTEN
>> 2650/monit
>> tcp6       0      0 :::3306                 :::*                    LISTEN
>> 2039/mysqld
>> tcp6       0      0 :::22                   :::*                    LISTEN
>> 1022/sshd
>> tcp6       0      0 ::1:25                  :::*                    LISTEN
>> 2366/master
>>
>> Any ideas why this is not connecting to the opensips server?
>>
>> I have this up and working in Debian 8 but need to make it work in Centos7.
>>
>> Thanks,
>>
>> Jerry Chinn
>> Telecom VoIP Specialist
>> NAVIS More Performance. More Profit.
>> tel 541-330-3562
>> www.TheNavisWay.com
>> Facebook | Twitter | LinkedIn | Blog
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://opensips-open-sip-server.1449251.n2.nabble.com/Cannot-connect-t
>> o-OpenSIPS-Server-via-Management-Interface-tmp-opensips-fifo-tp7608288
>> .html Sent from the OpenSIPS - Users mailing list archive at
>> Nabble.com.
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo)

jhchinn
I verified that selinux is disabled.
I have changed this set up so that I am using cp-7.2.3. instead of cp-6.2.
The issue is the same although now it is a Failed connect to 127.0.0.1:8080; Connection refused message which appears to be pointed at json:127.0.0.1:8080/json
I do not see the table entries in the drop down either.

Any thing I missed in the setup?
Reply | Threaded
Open this post in threaded view
|

Re: Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo)

Liviu Chircu
Did you also update your OpenSIPS config to use the httpd + mi_json modules?

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 25.08.2017 22:02, jhchinn wrote:

> I verified that selinux is disabled.
> I have changed this set up so that I am using cp-7.2.3. instead of cp-6.2.
> The issue is the same although now it is a Failed connect to 127.0.0.1:8080;
> Connection refused message which appears to be pointed at
> json:127.0.0.1:8080/json
> I do not see the table entries in the drop down either.
>
> Any thing I missed in the setup?
>
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Cannot-connect-to-OpenSIPS-Server-via-Management-Interface-tmp-opensips-fifo-tp7608288p7608342.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo)

jhchinn
Good Day,

I have those modules included in the opensips.cfg:
loadmodule "httpd.so"
modparam("httpd", "port", 8080)

loadmodule "mi_json.so"

And verified that they are in the /usr/lib64 directory
[root@jhchinnfs lib64]# ls | grep http
httpd
libmicrohttpd.so.10
libmicrohttpd.so.10.22.0
[root@jhchinnfs lib64]# ls | grep json
libjson-c.so.2
libjson-c.so.2.0.1
libjson.so.0
libjson.so.0.1.0

Still seeing message: Failed to connect to 127.0.0.1: Permission denied

Any thoughts?
Reply | Threaded
Open this post in threaded view
|

Re: Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo)

Liviu Chircu
Not many culprits left now. Either you haven't restarted OpenSIPS, or
it's listening on the wrong interface (although I'm pretty sure 0.0.0.0
is the default), or there's a firewall in between.

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 29.08.2017 19:00, jhchinn wrote:

> Good Day,
>
> I have those modules included in the opensips.cfg:
> loadmodule "httpd.so"
> modparam("httpd", "port", 8080)
>
> loadmodule "mi_json.so"
>
> And verified that they are in the /usr/lib64 directory
> [root@jhchinnfs lib64]# ls | grep http
> httpd
> libmicrohttpd.so.10
> libmicrohttpd.so.10.22.0
> [root@jhchinnfs lib64]# ls | grep json
> libjson-c.so.2
> libjson-c.so.2.0.1
> libjson.so.0
> libjson.so.0.1.0
>
> Still seeing message: Failed to connect to 127.0.0.1: Permission denied
>
> Any thoughts?
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Cannot-connect-to-OpenSIPS-Server-via-Management-Interface-tmp-opensips-fifo-tp7608288p7608355.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Cannot connect to OpenSIPS Server via Management Interface (/tmp/opensips_fifo)

jhchinn
 Liviu,

I was able to get this to work after setting selinux to permissive mode.
Thanks for your guidance.

For those following this thread here is what I was able to do to get this working.

OpenSIPS v2.3.1 from yum repository on centos-release-7-3.1611.el7.centos.x86_64.
added cp-7.2.3. instead of cp-6.2

Validated that I had the httpd.so and mi_json.so modules in /usr/lib64 directory.

Made sure that these were added to the opensips.cfg
loadmodule "httpd.so"
modparam("httpd", "port", 8080)

loadmodule "mi_json.so"

Restarted everything and checked cp to see if error message was no longer there.
I was also able to see the drop down menu in the Execute MI Command window.