Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error : ORA-21561 OID generation failed #47

Closed
hkjang opened this issue Jun 3, 2013 · 25 comments
Closed

Error : ORA-21561 OID generation failed #47

hkjang opened this issue Jun 3, 2013 · 25 comments

Comments

@hkjang
Copy link

hkjang commented Jun 3, 2013

i had this error message
how can i solve that ?

Error : ORA-21561 OID generation failed

OCI_INCLUDE_DIR="/opt/instantclient/sdk/include/"
OCI_LIB_DIR="/opt/instantclient"
ORACLE_HOME="/opt/instantclient"

$ uname -a
Linux xxxxxx2.6.18-348.4.1.el5 #1 SMP Fri Mar 22 05:41:51 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/issue
Red Hat Enterprise Linux Server release 5.9 (Tikanga)
Kernel \r on an \m

$ gcc --version
gcc (GCC) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@kontrafiktion
Copy link
Contributor

when does this happen, what are you doing?
Your issue does not contain enough information that would enable us to help you ...

@hkjang
Copy link
Author

hkjang commented Jun 3, 2013

i'm sorry about that .
actually i try to connect remote oracle server through nodejs oracle module

-->
oracle.connect({ "hostname": "xxx.xxx.xxx.xxx", "database":"xxx" ,"user": "xxx", "password": "xxxxx" }, function(err, connection) {
console.log('err : '+err.toString());

err console log just that

Error : ORA-21561 OID generation failed

thanks.

@kontrafiktion
Copy link
Contributor

the only thing I found by googling pointed to problems with the hostname.

please check that the database is reachable under exactly the hostname you are using (check tnsnames.ora and /etc/hosts). From your code snippet, I assume that the value for the "database" is an IP address or hostname, please try the name (or probably the SID) you can see the in tnsnames.ora instead.

EDIT: SID instead of name in tnsnames.ora

@hkjang
Copy link
Author

hkjang commented Jun 3, 2013

thanks.
i'm solved that error as downloading basic lite oracle client.
before, i downloaded just basic client for oracle and sdk not basic lite.

now i'm faced new error

err : Error: ORA-28547: connection to server failed, probable Oracle Net admin error.

@kontrafiktion
Copy link
Contributor

Please verify with sqlplus that you are able to connect
This does sound like a wrong configuration/installation
of your Connection.

@hkjang
Copy link
Author

hkjang commented Jun 3, 2013

thanks about ur comment.
i will~
good day!

@kontrafiktion
Copy link
Contributor

@hkjang did you solve it?

I stumbled upon the same error today and it was caused by the network setup: Oracle running in a VM, using "shared" networking, using WiFi in a coffee shop. After I went home, the problem disappeared.

@hkjang
Copy link
Author

hkjang commented Jun 10, 2013

yes i solve that.
actually that error is occurred by closing oracle connection before ending oracle execute.
by the way, do u know about encoding euc-kr?

linux locale is ko_KR.EUC-KR and oracle locale is KOREAN.
but Selected data is like as '?????'

thanks ^^

@hkjang
Copy link
Author

hkjang commented Jun 13, 2013

@vrvolle good day~
i've got this problem.
do you know how can i do to solve it?

Oracle Sqlplus is expressing encoding Korean normally.

this is console.log from array list
xxxxx : '?대쫫',
msg : '硫

-- oracle lang setting
$ env
NLS_LANG=American_America.KO16KSC5601

-- linux lang setting
$ echo $LANG
ko_KR.EUC-KR

$ uname -a
Linux xxxxxx2.6.18-348.4.1.el5 #1 SMP Fri Mar 22 05:41:51 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/issue
Red Hat Enterprise Linux Server release 5.9 (Tikanga)
Kernel \r on an \m

@kontrafiktion
Copy link
Contributor

@hkjang could you please close this issue

Sorry, But I don't have any experience with language settings and node-oracle

@hkjang
Copy link
Author

hkjang commented Jun 13, 2013

@vrvolle i'm sorry. thanks for ur helpful mention. i will close this issue now.

@hkjang hkjang closed this as completed Jun 13, 2013
@cyates81
Copy link

I experienced this error and fixed it by following the instructions from this link: http://chaos667.tumblr.com/post/20006357466/ora-21561-and-oracle-instant-client-11-2

@nickperkinslondon
Copy link

Thanks @cyates81! -- your solution fixed it for me! ( I am building a Django server on RHEL6.5 )

@johannish
Copy link
Collaborator

For posterity, the solution in that blog post that cyates81 linked to above is basically this:

  • Run the hostname command
  • Take the output from that command and add it to your "hosts" file:
    • 127.0.0.1

Or, as a one-liner:
echo "127.0.0.1 $(hostname)" | sudo tee -a /etc/hosts

@xp-lol-er
Copy link

thanks raztus, your solution fixed it for me

@frankbecker
Copy link

I got rid on the issue by adding "hostname": "127.0.0.1" to the connection object.

@ppot
Copy link

ppot commented Jan 18, 2016

+1 for @raztus

@espositot
Copy link

What if you run into this issue -- OID generation error -- when you are trying to connect from your Web server to your database server? The 'hostname' issue does not resolve the problem.

@lreisoliveira
Copy link

+1 for @raztus

@rr-on-gh
Copy link

rr-on-gh commented Aug 1, 2016

+1 for @raztus and @cyates81
It appears that the step in @raztus's reply is needed even if you are connecting to a remote DB.

@oursonvie
Copy link

Sorry I have to bother you guys, but I've been trial and error on the subject for days now.
There is my problem, I've followed the installation guide for mac on "https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instosx" but every time I try the example JS i got "ORA-21561: OID generation failed"
I also tried on ubuntu 14.04 which is working fine, even on a MacBook air.

Now I have been deleting and reinstalling oracle instant client, i tried basic and lite trying to get oracledb work, but no luck

@cjbj
Copy link

cjbj commented Sep 6, 2016

You are using node-oracledb which is not this repo. It is https://github.com/oracle/node-oracledb

I haven't seen this on OS X but the general Linux solution is given above.

@oursonvie
Copy link

Sorry about that, I've been using ip address directly
However the host fix worked, problem solved thanks

@GeraldoMilagre
Copy link

Hy guys, this issue can also be cause by wrong permissions on /etc/hosts file. If it is not readable for oracle uid the errors will show up.

Make sure your /etc/hosts is readable by everybody:

ls -l /etc/hosts
-rw-r--r-- 1 root system 7446 Mar 28 23:03 /etc/hosts

@cyarbrough22
Copy link

I've been working on this issue all day. This finally worked for me. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests