Operating System - Linux
1829279 Members
12265 Online
109989 Solutions
New Discussion

MySql errors on RH linux 7.2

 
SOLVED
Go to solution
Edwin Ruiz_2
Super Advisor

MySql errors on RH linux 7.2

Hi!
I have one problem running MySql on Linux.. this is th error:
javax.jdo.JDOFatalDataStoreException: Cannot initialize datasource with URL "jdbc:mysql://172.21.0.82:3306/RobotReservas" and JDBC driver com.mysql.jdbc.Driver due to a java.sql.SQLException: Server configuration denies access to data source (errorCode=0, SQLState=08001)
NestedThrowables:
java.sql.SQLException: Server configuration denies access to data source
at com.libelis.lido.ds.jdbc.k.getConnection(k.java:66)
at com.libelis.lido.ds.jdbc.c.b.h(b.java:91)
at com.libelis.lido.ds.jdbc.n.(n.java:61)
at com.libelis.lido.ds.jdbc.m.d(m.java:63)
at com.libelis.lido.c.(c.java:68)
at com.libelis.lido.d.a(d.java:619)
at com.libelis.lido.internal.k.b.a(b.java:50)
at com.libelis.lido.d.(d.java:614)
at com.libelis.lido.PersistenceManagerFactory.getPersistenceManager(PersistenceManagerFactory.java:380)
at robotPack.ReservaTestArchivo.(ReservaTestArchivo.java:118)
at robotPack.ReservaTestArchivo.main(ReservaTestArchivo.java:207)
NestedThrowablesStackTrace:
java.sql.SQLException: Server configuration denies access to data source
at com.mysql.jdbc.MysqlIO.init(Unknown Source)
at com.mysql.jdbc.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.jdbc2.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.Driver.connect(Unknown Source)
at com.libelis.lido.ds.jdbc.k.getConnection(k.java:58)
at com.libelis.lido.ds.jdbc.c.b.h(b.java:91)
at com.libelis.lido.ds.jdbc.n.(n.java:61)
at com.libelis.lido.ds.jdbc.m.d(m.java:63)
at com.libelis.lido.c.(c.java:68)
at com.libelis.lido.d.a(d.java:619)
at com.libelis.lido.internal.k.b.a(b.java:50)
at com.libelis.lido.d.(d.java:614)
at com.libelis.lido.PersistenceManagerFactory.getPersistenceManager(PersistenceManagerFactory.java:380)
at robotPack.ReservaTestArchivo.(ReservaTestArchivo.java:118)
at robotPack.ReservaTestArchivo.main(ReservaTestArchivo.java:207)
Process exited with exit code 0.

It could be Kernel parameters problems?
13 REPLIES 13
Huc_1
Honored Contributor
Solution

Re: MySql errors on RH linux 7.2

No not the kernel perhaps a firewall limitation or protection problem

72.21.0.82:3306/RobotReservas

dont you have more messages/info ? in

#cat /var/log/security

just a suggestion ..

J-P
Smile I will feel the difference
Steven E. Protter
Exalted Contributor

Re: MySql errors on RH linux 7.2

I agree with Huc.

service iptables stop

or

service ipchains stop

Then re-test.

If the problem goes away, make appropriate firewall adjustments. /etc/sysconfig/iptables or /etc/sysconfig/ipchains

The firewall causing the issue may be on another machine.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Edwin Ruiz_2
Super Advisor

Re: MySql errors on RH linux 7.2

I dont have iptables on my /etc/sysconfig.. i just have one ipchains... what change can i do?
Huc_1
Honored Contributor

Re: MySql errors on RH linux 7.2


In your case login as root type and execute the following ( But Beware that this will stop your firewall in other words open your system to the outside world )
to do this just type

#service ipchains stop

then test again if this is good

start the firewall again

to do this type

#service ipchains start

then do the command

#ipchains -L

and tell you what is seen (cut and paste here if this is allright for you to edit this here )

we will see how to futher help

J-P
Smile I will feel the difference
Edwin Ruiz_2
Super Advisor

Re: MySql errors on RH linux 7.2

it is rare.. my linux is not configured like firewall... but these are the results of ipchains -L

thanks

Chain input (policy ACCEPT):
Chain forward (policy ACCEPT):
Chain output (policy ACCEPT):

Edwin Ruiz_2
Super Advisor

Re: MySql errors on RH linux 7.2

this is when ipchains is up:

[root@salato-apl10 sysconfig]# ipchains -L
Chain input (policy ACCEPT):
target prot opt source destination ports
ACCEPT tcp -y---- anywhere anywhere any -> ftp
ACCEPT tcp -y---- anywhere anywhere any -> ssh
ACCEPT tcp -y---- anywhere anywhere any -> telnet
ACCEPT udp ------ anywhere anywhere bootps:bootpc -> bootps:bootpc
ACCEPT udp ------ anywhere anywhere bootps:bootpc -> bootps:bootpc
ACCEPT all ------ anywhere anywhere n/a
ACCEPT all ------ anywhere anywhere n/a
REJECT tcp -y---- anywhere anywhere any -> 0:1023
REJECT tcp -y---- anywhere anywhere any -> nfs
REJECT udp ------ anywhere anywhere any -> 0:1023
REJECT udp ------ anywhere anywhere any -> nfs
REJECT tcp -y---- anywhere anywhere any -> x11:6009
REJECT tcp -y---- anywhere anywhere any -> xfs
Chain forward (policy ACCEPT):
Chain output (policy ACCEPT):
Huc_1
Honored Contributor

Re: MySql errors on RH linux 7.2

Ruiz,

When you stopped ipchains, What where the test results ? good, any more error's ?

or is it still the same ?

?

J-P

Smile I will feel the difference
Edwin Ruiz_2
Super Advisor

Re: MySql errors on RH linux 7.2

this is the result when ipchian is stoped.. is there something wrong?

[root@salato-apl10 sysconfig]# service ipchains stop
Flushing all chains: [ OK ]
Removing user defined chains: [ OK ]
Resetting built-in chains to the default ACCEPT policy: [ OK ]
[root@salato-apl10 sysconfig]# ipchains -L
Chain input (policy ACCEPT):
Chain forward (policy ACCEPT):
Chain output (policy ACCEPT):
Huc_1
Honored Contributor

Re: MySql errors on RH linux 7.2

Ruiz,
What I mean is when ipchains is stopped

if you do the Mysql test do you have the mysql java error ? still ! yes or no ?

if not
then it is in ipchains
else it is something different

J-P
Smile I will feel the difference
Edwin Ruiz_2
Super Advisor

Re: MySql errors on RH linux 7.2

We r trying... now.. thanks
Edwin Ruiz_2
Super Advisor

Re: MySql errors on RH linux 7.2

I have the problem again...
Steven E. Protter
Exalted Contributor

Re: MySql errors on RH linux 7.2

Hi Edwin,

When you get your results, if ipchains clears up the situation, correcting the issue will be straightforward.

Databases use ports and sockets to run data connection sessions. All you need to do is look at the mysql configuration file for what ports(in oracle the port numbers are in the init.ora file) it needs open.

Then find an ipchains port configuration, say for port 22 thats open the way you need, duplicate it in the ipchains file and change the port number.'

Then service ipchains start and re-run the test.

The strange thing about this whole issue is the last line of the orginal post

Process exited with exit code 0.

That usually means everythig worked right.

Looking forward to your results.

Good Luck,

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stuart Browne
Honored Contributor

Re: MySql errors on RH linux 7.2

This error simply states that the Java class you are using cannot talk to the MySQL database.

Can you access your MySQL database out-side of the Java class? (i.e. from command line 'mysql -p -uroot mysql').

Ensure that the User and DB tables allow access from the host you are coming from for the user you are using on the database (select, from user and db, where user = '', and verify).
One long-haired git at your service...