TimesTen: Failed to retrieve IP address of the system

In my quest to understand TimesTen a bit more, I built a VM with VirtualBox, OL 6.5, and TimesTen 11.2.2. I verified that I could connect to TimesTen from the VM instance, but when I tried to connect to the TimesTen database from my host (MacBook Pro), I received the following error:

Danny:>ttisqlcs

Copyright(c)1996,2015,Oracle and/orits affiliates.

All rights reserved.Type?or”help”forhelp,type”exit”toquit ttIsql.

Command>connect dsn=sampledb_1122;

S1000:Failed toretrieve IP address of the system.System error:-3

The command failed.

I even tried to connect using SQL Developer and encountered the same error:

Here process I went through to finally fix this problem.

Verify that the Server Port 53397 is correct:

[root@TimesTen info]# cat sys.ttconnect.ini

# Copyright (c) 1999, 2009, Oracle and/or its affiliates.All rights reserved.

###############################################################

# This is a sample sys.ttconnect.ini file that is used for the

# TimesTen Client. It contains entries for each server.

###############################################################

[ttLocalHost_tt1122]

Description=TimesTen Server

Network_Address=ttLocalHost

TCP_PORT=53397

The guest VM responded to ping so I know that the host can “see” the VM.

Since this is running on my laptop, I don’t really care about the fire wall so I turned that off:

[root@TimesTen info]# service iptables status

iptables:Firewall isnotrunning.

[root@TimesTen info]#

Finally I checked the /etc/hosts file on the guest VM, and there it was, I had not added the server name to the hosts file:

[root@TimesTen info]# cat /etc/hosts

127.0.0.1localhost localhost.localdomain localhost4 localhost4.localdomain4

::1localhost localhost.localdomain localhost6 localhost6.localdomain6

Added the following line to my /etc/hosts file: 10.1.1.55 timesten.localdomain ttvm

Tried to connect to the TimesTen database again:

Danny:>ttisqlcs

Copyright(c)1996,2015,Oracle and/orits affiliates.All rights reserved.

Type?or”help”forhelp,type”exit”toquit ttIsql.

Command>connect dsn=sampledb_1122;

Connection successful:DSN=sampledb_1122;TTC_SERVER=ttVM;TTC_SERVER_DSN=sampledb_1122;UID=dbryant;

DATASTORE=/opt/TimesTen/tt1122/info/DemoDataStore/sampledb_1122;

DATABASE CHARACTERSET=US7ASCII;

CONNECTION CHARACTERSET=US7ASCII;PERMSIZE=40;TEMPSIZE=32;TYPEMODE=0;

(Defaultsetting AutoCommit=1)

Command>

And finally a check with SQL Developer

There you have it.

Related


Originally published at dbaontap.com on April 8, 2016.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.