After we migrated our Oracle 10g database, the Performance Overview Charts plugin is not loading.
The name of the database stayed the same but the port number changed from 1521 to 1575. It seems that the charts plugin is still using the old port to connect. Our tnsnames.ora file has the correct connection info with the correct port and the VirtualCenter is running fine after the move.
Any help would be appreciated.
Thanks,
Chris
from my stats.log:
com.vmware.vim.stats.webui.action.ViClientRequestAction : Request: https://127.0.0.1:1919/statsreport/vicr.do ? &locale=en_US&moref=VirtualMachine%3Avm-39045&sessionId=340B6A78-CAAB-4A2F-BCB9-6CFE884EE28B&serviceUrl=https%3A%2F%2Fvcserver%2Fsdk
com.vmware.vim.stats.webui.startup.StatsReportInitializer : Start STATs report initialization.
com.vmware.vim.stats.webui.startup.VcDataSourceInitializer : Start VC DataSource configuration.
com.vmware.vim.stats.webui.util.RegistryReader : Invalid result received when quering WinReg:
com.vmware.vim.stats.webui.util.RegistryReader : - registry path : '"HKLM\Software\ODBC\ODBC.INI\VPX" /v Database'
com.vmware.vim.stats.webui.util.RegistryReader : - registry result: '
'
com.vmware.vim.stats.webui.util.VcDbConnectionInfo : Installed over Oracle
com.vmware.vim.stats.webui.util.VcDbConnectionInfo : DSN Driver Path: D:\oracle\product\10.2.0\client_1\BIN\SQORA32.DLL
com.vmware.vim.stats.webui.util.VcDbConnectionInfo : VC DB connection initialized from WinRegistry with parameters: DbUrl = jdbc:oracle:thin:@oracleserver; DbDriver = oracle.jdbc.driver.OracleDriver; DbUser = dbuser
com.vmware.vim.stats.webui.util.VcDbConnectionInfo : oracle.net.tns_admin: D:\oracle\product\10.2.0\client_1\NETWORK\ADMIN
com.vmware.vim.stats.webui.util.VcDbConnectionInfo : oracle.net.tns_admin: d:\oracle\product\10.2.0\client_1\NETWORK\ADMIN
com.vmware.vim.stats.webui.action.ViClientRequestAction : Request: https://127.0.0.1:1919/statsreport/vicr.do ? &locale=en_US&moref=VirtualMachine%3Avm-39045&sessionId=340B6A78-CAAB-4A2F-BCB9-6CFE884EE28B&serviceUrl=https%3A%2F%2Fvcserver%2Fsdk
com.vmware.vim.stats.webui.startup.StatsApplicationLauncher : Task execution produced an error. Re-initialization attempt #2523 will startup after 60 seconds...
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: com.vmware.vim.stats.webui.StatsReportException: Unable to open VC DataSource.
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:205)
at java.util.concurrent.FutureTask.get(FutureTask.java:80)
at com.vmware.vim.stats.webui.startup.StatsApplicationLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalStateException: com.vmware.vim.stats.webui.StatsReportException: Unable to open VC DataSource.
at com.vmware.vim.stats.webui.startup.StatsApplicationLauncher$1$1.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:65)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:168)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
... 1 more
Caused by: com.vmware.vim.stats.webui.StatsReportException: Unable to open VC DataSource.
at com.vmware.vim.stats.webui.startup.VcDataSourceInitializer.init(Unknown Source)
at com.vmware.vim.stats.webui.startup.StatsReportInitializer.createInitializers(Unknown Source)
at com.vmware.vim.stats.webui.startup.StatsReportInitializer.init(Unknown Source)
... 9 more
Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at com.vmware.vim.stats.webui.startup.VcDataSourceInitializer.openVcDataSource(Unknown Source)
... 12 more
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
... 14 more
Have you check the registry entry mentioned in the first error?:
ERROR com.vmware.vim.stats.webui.util.RegistryReader : - registry path : '"HKLM\Software\ODBC\ODBC.INI\VPX" /v
What's the value of this registry key?
The key does not exist, I thought that would only be there if it was a MSSQL database and since it is an Oracle DB it skips to opening an Oracle connection when that fails.
The registry path error is caused by the fact that the "Database" string value is missing. It doesn't exist for Oracle database configs, but the system still checks for it. If you manually create a string value named "Database", type "REG_SZ" and set the value to the name of the database, the registry path error goes away, but there is no change in functionality.
The error surrounds the DBUrl that is being built:
17 Sep 09, 10:55:50 INFO com.vmware.vim.stats.webui.util.VcDbConnectionInfo : VC DB connection initialized from WinRegistry with parameters: DbUrl = jdbc:oracle:thin:@oracleserver; DbDriver = oracle.jdbc.driver.OracleDriver; DbUser = dbuser
Because there is no port defined, the default port is assumed. Basically we need the DbUrl to look something like "DbUrl = jdbc.oracle.thin:@oracleserver:1575" using the original port change info given above.
I found this info burried in the content.xml file located at \Program Files\VMware\Infrastructure\tomcat\webapps\statsreport\META-INF\.
=== Oracle server ===
- Oracle JDBC driver binary (<specific>.jar file) MUST be located in Tomcat/lib dir
Default driver: oracle.jdbc.driver.OracleDriver
2. JDBC URL connection string format: jdbc:oracle:thin:@<host>:<port>:<SID>
After some further research, I found the file VcDbOracleSQLMapConfig.xml at \Program Files\VMware\Infrastructure\tomcat\webapps\sms\smService\com\vmware\vim\sms\data\xml\ that contains what looks like might be the function for connecting to the Oracle Database, but it looks like populates variables. I didn't have any luck hardcoding the port number into the URL. I'm not even sure it's the one being called at this point anyway. Just looking for a solution to the same problem.
It looks like VMware thought I was onto something and created KB 1013877 .
I tried it, but it still didn't work. Even after rebooting the vCenter server, the error log shows up exactly the same. It looks like the content.xml referenced in the KB isn't being used for statsreports.
I'll keep digging.
The KB says to modify the content.xml file located in C:\Program Files\VMware\Infrastructure\tomcat\webapps\statsreport\META-INF.
After making the change, the stats.log file showed the exact same errors, but did not show the port number for the Oracle DB that I had added.
After doing some more searching I found statsreport.xml in C:\Program Files\VMware\Infrastructure\tomcat\conf\Catalina\localhost. It contains the same info as content.xml so I added the same three lines referenced in the KB. The stats log shows the new URL including the port, but the connection is still failing with the exact same errors. I left the additions in content.xml just in case the log file was actually reporting from two different areas. Still no luck.
I'm having the same issue. Oracle 10g and the error is such that it's not resolving the database within the plugin.
Did you make any further progress? I've tried the same items as you to no avail.
Let me know if you did fix it.
Thanks!
Had the same problem, this connection string solved it.
url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=your database host)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=your database host)(PORT=1521))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=your service name adress)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=180)(DELAY=5))))"
I would have to see the error in the vSphere client. Can you post? Is it just failing on the performance overview section? I had this behavior and it was due to the Windows firewall blocking communication between Tomcat and the SQL server. For us, this behavior took place with a 2008, 64bit, linked vCenter infrastructure.