Monday, 11 June 2012

Warning: oci_connect() [function.oci-connect]: ORA-24408: could not generate unique server group name



Warning
: oci_connect() [function.oci-connect]: ORA-24408: could not generate unique server group name


Edit 

# nano /etc/sysconfig/network
And
# nano /etc/hosts
With the same HOSTNAME

Edit /etc/sysconfig/network

# nano /etc/sysconfig/network
1
2
3
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=zacker

Edit /etc/hosts
# nano /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               zacker
::1             localhost6.localdomain6 localhost6
# /etc/init.d/network restart

9 comments:

  1. Thanks. Worked for me after hours of searching

    ReplyDelete
  2. I followed the above steps, but facing with same issue ORA-24408: could not generate unique server group name, below is my oracle connection test code

    I need to connect to external oracle database:

    if($c = oci_connect('orcl_username', 'orcl_pswd', '//orcl.server.domain.name:1521/servicename')){
    echo "Successfully connected to Oracle.";
    oci_close($c);
    } else {
    $err = oci_error();
    $error = $err['message']."\n\n";
    print $error;
    }


    /etc/sysconfig/network (in my server not oracle server)

    NETWORKING=yes
    NETWORKING_IPV6=no
    HOSTNAME=localhost

    /etc/hosts (in my server not oracle server)

    127.0.0.1 localhost

    Do I need to have the same configuration in oracle server as well? Please help me out.

    ReplyDelete
  3. try to change hosts and network to another name, not localhost, restart and connect back

    ReplyDelete
  4. Thanks for the reply, could you be more elaborate , do I need to change hostname to the oracle server name? or can this be any name and do I need to specify the ip?

    ReplyDelete
  5. So you mean do I want to remove the localhost and add the oracle server name ?

    ReplyDelete
  6. Okay, finally Ive found a way, my webserver hostname needs to be added in /etc/hosts like this
    127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 [hostname]
    orcl db ip orcl db hostname

    and in /etc/sysconfig/network

    NETWORKING=yes
    HOSTNAME=orcl db hostname

    cheers!

    ReplyDelete