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
Edit /etc/hosts
# nano /etc/hosts
# /etc/init.d/network restart
Thanks. Worked for me after hours of searching
ReplyDeleteWelcome
ReplyDeleteI 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
ReplyDeleteI 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.
try to change hosts and network to another name, not localhost, restart and connect back
ReplyDeleteThanks 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?
ReplyDeleteSo you mean do I want to remove the localhost and add the oracle server name ?
ReplyDeleteOkay, finally Ive found a way, my webserver hostname needs to be added in /etc/hosts like this
ReplyDelete127.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!
Worked!!
ReplyDeleteThank you!
mantap mamank
ReplyDelete