Network Adapter error while connecting Jira 4.2 to Oracle 11G database

Anandhi A November 15, 2012

Got this error while trying to install Jira 4.2 and connect it to Oracle 11g database.

OS : Redhat Linux 5.5
Jira : Jira Version 4.2 Enterprise Standalone
Database : Oracle 11G R2
Java : JDK 6u37

Attempting to connect to the Oracle database server...
Could not connect to the DB: The Network Adapter could not establish the connection.

The driver oracle-jdbc-5.jar is also available.

I have oracle and Jira in the same system only. But i cant connect it. Please tell me how to solve this.

2 answers

1 accepted

2 votes
Answer accepted
Naren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2012

Its quite clear now that the when you are running the program or script, linux is not able find it under /usr/local/bin then /bin, /usr/bin and finally in /home/myname/bin.

To add these to your PATH variable , edit the .profile file add the values and at the end, after running the $echo PATH command , the o/p should look something like -

/usr/local/bin:/bin:/usr/bin:/home/myname/bin

1 vote
Naren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2012

Hi Anandhi,

The possible reasons could be -

using the wrong URL

wrong port number or IP address

listener is not configured properly

The listener process (service) is not running. You can re-start it with the "lsnrctl start" command

Anandhi A November 18, 2012

Hi Naren,

I gave correct data only.

I tried the lsnrctl command. But i get a command not found error.:(

Also, i get the same 'command not found' error for ls -l command.

Please help me how to solve this....

Thanks in advance

Naren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2012

You need to check whether your environment variables are set properlyy-
$echo ORACLE_HOME (Path to oracle home)
$echo PATH (See that '$ORACLE_HOME/bin' is in $PATH variable)

If you can't see the oracle home directories on running above commands, then you haven't set the environment variables.\
Set the environment variable -

ORACLE_HOME

ORACLE_SID

TNS_ADMIN

Example
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export ORACLE_SID=orcl

And now you can run the command 'lsnrctl start' or 'lsnrctl status' command.

Please refer this guide -

http://docs.oracle.com/cd/E11882_01/server.112/e10839/admin_ora.htm#CHDJHJGH

Hope it works finely.

Anandhi A November 18, 2012

I have set all those variables. I could see the values when i give echo $ORACLE_HOME etc.

But no other command is working. Like 'ls', 'su' ,'rm', 'rmdir', 'lsnrctl' etc...:(

How should i solve this..

Naren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2012

I guess you need to check with this command $echo PATH, check whether it includes the /bin, /sbin, etc directories which contains the binaries to execute the above mentioned command.

Anandhi A November 18, 2012

I gave echo $PATH...and got the following output...

/data/jira/jdk1.6.0_37/bin

I set the path for java...It has overwritten the other path...what do i do now...

Thanks in advance...

Anandhi A November 18, 2012

I edited ./profile in /etc and when i gave echo $PATH,i got the following output.

/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/sbin:/sbin:/data/jira/jdk1.6.0_37/bin:/export/home/odartadmin/bin

After this i tried giving ls -l

It is working now...Thank you very much..:):)

But still i cannot give lsnrctl command...'Command not found' error is thrown..

Please help me how to connect to oracle database...

Naren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2012

Glad its working now :) . You can refer the 2nd comment from the top to solve this lsnrctl probelm.

You can voteup my below comment if you think it helped you ;) :)

Naren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2012

The answer of this problem is with the PATH and ORACLE_HOME. Make sure you have correctly set these variables at the system level, or else you can repair the listener service using the Oracle Configuration Assistant

Anandhi A November 18, 2012

I tried starting the listener. But got this error

Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora11g.home.com)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
Linux Error: 99: Cannot assign requested address

How should i solve this...

Thanks in advance...

Naren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2012

Try pinging the above host name 'ora11g.home.com' by this command - ping ora11g.home.com. If its giving error like "Check the name..." then try pinging with the underlying IP address. If you are able to ping with the IP address then change the listener.ora by replacing the host name with the underlying IP adress

Anandhi A November 18, 2012

Thanks Naren..

I changes that hostname to my ip address and pinged it...now i am able to start the listener..

But got another problem...:(:(

ora-12505 tns listener does not know of sid

How do i solve this...

Thanks in advance..

Naren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 19, 2012

Please check with the listener.ora, tnsnames.ora and the o/p of lsnrctl services command. Hope his solves the problem

Anandhi A November 20, 2012

Thanks a lot Naren...I checked these files and the hostname was a problem..Now it is solved and connected....:):):)

Thanks once again...

Suggest an answer

Log in or Sign up to answer