 |
OpenEMM Support Use this forum to get and provide free help regarding OpenEMM
|
| View previous topic :: View next topic |
| Author |
Message |
hobbss
Joined: 01 Oct 2006 Posts: 6 Location: Gibraltar
|
Posted: Sun Oct 01, 2006 6:15 pm Post subject: java.net.ConnectException: Connection refused |
|
|
Setup everything as per install doc (except sendmail stuff - see other posts)
Created a db user called openemm, and a database called openemm. Database creation worked except the last two statements which tried to grant privileges to "agnitas". I ignored these errors as the script didnt create the user, and there is no mention of it in the install instructions, so assumed it was a mistake. I dont want to (and cant - dont have root password) run the db under the root user.
When I hit my domain on port 8081, I get a nice error:
Ein Fehler ist aufgetreten
Ursache: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Ruler' defined in ServletContext resource [/WEB-INF/cronContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.agnitas.backend.RulerImpl]; constructor threw exception; nested exception is org.agnitas.util.ConfigException: Database setup failed: java.lang.Exception: Error initializing database connection: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection refused STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection refused at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555) at com.mysql.jdbc.Connection.(Connection.java:1485) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:171) at org.agnitas.backend.DBase.(DBase.java:91) at org.agnitas.backend.Data.mkDBase(Data.java:295) at org.agnitas.backend.Data.setupDatabase(Data.java:305) at org.agnitas.backend.Data.(Data.java:1025) at org.agnitas.backend.RulerImpl.mkData(RulerImpl.java:95) at org.agnitas.backend.RulerImpl.(RulerImpl.java:106) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
:
stuff deleted
:
I hacked around a bit and found a file in WEB-INF/classes called emm.properties. I notice there is a user called agnitas with a password of openemm!
I created this user in plesk for the db openemm.
I then did:
mysql -u openemm -p openemm
(enered password)
and at the mysql> prompt tried:
GRANT DELETE, INSERT, UPDATE, LOCK TABLES, SELECT, CREATE TEMPORARY TABLES ON openemm.* TO 'agnitas'@'localhost' IDENTIFIED BY 'openemm';
But get:
ERROR 1044 (42000): Access denied for user 'openemm'@'%' to database 'openemm'
I tried stopping and starting OpemEMM with the new user defined for the DB, but get the same "Ein Fehler ist aufgetreten..." when I hit the url. |
|
| Back to top |
|
 |
hobbss
Joined: 01 Oct 2006 Posts: 6 Location: Gibraltar
|
Posted: Sun Oct 01, 2006 6:27 pm Post subject: |
|
|
Found that plesk have disabled the root user, and it is instead "admin". Loged in with admin to mysql and ran
GRANT DELETE, INSERT, UPDATE, LOCK TABLES, SELECT, CREATE TEMPORARY TABLES ON openemm.* TO 'agnitas'@'localhost' IDENTIFIED BY 'openemm';
GRANT ALTER ON openemm.customer_1_tbl TO 'agnitas'@'localhost' IDENTIFIED BY 'openemm';
without error.
stopped and started openem, but still get the same:
Java.net.SocketException: java.net.ConnectException: Connection refused at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284)
Any ideas? |
|
| Back to top |
|
 |
krull
Joined: 09 Sep 2006 Posts: 5
|
Posted: Mon Oct 30, 2006 9:19 am Post subject: |
|
|
#bind-address = 127.0.0.1
in the /etc/mysql/my.cnf
If you comment that out, mysql will allow the whole network to connect. You already added the user with the external IP.
Try commenting it out for testing purpose. You should not run mysql with this enabled, because somebody can connect to your host now.
But perhaps this will bring you closer to the problem  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|