Can you make sure the remote opensips is actually listening on that IP and port? From the host you're running opensips-cli, can you run `nc -zv 10.x.x.x 8888`?

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 4/15/21 4:12 PM, Saurabh Chopra wrote:
Hi Razvan,

Thank you for your response.

I have changed the parameters but the problem still persists. Below is the opensips-cli.cfg

[10.x.x.x]
prompt_name: [email protected]
prompt_intro: OpenSIPS CLI for 10.x.x.x instance
communication_type: http
url: http://10.x.x.x:8888/mi <http://10.x.x.x:8888/mi>

Getting below errors when i tried to switch to instance 10.x.x.x
/(opensips-cli): instance switch 10.x.x.x
OpenSIPS CLI for 10.x.x.x instance
ERROR: communication exception for 'which' returned:
ERROR: Is OpenSIPS running?/
Please advise what wrong I am doing now.


Best Regards
Saurabh Chopra
+918861979979


On Thu, Apr 15, 2021 at 4:11 PM Răzvan Crainea <[email protected] <mailto:[email protected]>> wrote:

    Hi, Sasmita, Saurabh!

    1. fifo, by its nature, can only be used for localhost queries; if you
    need to run remote commands, you need to use a remote communication
    protocol, such as http
    2. Most likely you are querying a bad http root path for the `mi_http`
    module: in your URL it shows you are querying the `json` root, whereas
    the default mi_http root is `mi`. Can you make sure A. you're not
    modifying the mi_http root parameter[1], and/or if you do, make sure it
    corresponds to the path in the URL?

    [1] https://opensips.org/docs/modules/3.1.x/mi_http.html#param_root
    <https://opensips.org/docs/modules/3.1.x/mi_http.html#param_root>

    Best regards,

    Răzvan Crainea
    OpenSIPS Core Developer
    http://www.opensips-solutions.com <http://www.opensips-solutions.com>

    On 4/15/21 12:51 PM, Saurabh Chopra wrote:
     > Hi Guys,
     >
     > Any update would be appreciated regarding the above matter.
     >
     > Best Regards
     > Saurabh Chopra
     > +918861979979
     >
     >
     > On Wed, Apr 14, 2021 at 3:33 PM Saurabh Chopra
    <[email protected] <mailto:[email protected]>
     > <mailto:[email protected] <mailto:[email protected]>>> wrote:
     >
     >     Hi Opensips Team/ Razvan,
     >
     >     As per Sasmita's previous mail, we are still stuck in a
    situation where,
     >
     >     1. If we are using "FIFO" as a communication_type we are not
    getting
     >     data from a remote machine instead getting data from a
    local host.
     >     2. If we are using "HTTP" as a communication_type then we are
    unable
     >     to switch to a remote machine.
     >
     >     For both scenarios logs have been attached in *pastebin*.
     >
     >     Kindly advise and provide us with an early resolution. We will be
     >     waiting for your prompt response
     >
     >     Best Regards
     >     Saurabh Chopra
     >     +918861979979
     >
     >
     >     On Tue, Mar 30, 2021 at 11:31 AM Sasmita Panda
    <[email protected] <mailto:[email protected]>
     >     <mailto:[email protected] <mailto:[email protected]>>> wrote:
     >
     >         Hi ,
     >
     >         I have changed my instance.cfg like bellow .
     >
     >         [10.0.0.1]
     >         prompt_name: [email protected]
    <mailto:[email protected]> <mailto:[email protected]
    <mailto:[email protected]>>
     >         communication_type: http
     >         url: http://10.0.0.1:8888/json
    <http://10.0.0.1:8888/json> <http://10.0.0.1:8888/json
    <http://10.0.0.1:8888/json>>
     >
     >         With this config above I am getting some error . I am not
    able
     >         to switch to the remote instance as well .
     >
     > https://pastebin.com/1fDuHbBk <https://pastebin.com/1fDuHbBk>
    <https://pastebin.com/1fDuHbBk <https://pastebin.com/1fDuHbBk>>
     >
     >
     >         if I am giving below config .
     >
     >           [10.0.0.1]
     >         prompt_name: [email protected]
    <mailto:[email protected]> <mailto:[email protected]
    <mailto:[email protected]>>
     >         communication_type: fifo
     >         fifo_file: /tmp/opensips_fifo
     >
     >         I am able to switch to the remote instance . After switching
     >         when I am running any command its giving the result for
     >         localhost not  for the remote instance ;.
     >
     >
     >         What should I do ? Am I missing any dependency library ?
    Please
     >         do help .
     >
     >
     >
     >
     >         */Thanks & Regards/*
     >         /Sasmita Panda/
     >         /Senior Network Testing and Software Engineer/
     >         /3CLogic , ph:07827611765/
     >
     >
     >         On Fri, Mar 26, 2021 at 5:58 PM Sasmita Panda
     >         <[email protected] <mailto:[email protected]>
    <mailto:[email protected] <mailto:[email protected]>>> wrote:
     >
     >             same result .
     >
     >             my instance.cfg contains :
     >             cat instance.cfg
     >             [10.0.1.1]
     >             prompt_name: [email protected]
    <mailto:[email protected]>
     >             <mailto:[email protected]
    <mailto:[email protected]>>
     >             fifo_file: /tmp/opensips_fifo
     >
     > https://pastebin.com/FQBipyZJ <https://pastebin.com/FQBipyZJ>
    <https://pastebin.com/FQBipyZJ <https://pastebin.com/FQBipyZJ>>
     >             This is the result .
     >
     >             */
     >             /*
     >             */
     >             /*
     >             */Thanks & Regards/*
     >             /Sasmita Panda/
     >             /Senior Network Testing and Software Engineer/
     >             /3CLogic , ph:07827611765/
     >
     >
     >             On Fri, Mar 26, 2021 at 5:38 PM Răzvan Crainea
     >             <[email protected] <mailto:[email protected]>
    <mailto:[email protected] <mailto:[email protected]>>> wrote:
     >
     >                 You are not switching the instance correctly: should
     >                 have used `instance
     >                 switch 10.0.1.1`
     >
     >                 Best regards,
     >
     >                 Răzvan Crainea
     >                 OpenSIPS Core Developer
     > http://www.opensips-solutions.com <http://www.opensips-solutions.com>
     >                 <http://www.opensips-solutions.com
    <http://www.opensips-solutions.com>>
     >
     >                 On 3/26/21 1:54 PM, Sasmita Panda wrote:
     >                  > I am not getting any error for this . I have
    pasted
     >                 the logs in pastebin .
     >                  >
     >                  > https://pastebin.com/4tzXzrrG
    <https://pastebin.com/4tzXzrrG>
     >                 <https://pastebin.com/4tzXzrrG
    <https://pastebin.com/4tzXzrrG>>
     >                 <https://pastebin.com/4tzXzrrG
    <https://pastebin.com/4tzXzrrG>
     >                 <https://pastebin.com/4tzXzrrG
    <https://pastebin.com/4tzXzrrG>>>
     >                  >
     >                  > What needs to be done in the remote machine
    10.0.1.1
     >                 . I have allowed
     >                  > 8888 tcp port . I saw default http url is like
     > http://10.0.1.1:8888/mi <http://10.0.1.1:8888/mi>
    <http://10.0.1.1:8888/mi <http://10.0.1.1:8888/mi>>
     >                  > <http://10.0.1.1:8888/mi
    <http://10.0.1.1:8888/mi> <http://10.0.1.1:8888/mi
    <http://10.0.1.1:8888/mi>>> .
     >                  > Do suggest if I am missing anything .
     >                  >
     >                  >
     >                  > */Thanks & Regards/*
     >                  > /Sasmita Panda/
     >                  > /Senior Network Testing and Software Engineer/
     >                  > /3CLogic , ph:07827611765/
     >                  >
     >                  >
     >                  > On Fri, Mar 26, 2021 at 5:00 PM Răzvan Crainea
     >                 <[email protected] <mailto:[email protected]>
    <mailto:[email protected] <mailto:[email protected]>>
     >                  > <mailto:[email protected]
    <mailto:[email protected]>
     >                 <mailto:[email protected]
    <mailto:[email protected]>>>> wrote:
     >                  >
     >                  >     Hi, Sasmita!
     >                  >
     >                  >     Can you post the logs of an execution for the
     >                 10.0.1.1 instance run
     >                  >     with
     >                  >     debugging (-d parameter)? Also, please
    post them
     >                 on pastebin[1] or in a
     >                  >     different place, not in the mail itself.
     >                  >
     >                  >     [1] https://pastebin.com/
    <https://pastebin.com/> <https://pastebin.com/ <https://pastebin.com/>>
     >                 <https://pastebin.com/ <https://pastebin.com/>
    <https://pastebin.com/ <https://pastebin.com/>>>
     >                  >
     >                  >     Best regards,
     >                  >
     >                  >     Răzvan Crainea
     >                  >     OpenSIPS Core Developer
     >                  > http://www.opensips-solutions.com
    <http://www.opensips-solutions.com>
     >                 <http://www.opensips-solutions.com
    <http://www.opensips-solutions.com>>
     >                 <http://www.opensips-solutions.com
    <http://www.opensips-solutions.com>
     >                 <http://www.opensips-solutions.com
    <http://www.opensips-solutions.com>>>
     >                  >
     >                  >     On 3/26/21 11:16 AM, Sasmita Panda wrote:
     >                  >      > Hi All ,
     >                  >      >
     >                  >      > I am using opensips-cli  ( 0.1.0 ) and
     >                 opensips-3.1 .
     >                  >      >
     >                  >      > I am able to get all the data of the local
     >                 host through cli but
     >                  >     when I
     >                  >      > am connecting to a remote host even though
     >                 it's getting connected
     >                  >     but no
     >                  >      > data is visible for the remote
    instance  . It
     >                 only showing the
     >                  >     data of
     >                  >      > the instance on which I am running the
    cli .
     >                  >      >
     >                  >      >
     >                  >      >   my opensips-cli.cfg
     >                  >      > *[default]
     >                  >      > database_modules: All
     >                  >      > prompt_intro: Welcome to OpenSIPS
     >                  >      >
     >                  >      > database_admin_url:
     >                 mysql://root:cccl0g1c@localhost
     >                  >      > #database_url:
     >                   mysql://opensips:opensipsrw@localhost
     >                  >      > database_schema_path:
    /opt/opensips-3.1/scripts
     >                  >      >
     >                  >      > [10.0.1.1]
     >                  >      > prompt_name: [email protected]
    <mailto:[email protected]>
     >                 <mailto:[email protected]
    <mailto:[email protected]>>
     >                 <mailto:[email protected]
    <mailto:[email protected]>
     >                 <mailto:[email protected]
    <mailto:[email protected]>>>
     >                  >     <mailto:[email protected]
    <mailto:[email protected]>
     >                 <mailto:[email protected]
    <mailto:[email protected]>>
     >                 <mailto:[email protected]
    <mailto:[email protected]>
     >                 <mailto:[email protected]
    <mailto:[email protected]>>>>
     >                  >      > prompt_intro: OpenSIPS CLI for 10.0.1.1
    instance
     >                  >      > communication_type: fifo
     >                  >      > url: http://10.0.1.1:8888/mi
    <http://10.0.1.1:8888/mi>
     >                 <http://10.0.1.1:8888/mi
    <http://10.0.1.1:8888/mi>> <http://10.0.1.1:8888/mi
    <http://10.0.1.1:8888/mi>
     >                 <http://10.0.1.1:8888/mi <http://10.0.1.1:8888/mi>>>
     >                  >     <http://10.0.1.1:8888/mi
    <http://10.0.1.1:8888/mi>
     >                 <http://10.0.1.1:8888/mi
    <http://10.0.1.1:8888/mi>> <http://10.0.1.1:8888/mi
    <http://10.0.1.1:8888/mi>
     >                 <http://10.0.1.1:8888/mi
    <http://10.0.1.1:8888/mi>>>>*
     >                  >      >
     >                  >      > Am I doing anything wrong ? Please do
    help me .
     >                  >      >
     >                  >      >
     >                  >      > */Thanks & Regards/*
     >                  >      > /Sasmita Panda/
     >                  >      > /Senior Network Testing and Software
    Engineer/
     >                  >      > /3CLogic , ph:07827611765/
     >                  >      >
     >                  >      >
    _______________________________________________
     >                  >      > Users mailing list
     >                  >      > [email protected]
    <mailto:[email protected]>
     >                 <mailto:[email protected]
    <mailto:[email protected]>>
     >                 <mailto:[email protected]
    <mailto:[email protected]>
     >                 <mailto:[email protected]
    <mailto:[email protected]>>>
     >                  >      >
     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
>  <http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>>
     >                  >
>  <http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>>>
     >                  >      >
     >                  >
>                  >  _______________________________________________
     >                  >     Users mailing list
     >                  > [email protected]
    <mailto:[email protected]>
     >                 <mailto:[email protected]
    <mailto:[email protected]>>
     >                 <mailto:[email protected]
    <mailto:[email protected]>
     >                 <mailto:[email protected]
    <mailto:[email protected]>>>
     >                  >
     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
>  <http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>>
     >                  >
>  <http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>>>
     >                  >
     >                  >
     >                  > _______________________________________________
     >                  > Users mailing list
     >                  > [email protected]
    <mailto:[email protected]>
     >                 <mailto:[email protected]
    <mailto:[email protected]>>
     >                  >
     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
>  <http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>>
     >                  >
     >
     >                 _______________________________________________
     >                 Users mailing list
     > [email protected] <mailto:[email protected]>
    <mailto:[email protected] <mailto:[email protected]>>
     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
>  <http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>>
     >
     >         _______________________________________________
     >         Users mailing list
     > [email protected] <mailto:[email protected]>
    <mailto:[email protected] <mailto:[email protected]>>
     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
     >         <http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>>
     >
     >
     > _______________________________________________
     > Users mailing list
     > [email protected] <mailto:[email protected]>
     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
     >

    _______________________________________________
    Users mailing list
    [email protected] <mailto:[email protected]>
    http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to