VMware Cloud Community
chorgeas
Hot Shot
Hot Shot

During installation of vCloud director could not connect to Linux based database

I have installed Oracle 11g R2 64-bit on Cent OS 64 bit OS. After installation of Oracle, I follow the steps which are require for connecting VMware vCloud Director 1.0 to Oracle database (like user creation, system privileges, Tablespace creation CLOUD_DATA etc ..).

 

Following are the steps for the same.

<snip>

1. create user ashish identified by vmware123;

2. grant CONNECT,RESOURCE,CREATE VIEW, CREATE TRIGGER, CREATE TYPE, CREATE PROCEDURE, CREATE SEQUENCE, EXECUTE ANY PROCEDURE, CREATE MATERIALIZED VIEW to ashish;

3. select * from nls_database_parameters where parameter = 'NLS_NCHAR_CHARACTERSET';

4. show parameter sessions;

5. alter system set sessions=150 scope=spfile;

6. mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1/oradata/ [optional]

7. Create Tablespace CLOUD_DATA datafile '/u01/app/oracle/product/11.2.0/dbhome_1/oradata/cloud_data01.dbf' size 1000M autoextend on;

8. Create Tablespace CLOUD_INDX datafile '/u01/app/oracle/product/11.2.0/dbhome_1/oradata/cloud_indx01.dbf' size 500M autoextend on;

9. Create user admin identified by vmware123 default tablespace CLOUD_DATA;

</snip>

The above steps are for windows Oracle but I thought this will applicable for Linux also. So please correct me if I am wrong. I am not good in Oracle.

Ref: http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1025768&sl... 0 181974369

After that I started installing VMware vCloud Director in CentOS 5.5 64-bit OS. So after giving database credentials I am getting error message as could not connect to database.

I suspect there might be firewall issue so I disabled the firewall. [/etc/init.d/iptables stop]

FYI:

1. My both VM's vCloud director and Oracle database are created by VMware Studio 2.5.

2. Oracle is installed by GUI based method not by silent installation method.

I am not able to find out the problem. Could you please guide me?

Please let me know if you require more information.

0 Kudos
6 Replies
admin
Immortal
Immortal

You should see if you can connect to the database using SqlPlus http://download.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25108/xedev_sqlplus.htm.

chorgeas
Hot Shot
Hot Shot

Yes I am able to connect sqlplus / as sysdba

0 Kudos
admin
Immortal
Immortal

I meant you should try connecting with the credentials you created for vcloud.

0 Kudos
JoePeppard
Contributor
Contributor

What does your vcloud-container-debug.log say (mine was located in /opt/vmware/cloud-director/logs).

I was getting this error:

2011-05-27 15:05:19,591 | DEBUG    | main                      | PooledConnection               | Unable to connect to database. |
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region  not found

I think I resolved this by setting up my cloud director box and oracle box to be on the same regions, but I also enabled the NTP server, so that could have fixed it as well. Not being a linux guru by any means, I restarted the boxes after making these changes, but there's probably just a single service that needed to be restarted.

0 Kudos
chorgeas
Hot Shot
Hot Shot

Hi JoePeppard,

Yes I am also facing the same issue. But both of my VMs are in same timezone.

<snip>

2011-06-01 18:13:29,037 | ERROR    | main                      | ConfigAgent                    | Could not connect to database: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
|
2011-06-01 18:13:29,038 | INFO     | main                      | ConfigAgent                    | Too many attempts to connect to the database.
These attempts failed because one of the values provided, such
as the hostname of the database, or perhaps the username or password,
may be incorrect. Please verify the values and try again later. |

</snip>

Now the error message is changed in debug log after restarted the NTP service and rebooted the VMs.

<snip>

2011-06-01 18:41:47,477 | ERROR    | main                      | ConfigAgent                    | Could not connect to database: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

</snip>

But I am able to telnet the database server using 1521 port. But yes there is one problem Listener is not starting..

<snip>

[oracle@isv-validation-dhcp229 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 01-JUN-2011 18:45:17

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                01-JUN-2011 18:39:19
Uptime                    0 days 0 hr. 5 min. 58 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/isv-validation-dhcp229/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=isv-validation-dhcp229.ashish.com)(PORT=1521)))
The listener supports no services
The command completed successfully

</snip>

0 Kudos
chorgeas
Hot Shot
Hot Shot

> I meant you should try connecting with the credentials you created for vcloud.

That is using by ashish or admin user? I guess it should be ashish user, correct?

Please have a look the following thread. This might be the reason.

http://communities.vmware.com/message/1762216#1762216

0 Kudos