Re: Cyclos Webapp Trouble (404)

2010-01-18 Thread David Smith

 Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 
 Communications link failure
To me this looks like it's outside of tomcat.  Check that mysql is up,
listening on tcp port 3306 (the standard mysql port) and there aren't
any firewalls causing problems between tomcat and mysql.  If you can on
the Ubuntu box, su to the tomcat user acct and try connecting with mysql
using the client program:  mysql -P 3306 -h [mysql server hostname] -p
-u [username for cyclos].  Replace the [...] in the command with real
data and see what happens.

--David

Rick Bragg wrote:
 On Sun, 2010-01-17 at 21:55 -0600, Caldarale, Charles R wrote:
   
 From: Rick Bragg [mailto:li...@gmnet.net]
 Subject: Cyclos Webapp Trouble (404)

 After following these steps, and restarting tomcat6 I get a 404 error,
 Also, the database remains empty.
   
 As stated before, using a real Tomcat download from tomcat.apache.org, 
 installing the most recent GA version of MySQL (5.1.42), and the current 
 cyclos (3.5.5), it all works fine.  The problem you are now having appears 
 to be due to the use of a security manager; either turn that off, or update 
 the appropriate properties file to include all the necessary entries to 
 allow cyclos to work.  I have no idea where Ubuntu places (or even names) 
 the security properties file, and certainly no idea what needs to be added 
 to make cyclos work with one.

 Again, I would strongly recommend that you uninstall the Ubuntu 3rd-party 
 version, and put in a real Tomcat, so we can all be looking at a common 
 setup.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.

 



 Hi, 

 Thanks Chuck, One could argue to not use a package manager at all,
 however I would rather use the package manager for this to make things
 easier down the road.  I did manage to get a bit further, and you are
 right about the security manager.

 I got rid of the errors in the previous post by setting privileges for
 the classes and libs (see below), but now I'm stuck on mysql

 Here is a brief snip from my error log

 Jan 18, 2010 2:05:07 AM org.apache.catalina.core.StandardContext listenerStart
 SEVERE: Exception sending context initialized event to listener instance of 
 class org.springframework.web.context.ContextLoaderListener
 org.springframework.beans.factory.BeanCreationException: Error creating bean 
 with name 'sessionFactory' defined in class path resource 
 [nl/strohalm/cyclos/spring/persistence.xml]: Invocation of init method 
 failed; nested exception is java.lang.RuntimeException: Error connecting to 
 database at 
 jdbc:mysql://localhost/cyclos3?useUnicode=truecharacterEncoding=utf8
 Caused by: java.lang.RuntimeException: Error connecting to database at 
 jdbc:mysql://localhost/cyclos3?useUnicode=truecharacterEncoding=utf8
   at 
 nl.strohalm.cyclos.setup.DataBaseConfiguration.validateConnection(DataBaseConfiguration.java:342)
   at 
 nl.strohalm.cyclos.setup.DataBaseConfiguration.run(DataBaseConfiguration.java:107)
 ...
 Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 
 Communications link failure


 I have the following policies in:
 vi /etc/tomcat6/policy.d/50local.policy

 // The permissions granted to the context WEB-INF/classes and lib directories
  grant codeBase file:${catalina.base}/webapps/cyclos/WEB-INF/classes/- {
   permission java.security.AllPermission;
  };
  grant codeBase file:${catalina.base}/webapps/cyclos/WEB-INF/lib/- {
   permission java.security.AllPermission;
  };

 // The permission granted to your JDBC driver
  grant codeBase 
 jar:file:${catalina.base}/webapps/cyclos/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar!/-
  {
   permission java.net.SocketPermission localhost:3306, connect;
  };


 I think maybe my JDBC permissions are not quite right, or there is something 
 with the driver, but I'm not sure...

 Anybody have any ideas?

 Thanks again!
 Rick
   


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Cyclos Webapp Trouble (404)

2010-01-18 Thread Caldarale, Charles R
 From: Rick Bragg [mailto:li...@gmnet.net]
 Subject: RE: Cyclos Webapp Trouble (404)
 
 Error connecting to database at jdbc:mysql://localhost/cyclos3

Besides verifying that MySQL is actually running as David suggested, note that 
there's a mismatch in the cyclos installation instructions compared to what's 
in the cyclos.properties file.  The instructions say to create a database named 
cyclos, but the properties file refers to one named cyclos3 in a couple of 
places - as does your error message.  You need to resolve the discrepancy.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.




Re: Cyclos Webapp Trouble (404)

2010-01-18 Thread Rick Bragg
On Mon, 2010-01-18 at 07:39 -0500, David Smith wrote:
 
  Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 
  Communications link failure
 To me this looks like it's outside of tomcat.  Check that mysql is up,
 listening on tcp port 3306 (the standard mysql port) and there aren't
 any firewalls causing problems between tomcat and mysql.  If you can on
 the Ubuntu box, su to the tomcat user acct and try connecting with mysql
 using the client program:  mysql -P 3306 -h [mysql server hostname] -p
 -u [username for cyclos].  Replace the [...] in the command with real
 data and see what happens.
 
 --David
 

OK, It is NOT security related.  I set TOMCAT6_SECURITY=no
in /etc/default/tomcat6.

I noticed that the user tomcat6 has no shell in /etc/passwd
  tomcat6:x:119:126::/usr/share/tomcat6:/bin/false

Should I give this user the ability to shell (/bin/bash)? 

Rick





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cyclos Webapp Trouble (404)

2010-01-18 Thread David Smith
Rick Bragg wrote:
 On Mon, 2010-01-18 at 07:39 -0500, David Smith wrote:
   
 Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 
 Communications link failure
   
 To me this looks like it's outside of tomcat.  Check that mysql is up,
 listening on tcp port 3306 (the standard mysql port) and there aren't
 any firewalls causing problems between tomcat and mysql.  If you can on
 the Ubuntu box, su to the tomcat user acct and try connecting with mysql
 using the client program:  mysql -P 3306 -h [mysql server hostname] -p
 -u [username for cyclos].  Replace the [...] in the command with real
 data and see what happens.

 --David

 

 OK, It is NOT security related.  I set TOMCAT6_SECURITY=no
 in /etc/default/tomcat6.

 I noticed that the user tomcat6 has no shell in /etc/passwd
   tomcat6:x:119:126::/usr/share/tomcat6:/bin/false

 Should I give this user the ability to shell (/bin/bash)? 

 Rick


   
No... it doesn't need one.  There are a number of user accounts in any
linux system that do not have shells.  They are just there for access
control purposes limiting what different daemons and processes can do. 
Make sure tomcat can reach the mysql server and that should go a long
ways towards fixing the issue.  Also what Chuck said about the
discrepancy in docs vs. config although I think that's a separate
issue.  Communications link failure is a network issue.


--David

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Cyclos Webapp Trouble (404)

2010-01-18 Thread Rick Bragg
On Mon, 2010-01-18 at 07:42 -0600, Caldarale, Charles R wrote:
  From: Rick Bragg [mailto:li...@gmnet.net]
  Subject: RE: Cyclos Webapp Trouble (404)
  
  Error connecting to database at jdbc:mysql://localhost/cyclos3
 
 Besides verifying that MySQL is actually running as David suggested, note 
 that there's a mismatch in the cyclos installation instructions compared to 
 what's in the cyclos.properties file.  The instructions say to create a 
 database named cyclos, but the properties file refers to one named 
 cyclos3 in a couple of places - as does your error message.  You need to 
 resolve the discrepancy.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers

Thanks Chuck,

Yes I notices that as well, I forgot to post my cyclos.properies Here is
the mysql section...

### MySQL
hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
hibernate.connection.driver_class = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://127.0.0.1:3306/cyclos
hibernate.connection.username = cyclos
hibernate.connection.password = test1234
### Connection provider properties
hibernate.connection.provider_class = 
org.hibernate.connection.C3P0ConnectionProvider
hibernate.c3p0.minPoolSize = 1
hibernate.c3p0.maxPoolSize = 100
hibernate.c3p0.acquireIncrement = 1
hibernate.c3p0.maxIdleTime = 21600
hibernate.c3p0.testConnectionOnCheckout = true
hibernate.c3p0.preferredTestQuery = select 1
hibernate.c3p0.acquireRetryAttempts = 5
hibernate.c3p0.numHelperThreads = 3

my database name is cyclos, MySQL is also in production so and is
accessed by other php and perl libs on the local host.  I have also
tried some variations on the connection.url such as:

hibernate.connection.url = jdbc:mysql://localhost:3306/cyclos
and
hibernate.connection.url = jdbc:mysql://localhost/cyclos

In MySQL, I have the user set up privileges for the user to access via
localhost AND 127.0.0.1








-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Cyclos Webapp Trouble (404)

2010-01-18 Thread Caldarale, Charles R
 From: Rick Bragg [mailto:li...@gmnet.net]
 Subject: RE: Cyclos Webapp Trouble (404)
 
 Yes I notices that as well, I forgot to post my cyclos.properies Here
 is the mysql section...
 
 hibernate.connection.url = jdbc:mysql://127.0.0.1:3306/cyclos

The above doesn't jibe with the error message displayed at runtime:

jdbc:mysql://localhost/cyclos3?useUnicode=truecharacterEncoding=utf8

Note the use of localhost instead of 127.0.0.1, the lack of explicit port 
number, and the database name.

What you posted is not what you're actually running with.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



RE: Cyclos Webapp Trouble (404)

2010-01-18 Thread Rick Bragg
On Mon, 2010-01-18 at 08:23 -0600, Caldarale, Charles R wrote:
  From: Rick Bragg [mailto:li...@gmnet.net]
  Subject: RE: Cyclos Webapp Trouble (404)
  
  Yes I notices that as well, I forgot to post my cyclos.properies Here
  is the mysql section...
  
  hibernate.connection.url = jdbc:mysql://127.0.0.1:3306/cyclos
 
 The above doesn't jibe with the error message displayed at runtime:
 
 jdbc:mysql://localhost/cyclos3?useUnicode=truecharacterEncoding=utf8
 
 Note the use of localhost instead of 127.0.0.1, the lack of explicit port 
 number, and the database name.
 
 What you posted is not what you're actually running with.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.


Sorry, that must have been one of my variations...

To be clear, here are the files as of now.

cyclos.properties (MySQL section)
### MySQL
hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
hibernate.connection.driver_class = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://127.0.0.1:3306/cyclos
hibernate.connection.username = cyclos
hibernate.connection.password = 
### Connection provider properties
hibernate.connection.provider_class = 
org.hibernate.connection.C3P0ConnectionProvider
hibernate.c3p0.minPoolSize = 1
hibernate.c3p0.maxPoolSize = 100
hibernate.c3p0.acquireIncrement = 1
hibernate.c3p0.maxIdleTime = 21600
hibernate.c3p0.testConnectionOnCheckout = true
hibernate.c3p0.preferredTestQuery = select 1
hibernate.c3p0.acquireRetryAttempts = 5
hibernate.c3p0.numHelperThreads = 3


and error log:

Jan 18, 2010 8:22:42 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Jan 18, 2010 8:22:42 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Jan 18, 2010 8:22:50 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jan 18, 2010 8:22:50 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jan 18, 2010 8:22:51 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Jan 18, 2010 8:22:56 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of 
class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'sessionFactory' defined in class path resource 
[nl/strohalm/cyclos/spring/persistence.xml]: Invocation of init method failed; 
nested exception is java.lang.RuntimeException: Error connecting to database at 
jdbc:mysql://127.0.0.1:3306/cyclos?useUnicode=truecharacterEncoding=utf8
Caused by: java.lang.RuntimeException: Error connecting to database at 
jdbc:mysql://127.0.0.1:3306/cyclos?useUnicode=truecharacterEncoding=utf8
   at 
nl.strohalm.cyclos.setup.DataBaseConfiguration.validateConnection(DataBaseConfiguration.java:342)
   at 
nl.strohalm.cyclos.setup.DataBaseConfiguration.run(DataBaseConfiguration.java:107)
   at 
nl.strohalm.cyclos.spring.CustomSessionFactoryBean.newSessionFactory(CustomSessionFactoryBean.java:42)
   at 
org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
...
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 
Communications link failure
...
Last packet sent to the server was 0 ms ago.
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
   at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
   at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:335)
   at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2043)
   ... 56 more
Caused by: java.net.ConnectException: Connection refused
   at java.net.PlainSocketImpl.socketConnect(Native Method)
   at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
   at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
   at java.net.Socket.connect(Socket.java:525)
   at java.net.Socket.connect(Socket.java:475)
   at java.net.Socket.init(Socket.java:372)
   at java.net.Socket.init(Socket.java:215)
   at 
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
   at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:284)
   ... 57

RE: Cyclos Webapp Trouble (404)

2010-01-18 Thread Caldarale, Charles R
 From: Rick Bragg [mailto:li...@gmnet.net]
 Subject: RE: Cyclos Webapp Trouble (404)
 
 Error connecting to database at
 jdbc:mysql://127.0.0.1:3306/cyclos

You've still got some inconsistencies in your posts.  You've stated that you're 
installing Tomcat+cyclos on a brand new machine, yet you also stated that this 
MySQL instance is in production use for other purposes.  Are you sure MySQL is 
running on the *same* system that you have Tomcat+cyclos on?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.




Re: Cyclos Webapp Trouble (404)

2010-01-18 Thread David Smith
Rick Bragg wrote:
 On Mon, 2010-01-18 at 08:23 -0600, Caldarale, Charles R wrote:
   
 From: Rick Bragg [mailto:li...@gmnet.net]
 Subject: RE: Cyclos Webapp Trouble (404)

 Yes I notices that as well, I forgot to post my cyclos.properies Here
 is the mysql section...

 hibernate.connection.url = jdbc:mysql://127.0.0.1:3306/cyclos
   
 The above doesn't jibe with the error message displayed at runtime:

 jdbc:mysql://localhost/cyclos3?useUnicode=truecharacterEncoding=utf8

 Note the use of localhost instead of 127.0.0.1, the lack of explicit 
 port number, and the database name.

 What you posted is not what you're actually running with.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.
 


 Sorry, that must have been one of my variations...

 To be clear, here are the files as of now.

 cyclos.properties (MySQL section)
 ### MySQL
 hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
 hibernate.connection.driver_class = com.mysql.jdbc.Driver
 hibernate.connection.url = jdbc:mysql://127.0.0.1:3306/cyclos
 hibernate.connection.username = cyclos
 hibernate.connection.password = 
 ### Connection provider properties
 hibernate.connection.provider_class = 
 org.hibernate.connection.C3P0ConnectionProvider
 hibernate.c3p0.minPoolSize = 1
 hibernate.c3p0.maxPoolSize = 100
 hibernate.c3p0.acquireIncrement = 1
 hibernate.c3p0.maxIdleTime = 21600
 hibernate.c3p0.testConnectionOnCheckout = true
 hibernate.c3p0.preferredTestQuery = select 1
 hibernate.c3p0.acquireRetryAttempts = 5
 hibernate.c3p0.numHelperThreads = 3


 and error log:

 Jan 18, 2010 8:22:42 AM org.apache.catalina.core.ApplicationContext log
 INFO: SessionListener: contextDestroyed()
 Jan 18, 2010 8:22:42 AM org.apache.catalina.core.ApplicationContext log
 INFO: ContextListener: contextDestroyed()
 Jan 18, 2010 8:22:50 AM org.apache.catalina.core.ApplicationContext log
 INFO: ContextListener: contextInitialized()
 Jan 18, 2010 8:22:50 AM org.apache.catalina.core.ApplicationContext log
 INFO: SessionListener: contextInitialized()
 Jan 18, 2010 8:22:51 AM org.apache.catalina.core.ApplicationContext log
 INFO: Initializing Spring root WebApplicationContext
 Jan 18, 2010 8:22:56 AM org.apache.catalina.core.StandardContext listenerStart
 SEVERE: Exception sending context initialized event to listener instance of 
 class org.springframework.web.context.ContextLoaderListener
 org.springframework.beans.factory.BeanCreationException: Error creating bean 
 with name 'sessionFactory' defined in class path resource 
 [nl/strohalm/cyclos/spring/persistence.xml]: Invocation of init method 
 failed; nested exception is java.lang.RuntimeException: Error connecting to 
 database at 
 jdbc:mysql://127.0.0.1:3306/cyclos?useUnicode=truecharacterEncoding=utf8
 Caused by: java.lang.RuntimeException: Error connecting to database at 
 jdbc:mysql://127.0.0.1:3306/cyclos?useUnicode=truecharacterEncoding=utf8
at 
 nl.strohalm.cyclos.setup.DataBaseConfiguration.validateConnection(DataBaseConfiguration.java:342)
at 
 nl.strohalm.cyclos.setup.DataBaseConfiguration.run(DataBaseConfiguration.java:107)
at 
 nl.strohalm.cyclos.spring.CustomSessionFactoryBean.newSessionFactory(CustomSessionFactoryBean.java:42)
at 
 org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
 ...
 Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 
 Communications link failure
 ...
 Last packet sent to the server was 0 ms ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at 
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at 
 com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:335)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2043)
... 56 more
 Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at java.net.Socket.init(Socket.java:372)
at java.net.Socket.init(Socket.java:215

Re: Cyclos Webapp Trouble (404)

2010-01-18 Thread Rick Bragg
On Mon, 2010-01-18 at 09:43 -0500, David Smith wrote:
 Rick Bragg wrote:
  On Mon, 2010-01-18 at 08:23 -0600, Caldarale, Charles R wrote:

  From: Rick Bragg [mailto:li...@gmnet.net]
  Subject: RE: Cyclos Webapp Trouble (404)
 
  Yes I notices that as well, I forgot to post my cyclos.properies Here
  is the mysql section...
 
  hibernate.connection.url = jdbc:mysql://127.0.0.1:3306/cyclos

  The above doesn't jibe with the error message displayed at runtime:
 
  jdbc:mysql://localhost/cyclos3?useUnicode=truecharacterEncoding=utf8
 
  Note the use of localhost instead of 127.0.0.1, the lack of explicit 
  port number, and the database name.
 
  What you posted is not what you're actually running with.
 
   - Chuck
 
 
  THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
  MATERIAL and is thus for use only by the intended recipient. If you 
  received this in error, please contact the sender and delete the e-mail 
  and its attachments from all computers.
  
 
 
  Sorry, that must have been one of my variations...
 
  To be clear, here are the files as of now.
 
  cyclos.properties (MySQL section)
  ### MySQL
  hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
  hibernate.connection.driver_class = com.mysql.jdbc.Driver
  hibernate.connection.url = jdbc:mysql://127.0.0.1:3306/cyclos
  hibernate.connection.username = cyclos
  hibernate.connection.password = 
  ### Connection provider properties
  hibernate.connection.provider_class = 
  org.hibernate.connection.C3P0ConnectionProvider
  hibernate.c3p0.minPoolSize = 1
  hibernate.c3p0.maxPoolSize = 100
  hibernate.c3p0.acquireIncrement = 1
  hibernate.c3p0.maxIdleTime = 21600
  hibernate.c3p0.testConnectionOnCheckout = true
  hibernate.c3p0.preferredTestQuery = select 1
  hibernate.c3p0.acquireRetryAttempts = 5
  hibernate.c3p0.numHelperThreads = 3
 
 
  and error log:
 
  Jan 18, 2010 8:22:42 AM org.apache.catalina.core.ApplicationContext log
  INFO: SessionListener: contextDestroyed()
  Jan 18, 2010 8:22:42 AM org.apache.catalina.core.ApplicationContext log
  INFO: ContextListener: contextDestroyed()
  Jan 18, 2010 8:22:50 AM org.apache.catalina.core.ApplicationContext log
  INFO: ContextListener: contextInitialized()
  Jan 18, 2010 8:22:50 AM org.apache.catalina.core.ApplicationContext log
  INFO: SessionListener: contextInitialized()
  Jan 18, 2010 8:22:51 AM org.apache.catalina.core.ApplicationContext log
  INFO: Initializing Spring root WebApplicationContext
  Jan 18, 2010 8:22:56 AM org.apache.catalina.core.StandardContext 
  listenerStart
  SEVERE: Exception sending context initialized event to listener instance of 
  class org.springframework.web.context.ContextLoaderListener
  org.springframework.beans.factory.BeanCreationException: Error creating 
  bean with name 'sessionFactory' defined in class path resource 
  [nl/strohalm/cyclos/spring/persistence.xml]: Invocation of init method 
  failed; nested exception is java.lang.RuntimeException: Error connecting to 
  database at 
  jdbc:mysql://127.0.0.1:3306/cyclos?useUnicode=truecharacterEncoding=utf8
  Caused by: java.lang.RuntimeException: Error connecting to database at 
  jdbc:mysql://127.0.0.1:3306/cyclos?useUnicode=truecharacterEncoding=utf8
 at 
  nl.strohalm.cyclos.setup.DataBaseConfiguration.validateConnection(DataBaseConfiguration.java:342)
 at 
  nl.strohalm.cyclos.setup.DataBaseConfiguration.run(DataBaseConfiguration.java:107)
 at 
  nl.strohalm.cyclos.spring.CustomSessionFactoryBean.newSessionFactory(CustomSessionFactoryBean.java:42)
 at 
  org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
  ...
  Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 
  Communications link failure
  ...
  Last packet sent to the server was 0 ms ago.
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at 
  sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at 
  sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
 at 
  com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
 at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:335)
 at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2043)
 ... 56 more
  Caused by: java.net.ConnectException: Connection refused
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
 at java.net.Socket.connect(Socket.java:525

RE: Cyclos Webapp Trouble (404)

2010-01-18 Thread Caldarale, Charles R
 From: Rick Bragg [mailto:li...@gmnet.net]
 Subject: Re: Cyclos Webapp Trouble (404)
 
 Yes the above works perfect.  I can log into MySQL in exactly that way.
 I also double checked the password.

Just for grins, do a netstat -ano and verify that the MySQL pid really is 
listening on 127.0.0.1:3306 (or 0.0.0.0:3306) and not some other IP address.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



Re: Cyclos Webapp Trouble (404)

2010-01-18 Thread Markus Schönhaber
18.01.2010 15:57, Rick Bragg:

 On Mon, 2010-01-18 at 09:43 -0500, David Smith wrote:

 MySQL leave the tcp port disabled for security reasons.  I've never
 understood the decision, but it happens.  You can test w/ the mysql command:

 mysql -P 3306 -h localhost -u cyclos -p

 Yes the above works perfect.  I can log into MySQL in exactly that way.
 I also double checked the password.

And it still works, if you replace localhost with 127.0.0.1 (since
that's what you configured)? I. e.
mysql -P 3306 -h 127.0.0.1 -u cyclos -p

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Cyclos Webapp Trouble (404)

2010-01-18 Thread Rick Bragg
On Mon, 2010-01-18 at 09:02 -0600, Caldarale, Charles R wrote:
  From: Rick Bragg [mailto:li...@gmnet.net]
  Subject: Re: Cyclos Webapp Trouble (404)
  
  Yes the above works perfect.  I can log into MySQL in exactly that way.
  I also double checked the password.
 
 Just for grins, do a netstat -ano and verify that the MySQL pid really is 
 listening on 127.0.0.1:3306 (or 0.0.0.0:3306) and not some other IP address.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.
 

AHH, It is on one of my public IP's for some reason.  
I've got some db-admin to do.  I have to ask around to find out why this
was changed, and try everything out later.

If this works, I will have some community service work to do for sure!

Thanks!
Rick





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cyclos Webapp Trouble (404)

2010-01-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 1/18/2010 10:02 AM, Caldarale, Charles R wrote:
 From: Rick Bragg [mailto:li...@gmnet.net]
 Subject: Re: Cyclos Webapp Trouble (404)

 Yes the above works perfect.  I can log into MySQL in exactly that way.
 I also double checked the password.
 
 Just for grins, do a netstat -ano and verify that the MySQL pid
 really is listening on 127.0.0.1:3306 (or 0.0.0.0:3306) and not some
 other IP address.

+1

Depending on your version of MySQL (can't find what version you are
running in the old posts... so many posts!), you may have to enable
TCP/IP-based communication.

If you are using PHP and Perl to connect to MySQL, they may be using the
named pipe that MySQL used to use for localhost communication.

Even using, as David suggests:

mysql -P 3306 -h localhost -u cyclos -p

...the MySQL command-line program uses the named pipe because
localhost is treated specially by that program. Try using 127.0.0.1
instead of localhost and verify that it works.

If not, edit your /etc/mysql/my.cnf and make sure that skip-networking
is not set to true.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktUfagACgkQ9CaO5/Lv0PDFAgCgr4lt4K/8IO/zb18KUigCrmuS
wKQAn2pDHtP82T/T7UtKIQF0uXLi4PCx
=1RNn
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Cyclos Webapp Trouble (404) [solved]

2010-01-18 Thread Rick Bragg
On Mon, 2010-01-18 at 09:02 -0600, Caldarale, Charles R wrote:
  From: Rick Bragg [mailto:li...@gmnet.net]
  Subject: Re: Cyclos Webapp Trouble (404)
  
  Yes the above works perfect.  I can log into MySQL in exactly that way.
  I also double checked the password.
 
 Just for grins, do a netstat -ano and verify that the MySQL pid really is 
 listening on 127.0.0.1:3306 (or 0.0.0.0:3306) and not some other IP address.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.


That did it!

changing my.cnf 
bind-address= 0.0.0.0

did the trick.
OK, Now I will go pick up trash on the roadside for a while!

Thanks all!
Rick
 





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Cyclos Webapp Trouble (404)

2010-01-17 Thread Rick Bragg
On Sun, 2010-01-17 at 21:55 -0600, Caldarale, Charles R wrote:
  From: Rick Bragg [mailto:li...@gmnet.net]
  Subject: Cyclos Webapp Trouble (404)
  
  After following these steps, and restarting tomcat6 I get a 404 error,
  Also, the database remains empty.
 
 As stated before, using a real Tomcat download from tomcat.apache.org, 
 installing the most recent GA version of MySQL (5.1.42), and the current 
 cyclos (3.5.5), it all works fine.  The problem you are now having appears to 
 be due to the use of a security manager; either turn that off, or update the 
 appropriate properties file to include all the necessary entries to allow 
 cyclos to work.  I have no idea where Ubuntu places (or even names) the 
 security properties file, and certainly no idea what needs to be added to 
 make cyclos work with one.
 
 Again, I would strongly recommend that you uninstall the Ubuntu 3rd-party 
 version, and put in a real Tomcat, so we can all be looking at a common setup.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.
 



Hi, 

Thanks Chuck, One could argue to not use a package manager at all,
however I would rather use the package manager for this to make things
easier down the road.  I did manage to get a bit further, and you are
right about the security manager.

I got rid of the errors in the previous post by setting privileges for
the classes and libs (see below), but now I'm stuck on mysql

Here is a brief snip from my error log

Jan 18, 2010 2:05:07 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of 
class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'sessionFactory' defined in class path resource 
[nl/strohalm/cyclos/spring/persistence.xml]: Invocation of init method failed; 
nested exception is java.lang.RuntimeException: Error connecting to database at 
jdbc:mysql://localhost/cyclos3?useUnicode=truecharacterEncoding=utf8
Caused by: java.lang.RuntimeException: Error connecting to database at 
jdbc:mysql://localhost/cyclos3?useUnicode=truecharacterEncoding=utf8
at 
nl.strohalm.cyclos.setup.DataBaseConfiguration.validateConnection(DataBaseConfiguration.java:342)
at 
nl.strohalm.cyclos.setup.DataBaseConfiguration.run(DataBaseConfiguration.java:107)
...
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 
Communications link failure


I have the following policies in:
vi /etc/tomcat6/policy.d/50local.policy

// The permissions granted to the context WEB-INF/classes and lib directories
 grant codeBase file:${catalina.base}/webapps/cyclos/WEB-INF/classes/- {
  permission java.security.AllPermission;
 };
 grant codeBase file:${catalina.base}/webapps/cyclos/WEB-INF/lib/- {
  permission java.security.AllPermission;
 };

// The permission granted to your JDBC driver
 grant codeBase 
jar:file:${catalina.base}/webapps/cyclos/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar!/-
 {
  permission java.net.SocketPermission localhost:3306, connect;
 };


I think maybe my JDBC permissions are not quite right, or there is something 
with the driver, but I'm not sure...

Anybody have any ideas?

Thanks again!
Rick













-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org