Delphix Toolkits (dxToolkit and dxmToolkit)

 View Only
Expand all | Collapse all

>dx_connection_check Not working

  • 1.  >dx_connection_check Not working

    Posted 03-04-2024 07:57:00 AM

    Hi Team

    I have list of delphix engines in the config file, but when I run the command for all to check connections, its not working and its giving the error message.


    D:\Users\kartmuthyala\Downloads\dxtoolkit2>dx_connection_check -all
    Option hostip and port are required.
    Usage:
         dx_connection_check  [ -engine|d <delphix identifier> | -all ] [ -configfile file ] -hostip IP/FQDN -port portno [ --help|? ] [ -debug ]

    Arguments:
        Delphix Engine selection - if not specified a default host(s) from
        dxtools.conf will be used.

        -engine|d Specify Delphix Engine name from dxtools.conf file
        -all Run script on all engines
        -hostip IP/FQDN Host IP or FQDN
        -port portno Port to check

    Options:
        -help Print this screen
        -debug Turn on debugging


    D:\Users\kartmuthyala\Downloads\dxtoolkit2>

    Not sure whats the issue, could you please check and assist the right command to use?



    ------------------------------
    Karteek Muthyala
    Information Security Engineer
    Wells Fargo Bank, N.A.
    ------------------------------


  • 2.  RE: >dx_connection_check Not working

    Posted 03-04-2024 08:44:00 AM

    Hello Karteek,

    The help screen states that "Option hostip and port are required".

    This command is designed to test connectivity between a given Delphix Engine (or all of them in the config file) and the specified host/IP & port combination.

    EXAMPLES
        Check if listener port is open

         dx_connection_check -d 53 -hostip 192.168.1.20 -port 1521
         Connection to 192.168.1.20:1521 refused - port closed

        Check if ssh port is open

         dx_connection_check -d 53 -hostip 192.168.1.20 -port 22
         Connection to 192.168.1.20:22 sucessful - port seems to be opened

    Thanks,

    Neal



    ------------------------------
    Neal Stack
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 3.  RE: >dx_connection_check Not working

    Posted 03-04-2024 10:48:00 AM

    Hi Neal

    Thank you for your response, but its not working for me.

    D:\Users\kartmuthyala\Downloads\dxtoolkit2> dx_connection_check -d 53 -hostip 10.xxx.55.22 -port 1521
    Can't find 53 in config file.
    Can't connect to Dephix Engine 53


    D:\Users\kartmuthyala\Downloads\dxtoolkit2> dx_connection_check -d 2 -hostip 10.xxx.55.22 -port 1521
    Can't find 2 in config file.
    Can't connect to Dephix Engine 2


    D:\Users\kartmuthyala\Downloads\dxtoolkit2> dx_connection_check -d 53 -hostip 10.xxx.55.22 -port 22
    Can't find 53 in config file.
    Can't connect to Dephix Engine 53

    I tried removing the no 53, not sure from where you got the 53. but I replaced with different numbers from our config file. but still its did not worked. 
    we have around 4 servers, I wanted to test connection all at a time. please suggest.



    ------------------------------
    Karteek Muthyala
    Information Security Engineer
    Wells Fargo Bank, N.A.
    ------------------------------



  • 4.  RE: >dx_connection_check Not working
    Best Answer

    Posted 03-04-2024 11:05:00 AM

    Hi Karteek,

    "53" comes from the help command output. It would mean that in this example, there was an engine named "53" in the "dxtools.conf" file. Please try using a name that exists in your own "dxtools.conf" file. See the help output for more details:

    % ./dx_connection_check --help
    SYNOPSIS
         dx_connection_check  [ -engine|d <delphix identifier> | -all ] [ -configfile file ] -hostip IP/FQDN -port portno [ --help|? ] [ -debug ]

    DESCRIPTION
        Check connectivity between Delphix Engine and host using a specified
        port

    ARGUMENTS
        Delphix Engine selection - if not specified a default host(s) from
        dxtools.conf will be used.

        -engine|d Specify Delphix Engine name from dxtools.conf file
        -all Run script on all engines
        -hostip IP/FQDN Host IP or FQDN
        -port portno Port to check

    OPTIONS
        -help Print this screen
        -debug Turn on debugging

    EXAMPLES
        Check if listener port is open

         dx_connection_check -d 53 -hostip 192.168.1.20 -port 1521
         Connection to 192.168.1.20:1521 refused - port closed

        Check if ssh port is open

         dx_connection_check -d 53 -hostip 192.168.1.20 -port 22
         Connection to 192.168.1.20:22 sucessful - port seems to be opened



    ------------------------------
    Neal Stack
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 5.  RE: >dx_connection_check Not working

    Posted 03-05-2024 12:01:00 AM

    Thank you neel, for single servers its working now, but how about all engines to run?



    ------------------------------
    Karteek Muthyala
    Information Security Engineer
    Wells Fargo Bank, N.A.
    ------------------------------



  • 6.  RE: >dx_connection_check Not working

    Posted 03-05-2024 03:33:00 AM

    Hi Karteek

    To run dx_connection_check against all engines in your dxtools.conf file, use the flag -all

    eg:

    ./dx_connection_check -all -hostip <host-ip-to-test> -port <port-to-test>

    Cheers


    Andrew



    ------------------------------
    Andrew McLennan
    Senior Technical Support Engineer
    Delphix
    ------------------------------



  • 7.  RE: >dx_connection_check Not working

    Posted 03-05-2024 05:10:00 AM

    Hi Andrew

    Thank you for your message, but its not working and giving the error message.

    D:\Users\kartmuthyala\Downloads\dxtoolkit2> dx_connection_check -all -hostip 10.5.xx.200 -port 22
    Use of uninitialized value $out in pattern match (m//) at script/dx_connection_check.pl line 99.
    Use of uninitialized value $out in pattern match (m//) at script/dx_connection_check.pl line 102.
    Engine responded with unknown state. Please check below:
    $VAR1 = undef;
    $VAR1 = undef;
    Terminating on signal SIGINT(2)
    ^C
    D:\Users\kartmuthyala\Downloads\dxtoolkit2>
    D:\Users\kartmuthyala\Downloads\dxtoolkit2>./dx_connection_check -all -hostip 10.5.xx.200 -port 22
    '.' is not recognized as an internal or external command,
    operable program or batch file.

    D:\Users\kartmuthyala\Downloads\dxtoolkit2>dx_connection_check -all -hostip 10.5.xx.200 -port 22



    ------------------------------
    Karteek Muthyala
    Information Security Engineer
    Wells Fargo Bank, N.A.
    ------------------------------



  • 8.  RE: >dx_connection_check Not working

    Posted 03-05-2024 10:30:00 AM
    Edited by Neal Stack 03-05-2024 10:30:06 AM

    Hi Karteek,

    It looks like one of the engines is returning an unexpected response so it gives "Engine responded with unknown state.".

    What version of dxtoolkit are you using ( ./dx_connection_check -v)?

    Can you rerun the command with the "-debug" flag?

    dx_connection_check -all -hostip 10.5.xx.200 -port 22 -debug

    Thanks,

    Neal



    ------------------------------
    Neal Stack
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 9.  RE: >dx_connection_check Not working

    Posted 03-06-2024 01:00:00 AM

    Hi Neal

    Please find the response below.

    D:\Users\kartmuthyala\Downloads\dxtoolkit2>dx_connection_check -all -hostip 1x.xxx.31.200 -port 222 -debug
    Dxtoolkit version 2.4.14.1
    Loading engines from D:/Users/kartmuthyala/Downloads/dxtoolkit2/dxtools.conf
    Can't secure cookie. Windows machine
    connecting to: AWS ( IP/name : 1x.xxx.255.204 )
    GET: http://1x.xxx.255.204:80/resources/json/delphix/session
    ** GET http://1x.xxx.255.204:80/resources/json/delphix/session ==> 200 OK
    prevalidate set to false. checking variable and script for password as session doesn't exist
    API Version: 1.3
    ** POST http://1x.xxx.255.204:80/resources/json/delphix/session ==> 200 OK (1s)
    GET: http://1x.xxx.255.204:80/resources/json/delphix/about
    ** GET http://1x.xxx.255.204:80/resources/json/delphix/about ==> 200 OK (1s)
    API Version: 1.11
    ** POST http://1x.xxx.255.204:80/resources/json/delphix/session ==> 200 OK (1s)
    ** POST http://1x.xxx.255.204:80/resources/json/delphix/login ==> 200 OK (1s)
    login to 1x.xxx.255.204  succeeded.
    ** POST http://1x.xxx.255.204:80/resources/json/delphix/connectivity/ssh ==> 500 read timeout (60s)
    Use of uninitialized value $out in pattern match (m//) at script/dx_connection_check.pl line 99.
    Use of uninitialized value $out in pattern match (m//) at script/dx_connection_check.pl line 102.
    Engine responded with unknown state. Please check below:
    $VAR1 = undef;
    $VAR1 = undef;
    Can't secure cookie. Windows machine
    connecting to: Azure ( IP/name : 1x.xxx.55.70 )
    GET: http://1x.xxx.55.70:80/resources/json/delphix/session
    ** GET http://1x.xxx.55.70:80/resources/json/delphix/session ==> 200 OK (1s)
    prevalidate set to false. checking variable and script for password as session doesn't exist
    API Version: 1.3h
    ** POST http://1x.xxx.55.70:80/resources/json/delphix/session ==> 200 OK
    GET: http://1x.xxx.55.70:80/resources/json/delphix/about
    ** GET http://1x.xxx.55.70:80/resources/json/delphix/about ==> 200 OK
    API Version: 1.11
    ** POST http://1x.xxx.55.70:80/resources/json/delphix/session ==> 200 OK (1s)
    ** POST http://1x.xxx.55.70:80/resources/json/delphix/login ==> 200 OK (1s)
    login to 1x.xxx.55.70  succeeded.
    ** POST http://1x.xxx.55.70:80/resources/json/delphix/connectivity/ssh ==> 200 OK (2s)
    Connection to 1x.xxx.31.200:222 refused - port closed
    Can't secure cookie. Windows machine
    connecting to: Herm1 ( IP/name : 1x.xxx.31.200 )
    GET: http://1x.xxx.31.200:80/resources/json/delphix/session
    ** GET http://1x.xxx.31.200:80/resources/json/delphix/session ==> 200 OK
    prevalidate set to false. checking variable and script for password as session doesn't exist
    API Version: 1.3
    ** POST http://1x.xxx.31.200:80/resources/json/delphix/session ==> 200 OK (1s)
    GET: http://1x.xxx.31.200:80/resources/json/delphix/about
    ** GET http://1x.xxx.31.200:80/resources/json/delphix/about ==> 200 OK
    API Version: 1.11
    ** POST http://1x.xxx.31.200:80/resources/json/delphix/session ==> 200 OK (1s)
    ** POST http://1x.xxx.31.200:80/resources/json/delphix/login ==> 200 OK (1s)
    login to 1x.xxx.31.200  succeeded.
    ** POST http://1x.xxx.31.200:80/resources/json/delphix/connectivity/ssh ==> 200 OK (1s)
    Engine responded with unknown state. Please check below:
    $VAR1 = undef;
    $VAR1 = undef;
    Can't secure cookie. Windows machine
    connecting to: Herm2 ( IP/name : 1x.xxx.30.110 )
    GET: http://1x.xxx.30.110:80/resources/json/delphix/session
    ** GET http://1x.xxx.30.110:80/resources/json/delphix/session ==> 200 OK (1s)
    prevalidate set to false. checking variable and script for password as session doesn't exist
    API Version: 1.3
    ** POST http://1x.xxx.30.110:80/resources/json/delphix/session ==> 200 OK (1s)
    GET: http://1x.xxx.30.110:80/resources/json/delphix/about
    ** GET http://1x.xxx.30.110:80/resources/json/delphix/about ==> 200 OK
    API Version: 1.11
    ** POST http://1x.xxx.30.110:80/resources/json/delphix/session ==> 200 OK (1s)
    ** POST http://1x.xxx.30.110:80/resources/json/delphix/login ==> 200 OK (1s)
    login to 1x.xxx.30.110  succeeded.
    ** POST http://1x.xxx.30.110:80/resources/json/delphix/connectivity/ssh ==> 200 OK (1s)
    Engine responded with unknown state. Please check below:
    $VAR1 = undef;
    $VAR1 = undef;



    ------------------------------
    Karteek Muthyala
    Information Security Engineer
    Wells Fargo Bank, N.A.
    ------------------------------



  • 10.  RE: >dx_connection_check Not working

    Posted 03-06-2024 10:43:00 AM

    Hi Karteek,

    It doesn't look like the "dx_connection_check" command catches/handles this error. I would recommend clicking on the green "New issue" button on the following link and raise a bug:

    When you raise the bug, use the "-debug 2" flag to provide the additional details that the dxtoolkit engineers will need to investigate it.

    Thanks,

    Neal



    ------------------------------
    Neal Stack
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 11.  RE: >dx_connection_check Not working

    Posted 03-07-2024 07:10:00 AM

    Hi Neal, sure thank you. I will do that, till that I can check the connection individually. But how about Masking engines to check similar to VE engines? is there any DXM command for the Masking engines to check?

    I tried in DXM toolkit, no where I found. 



    ------------------------------
    Karteek Muthyala
    Information Security Engineer
    Wells Fargo Bank, N.A.
    ------------------------------



  • 12.  RE: >dx_connection_check Not working

    Posted 03-07-2024 09:12:00 AM

    Hi Karteek,

    Can you start a new topic/thread about the masking engine question? The masking engine has its own set of APIs and toolkits, etc.

    It might be confusing to the community to start talking about a different tool here.

    Thanks,

    Neal



    ------------------------------
    Neal Stack
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 13.  RE: >dx_connection_check Not working

    Posted 03-05-2024 02:42:00 PM

    Hello 

    I have checked with my setup and command is working fine when we are proving the correct IP or hostname and Port.

    I can see above error when we pass invalid IP address

     ./dx_connection_check -d ENGINENAME -hostip 10.61.222.663 -port 22
    Engine responded with unknown state. Please check below:
    $VAR1 = undef;
    $VAR1 = undef;

    I suggest you to check the IP with ping command once or please validate the IP or you can provide the hostname instead of IP



    ------------------------------
    Pankaj Asegaonkar
    Masking/Virtualization Specialist
    +91 9689996500
    ------------------------------



  • 14.  RE: >dx_connection_check Not working

    Posted 03-05-2024 04:05:00 PM
    Edited by Michael Torok 03-05-2024 04:34:12 PM
    Hello,

    I think Pankaj may be onto the issue.

    If you run the command with "-debug 2" and provide an IP address that the Delphix Engine can't reach, you can see the underlying problem:
    % ./dx_connection_check -engine neal1800 -hostip 10.61.222.663 -port 22 -debug 2 Dxtoolkit version 2.4.20 -Entering Engine::constructor -Entering Engine::load_config Loading engines from /Users/neal.stack/Downloads/dxtoolkit2/dxtools.conf  -Loading engine neal1800  -Loading engine supportlab  -Loading engine Landshark2 -Entering Engine::dlpx_connect   ...etc...  GET: http://neal1800.dcol2.delphix.com:80/resources/json/delphix/user/current ** GET http://neal1800.dcol2.delphix.com:80/resources/json/delphix/user/current ==> 200 OK (1s) -Entering Engine::getUsername -Entering Engine::checkSSHconnectivity -Entering Engine::postJSONData -{    "username" : "dummy",    "address" : "10.61.222.663",    "credentials" : {       "type" : "PasswordCredential",       "password" : "password"    },    "port" : 22,    "type" : "SSHConnectivity" }   ** POST http://neal1800.dcol2.delphix.com:80/resources/json/delphix/connectivity/ssh ==> 200 OK  -Response message: {    "error" : {       "details" : "The remote host name \"10.61.222.663\" could not be resolved.",       "type" : "APIError",       "commandOutput" : null,       "diagnoses" : [],       "id" : "exception.ccc.unknown.host",       "action" : "Verify the host address entered and check the DNS server configuration with your system administrator."    },    "type" : "ErrorResult",    "status" : "ERROR" }


    It doesn't look like the "dx_connection_check" command catches/handles this error. I would recommend clicking on the green "New issue" button on the following link and raise a bug: