• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1356
  • Last Modified:

Trouble installing serMyAdmin on CentOS 5.2

I've installed Tomcat, jre1.6.0, and serMyAdmin
I can get to the Tomcat default page ok.
But when I try to do www.myserver.com:8080/serMyAdmin, I get an error:
   "The requested resource () is not available"

I looked in /var/log/tomcat5/ but there are no errors there.

Does anybody know what I'm doing wrong, OR someplace to look for a more meaningful error?

Thanks!
0
midstar
Asked:
midstar
  • 11
  • 10
1 Solution
 
objectsCommented:
where did u install serMyAdmin?

0
 
midstarAuthor Commented:
Well, I used the included install.sh script, which installed it in /usr/local/apache-tomcat-6.0.16/webapps.

Unfortunately, I read somewhere that I had to install Tomcat before serMyAdmin, so I did "yum install tomcat". This installed Tomcat in /var/lib/tomcat5/.

So I copied the serMyAdmin files from the tomcat 5 directory to the tomcat 6 directory.

I've tried running serMyAdmin from both Tomcat directories, each time taking care to make sure only that one copy of Tomcat is running.  In both I can get to the default tomcat page, but in both I get annoyingly undescriptive error messages when I try to run serMyAdmin.

The error message for tomcat5:  The requested resource (/serMyAdmin/) is not available.

The error message for tomcat6: The requested resource () is not available

I don't care which one I get running. I'd appreciate if someone could guess which one is closer to working, so I can concentrate on that one.

Thanks.
0
 
midstarAuthor Commented:
Hey, I've found how to turn on debugging!!!
I pasted the error here;  can anybody please tell me what this means?


Feb 22, 2009 12:39:28 AM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'serMyAdmin-development-0.1' = [/usr/local/apache-tomcat-6.0.16/webapps/serMyAdmin/]
Feb 22, 2009 12:39:29 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from [/usr/local/apache-tomcat-6.0.16/webapps/serMyAdmin/WEB-INF/classes/log4j.properties]
Feb 22, 2009 12:39:29 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Feb 22, 2009 12:39:37 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
	at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1114)
	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1212)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at java.security.AccessController.doPrivileged(Native Method)
	... 12 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at java.security.AccessController.doPrivileged(Native Method)
	... 13 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at java.security.AccessController.doPrivileged(Native Method)
	... 14 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at java.security.AccessController.doPrivileged(Native Method)
	... 15 more
Caused by: org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	... 16 more
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	... 16 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2103)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	... 16 more
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2026)
	... 23 more
Feb 22, 2009 12:39:37 AM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
	at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1114)
	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1212)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at java.security.AccessController.doPrivileged(Native Method)
	... 12 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at java.security.AccessController.doPrivileged(Native Method)
	... 13 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at java.security.AccessController.doPrivileged(Native Method)
	... 14 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at java.security.AccessController.doPrivileged(Native Method)
	... 15 more
Caused by: org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	... 16 more
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	... 16 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2103)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	... 16 more
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2026)
	... 23 more

Open in new window

0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
objectsCommented:
sounds like you are running tomcat with a security manager, you need to disable it

whats the following return:

ps -ef|grep tomcat

0
 
midstarAuthor Commented:
Thanks for the reply objects.
Here's the output from "ps -ef|grep tomcat"

# ps -ef|grep tomcat
root      9025     1  0 00:51 ?        00:00:41 /usr/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/local/apache-tomcat-6.0.16/conf/logging.properties -Djava.endorsed.dirs=/usr/local/apache-tomcat-6.0.16/endorsed -classpath :/usr/local/apache-tomcat-6.0.16/bin/bootstrap.jar -Dcatalina.base=/usr/local/apache-tomcat-6.0.16 -Dcatalina.home=/usr/local/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/local/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
0
 
objectsCommented:
its failing to get a connection to the database, looks like the database isn't running/listening on the box it is trying to access


0
 
objectsCommented:
its a mysql database its looking for
0
 
midstarAuthor Commented:
I have MySQL installed and running. I have the database and tables set-up properly. I put the mysql-connector-java-5.1.5-bin.jar file in place. So I'm not sure why it would be having trouble connecting.  I've attached a copy of my context.xml file.  Any ideas what the problem could be?




context.xml
<?xml version="1.0" encoding="UTF-8"?><Context path="/serMyAdmin">  <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/openser_MySQL" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/sermyadmin" username="root" password="secret"/></Context>

Open in new window

0
 
objectsCommented:
what port is mysql listening on?

can you post youre my.cnf

0
 
objectsCommented:
should be using 3306

0
 
midstarAuthor Commented:
Yes, it's using port 3306.  I can telnet to it from my local box.

/etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
 
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Open in new window

0
 
objectsCommented:
> Yes, it's using port 3306.  I can telnet to it from my local box.

from the box running mysql what do you get when u telnet to 3306

telnet localhost 3306

then check if you can connect to mysql with user/pass from context

mysql -uroot -psecret sermyadmin

0
 
midstarAuthor Commented:
telnet localhost 3306 gives me an error:  "telnet: connect to address ::1: Connection refused"
But telnet 127.0.0.1 3306 works fine.
And mysql -uroot -psecret sermyadmin works fine as well.
0
 
midstarAuthor Commented:
Oh, I should mention that MySQL is installed on the same box as Tomcat and serMyAdmin - everything is on the same server.
0
 
objectsCommented:
changing the context to 127.0.0.1 should fix it

<?xml version="1.0" encoding="UTF-8"?>  

0
 
midstarAuthor Commented:
Unfortunately, this did not fix the problem. The errors in the log are the same.
0
 
objectsCommented:
what file did u change?

0
 
midstarAuthor Commented:
I changed the file tomcat6/conf/context.xml
0
 
objectsCommented:
whats in /conf/Catalina/localhost

0
 
midstarAuthor Commented:
Eeek. I don't have one.  My conf directory doesn't have any subdirectories; it only has the following files:

catalina.policy  
catalina.properties
context.xml  
logging.properties  
server.xml  
tomcat-users.xml  
web.xml
0
 
midstarAuthor Commented:
Ok. I give up. Thanks for your help Objects.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 11
  • 10
Tackle projects and never again get stuck behind a technical roadblock.
Join Now