How to solve "Network Adapter could not establish the connection" error?

Problem description:

After installing migration-center when trying to start a scanner the following error is raised:

de.fme.mc.common.MCException: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection:

 Cause:

The most common cause is the host_name or instance_name retrieved by migration-center from the system view v$instance are not correct. This may happen when database instances are cloned or moved from one host to another, as that information doesn’t get updated by Oracle. You may check that by running the following query in SqlPlus or Sql Developer:

Select host_name, instance_name from v$instance;

If host_name or instance name are not correct, please proceed with the solution described below.
You may also check the connection string used by jobserver in the wrapper.log file located in the jobserver installation folder:

JobServer executeCmd: start description=job_description connection=jdbc:oracle:thin:@//HOST_NAME:1521/INSTANCE_NAME

Solution:

Oracle 11g:


Correct the host by deleting the FMEMC.v$instance synonym and creating the following view in the FMEMC schema (replace the strings in quotations  with the correct host name and instance name):

DROP SYNONYM FMEMC.V$INSTANCE;

CREATE OR REPLACE VIEW v$instance AS SELECT '<insert hostname, FQDN or IP here>' as host_name, '<insert instance name here>' as instance_name FROM dual;

Oracle 12c:

Connect to MC database with sqlplus or sqldeveloper as user fmemc.
Excecute the query : Select value from settings where name = 'JDBC_CONNECTION';
Check if the connection string is correct (compare the service name with the one you have it in tnsnames.ora)
Fix the connection string by updating the value in the DB: 

# If you have a service name use this connection string format:
update settings set value = '//<serverName>:<port>/<Service_Name>' where name = 'JDBC_CONNECTION';

# Don't forget to commit your changes!
Commit;
NOTE: Run the command above connected as user FMEMC.

Examples of valid JDBC connection strings:

//vm-oracle12r2:1521/orclpdb.fme.ro
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.