I'm trying to understand the communication between SO and mariaDB. so I tried to retrieve some data from mariaDB and i introduced REST point to call the function(which fetches data).
After this,I dockeriz'ed and deployed in ONAP in which the docker containers are managed by kubernetes. But when I give the REST request,it returns an internal server error:<html><head><title>Error</title></head><body>Internal Server Error</body></html>
NOTE:Since docker and kubernetes are in different network ,I also introduced (wildcard)bind 0.0.0.0 in dockerdata_nfs/../../maradb1.cnf to make communication from host.
How do I overcome this to retrieve data from mariaDB.?
LOGS:
ERROR [io.undertow.request] (default task-4) UT005023: Exception handling request to /ecomp/mso/infra/orchestrationRequests/<ENDPOINT>: org.jboss.resteasy.spi.UnhandledException: org.hibernate.exception.GenericJDBCException: Could not open connection at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:77) at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:220) at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:175)............. .....Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/mso-requests at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:656) at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:429) at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:747) .....Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/mso-requests at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:146)....... .....Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/mso-requests at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:656)... .....Caused by: javax.resource.ResourceException: IJ031084: Unable to create connection at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:345).... .....Caused by: java.sql.SQLException: ost '10.42.6.153' is not allowed to connect to this MariaDB server^@^@^@^@ at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:138)........
I'm trying to understand the communication between SO and mariaDB. so I tried to retrieve some data from mariaDB and i introduced REST point to call the function(which fetches data).
After this,I dockeriz'ed and deployed in ONAP in which the docker containers are managed by kubernetes. But when I give the REST request,it returns an internal server error:<html><head><title>Error</title></head><body>Internal Server Error</body></html>
NOTE:Since docker and kubernetes are in different network ,I also introduced (wildcard)bind 0.0.0.0 in dockerdata_nfs/../../maradb1.cnf to make communication from host.
How do I overcome this to retrieve data from mariaDB.?
LOGS:
ERROR [io.undertow.request] (default task-4) UT005023: Exception handling request to /ecomp/mso/infra/orchestrationRequests/<ENDPOINT>: org.jboss.resteasy.spi.UnhandledException: org.hibernate.exception.GenericJDBCException: Could not open connection
at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:77)
at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:220)
at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:175).............
.....Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/mso-requests
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:656)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:429)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:747)
.....Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/mso-requests
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:146).......
.....Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/mso-requests
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:656)...
.....Caused by: javax.resource.ResourceException: IJ031084: Unable to create connection
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:345)....
.....Caused by: java.sql.SQLException: ost '10.42.6.153' is not allowed to connect to this MariaDB server^@^@^@^@
at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:138)........
Thanks...