Service Virtualization

  • 1.  Receiving 'Unknown host specified' error in JDBC step

    Posted Dec 20, 2017 12:07 AM

    Hi,

    When I am connecting to DB using  JDBC step getting 'Unknown host specified' error( This particular VS is working fine without any issues in VSE for many days ) in VSE where as the same step is running without any issues in ITR. 

    Thanks,

    Narasimha.



  • 2.  Re: Receiving 'Unknown host specified' error in JDBC step

    Broadcom Employee
    Posted Dec 20, 2017 11:49 AM

    Narasimha,

             Can you please share the error log for this issue.

    Thanks,

    Surya.



  • 3.  Re: Receiving 'Unknown host specified' error in JDBC step

    Posted Dec 20, 2017 05:34 PM

    Hi Surya,

    Please find below error details..Thanks

     

     

    ============================================================================
    | Exception:
    ============================================================================
    | Message: Error doing random data sets
    ----------------------------------------------------------------------------
    | Trapped Exception:
    There is a Dataset in your test case that is failing to connect.
    Connection: <<REPLACED CONNECTION STRING VALUE>>
    | Trapped Message:

    ============================================================================
    | Exception:
    ============================================================================
    | Message:
    There is a Dataset in your test case that is failing to connect.
    Connection: <<REPLACED CONNECTION STRING VALUE>>
    ----------------------------------------------------------------------------
    | Trapped Exception: IO Error: Unknown host specified
    | Trapped Message: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    ----------------------------------------------------------------------------
    STACK TRACE
    java.sql.SQLRecoverableException: IO Error: Unknown host specified
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
    at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
    at com.itko.lisa.test.JDBCDataSet.openConnection(JDBCDataSet.java:203)
    at com.itko.lisa.test.JDBCDataSet.openResultSet(JDBCDataSet.java:278)
    at com.itko.lisa.test.JDBCDataSet.getNextRecord(JDBCDataSet.java:349)
    at com.itko.lisa.test.JDBCDataSet.getRecord(JDBCDataSet.java:314)
    at com.itko.lisa.test.DataSetManager.getDataSetResponse(DataSetManager.java:528)
    at com.itko.lisa.test.DataSetManager.processDataSet(DataSetManager.java:551)
    at com.itko.lisa.test.DataSetManager.processUnsynchedDataSets(DataSetManager.java:409)
    at com.itko.lisa.test.DataSetManager.processDataSetList(DataSetManager.java:172)
    at com.itko.lisa.test.TestNode.modifyVariables(TestNode.java:1535)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:939)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1288)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1203)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1188)
    at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1129)
    at com.itko.lisa.coordinator.Instance.run(Instance.java:204)
    Caused by: oracle.net.ns.NetException: Unknown host specified
    at oracle.net.resolver.HostnameNamingAdapter.resolve(HostnameNamingAdapter.java:207)
    at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:131)
    at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:475)
    at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
    ... 18 more
    ============================================================================


    ----------------------------------------------------------------------------
    STACK TRACE


    ============================================================================
    | Exception:
    ============================================================================
    | Message:
    There is a Dataset in your test case that is failing to connect.
    Connection: <<REPLACED CONNECTION STRING VALUE>>
    ----------------------------------------------------------------------------
    | Trapped Exception: IO Error: Unknown host specified
    | Trapped Message: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    ----------------------------------------------------------------------------
    STACK TRACE
    java.sql.SQLRecoverableException: IO Error: Unknown host specified
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
    at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
    at com.itko.lisa.test.JDBCDataSet.openConnection(JDBCDataSet.java:203)
    at com.itko.lisa.test.JDBCDataSet.openResultSet(JDBCDataSet.java:278)
    at com.itko.lisa.test.JDBCDataSet.getNextRecord(JDBCDataSet.java:349)
    at com.itko.lisa.test.JDBCDataSet.getRecord(JDBCDataSet.java:314)
    at com.itko.lisa.test.DataSetManager.getDataSetResponse(DataSetManager.java:528)
    at com.itko.lisa.test.DataSetManager.processDataSet(DataSetManager.java:551)
    at com.itko.lisa.test.DataSetManager.processUnsynchedDataSets(DataSetManager.java:409)
    at com.itko.lisa.test.DataSetManager.processDataSetList(DataSetManager.java:172)
    at com.itko.lisa.test.TestNode.modifyVariables(TestNode.java:1535)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:939)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1288)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1203)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1188)
    at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1129)
    at com.itko.lisa.coordinator.Instance.run(Instance.java:204)
    Caused by: oracle.net.ns.NetException: Unknown host specified
    at oracle.net.resolver.HostnameNamingAdapter.resolve(HostnameNamingAdapter.java:207)
    at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:131)
    at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:475)
    at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
    ... 18 more
    ============================================================================


    at com.itko.lisa.test.JDBCDataSet.openConnection(JDBCDataSet.java:220)
    at com.itko.lisa.test.JDBCDataSet.openResultSet(JDBCDataSet.java:278)
    at com.itko.lisa.test.JDBCDataSet.getNextRecord(JDBCDataSet.java:349)
    at com.itko.lisa.test.JDBCDataSet.getRecord(JDBCDataSet.java:314)
    at com.itko.lisa.test.DataSetManager.getDataSetResponse(DataSetManager.java:528)
    at com.itko.lisa.test.DataSetManager.processDataSet(DataSetManager.java:551)
    at com.itko.lisa.test.DataSetManager.processUnsynchedDataSets(DataSetManager.java:409)
    at com.itko.lisa.test.DataSetManager.processDataSetList(DataSetManager.java:172)
    at com.itko.lisa.test.TestNode.modifyVariables(TestNode.java:1535)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:939)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1288)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1203)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1188)
    at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1129)
    at com.itko.lisa.coordinator.Instance.run(Instance.java:204)
    ============================================================================


    Regards,

    Narasimha



  • 4.  Re: Receiving 'Unknown host specified' error in JDBC step
    Best Answer

    Broadcom Employee
    Posted Dec 20, 2017 08:00 PM

    Hi Narasimha,

     

        It means that, from your machine (where you are trying to connect to database host) it is unable to identity the host name of database server.

       You can test it by using "ping <hostname>" from command prompt. If this says "Request could not find host name..." you need to add host entry details in hosts file. Instead of host name, you can try by connecting to DB server using ip address like "ping <ip-address>", if this gives you response, replace host name with ip address in JDBC step.

       On VSE server it is working fine because, server is able to identify the database host name.

     

    Thanks & Regards

    Srikanth Gajawada



  • 5.  Re: Receiving 'Unknown host specified' error in JDBC step

    Posted Dec 21, 2017 02:42 AM

    Thanks for the details Srikanth.

    VS is able to identify the hostname till day before yesterday and all of a sudden started getting this error. Where can I find host file?

     

    Thanks,

    Narasimha