Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORA-24408: could not generate unique server group name

Tags:

php

oracle

system:

Linux web 2.6.27.21-0.1-pae #1 SMP 2009-03-31 14:50:44 +0200 i686 i686 i386 GNU/Linux

PHP Version 5.3.8
Apache Version  Apache/2.2.21 (Linux/SUSE)
OCI8 Support    enabled
Version     1.4.7
Revision    $Revision: 321634 $
Active Persistent Connections   0
Active Connections  0
Oracle Run-time Client Library Version  11.2.0.3.0
Oracle Instant Client Version   11.2

when calling oci_connect - receiv

ORA-24408: could not generate unique server group name

can`t understand what the kind error is this and howto fix it.

like image 430
Subdigger Avatar asked May 07 '12 14:05

Subdigger


3 Answers

You can downgrade to 10g if you want (it evidently doesn't care about this) but that's not necessary...

The 11g instant client requires a /etc/hosts file entry for your hostname pointing to 127.0.0.1. The normal "localhost" entry is not sufficient on it's own.

Assuming your host name is foomachine, there are two places you'll need to check:

In /etc/hosts, make sure you have any entry like - add it if it's not there:

127.0.0.1   foomachine

And also make sure the /etc/sysconfig/network file also has HOSTNAME=foomachine

That should do the trick.

like image 103
Camden S. Avatar answered Nov 08 '22 02:11

Camden S.


Kind of an old question, but I just stumbled on it after upgrading my Mac to Sierra. Until then I hadn't had the problem.

The trick is definitely to add your hostname to /etc/hosts, but you have to have the right hostname. That's easy on linux, it's in /etc/sysconfig/network. On Mac find it in System Preferences > Sharing. Under where it says Computer name will be something like computer-name.local. In /etc/hosts put

   127.0.0.1 computer-name.local

Replacing computer-name with your computer name of course :). It needs this regardless of whether the database is a remote one or a local one.

I had plenty of other aliases for 127.0.0.1 but not that one. As soon as I added that one my apps started working again.

like image 4
Rosina Bignall Avatar answered Nov 08 '22 00:11

Rosina Bignall


In my situation, the OracleDB server I was trying to connect to was a remote one, not a local one, so the above 127.0.0.1 localhost trick didn't work.

Previously, I had temporarily fixed a DNS problem by adding an entry for my Oracle DB server into my hosts file. This IP in my hosts file was still correct - it still pointed to the correct OracleDB server IP.

By removing the entry from my hosts file, the problem went away.

I have no idea why this is a problem for OracleDB, or why the error message is so obtuse, but I hope this helps someone else.

(This was using InstantClient v12.1.0.2 on MacOS v10.11.5)

like image 1
StampyCode Avatar answered Nov 08 '22 01:11

StampyCode