Jenkins sqlplus script runner plugin error ORA-12541: TNS:no listener

248 views
Skip to first unread message

rakesh reddy

unread,
Sep 20, 2017, 7:10:18 PM9/20/17
to Jenkins Users
Hi ,

We are getting the below error while we we try to run basic command through sqlplus script runner plugin. Please help me.

Using ORACLE_HOME =/u01/ora/10.2.0/db_1
--------------------------------------------------------------------------
Getting SQLPlus version
Process exited with status 0
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Using ORACLE_HOME =/u01/ora/10.2.0/db_1
--------------------------------------------------------------------------
Running defined script on apps/********@hlmcm
Temp script:/tmp/temp-script-15059305636003383707752329208328.sql
--------------------------------------------------------------------------

SQL*Plus: Release 10.2.0.1.0 - Production

Process exited with status 1
java.lang.RuntimeException: Process exited with error
	at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunner.invoke(SQLPlusRunner.java:249)
	at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunner.invoke(SQLPlusRunner.java:16)
	at hudson.FilePath.act(FilePath.java:996)
	at hudson.FilePath.act(FilePath.java:974)
	at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunnerBuilder.perform(SQLPlusRunnerBuilder.java:98)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
	at hudson.model.Build$BuildExecution.build(Build.java:206)
	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
	at hudson.model.Run.execute(Run.java:1728)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:405)
ERROR: Process exited with error
Checking console output

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 20 18:02:43 2017

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

ERROR:
ORA-12541: TNS:no listener


SP2-0751: Unable to connect to Oracle.  Exiting SQL*Plus

Thanks,
Rakesh.

s mishra

unread,
Dec 21, 2017, 9:18:37 AM12/21/17
to Jenkins Users
Hi Rakesh,

TNSNAMES.ORA is configuration file that defines databases addresses for establishing connections to them.

You have to create under /u01/ora/10.2.0/db_1/network/admin and define the TNSNAMES.ORA file.

TNSNAMES.ORA 

NADB=
 (description=
   (address_list=
     (address = (protocol = TCP)(host = 10.254.3.198)(port = 1521))
   )
 (connect_data =
   (service_name=NADB)
 )
)


Thanks,
Sameek Mishra
Reply all
Reply to author
Forward
0 new messages