Bug 1002893 - missing jdbc-driver.mysql dependency
missing jdbc-driver.mysql dependency
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Michal Fojtik
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-30 03:39 EDT by alekask.v
Modified: 2015-05-14 19:27 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-19 12:48:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description alekask.v 2013-08-30 03:39:40 EDT
Description of problem:
Once application is deploying, the server logs error message:
JBAS014774: Service status report JBAS014775: New missing/unsatisfied dependencies: service jboss.jdbc-driver.mysql (missing) dependents: [service jboss.data-source.java:jboss/datasources/MysqlDS]


ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.0.0.GA (AS 7.1.2.Final-redhat-1) started (with errors) in 80999ms - Started 306 of 556 services (117 services failed or missing dependencies, 130 services are passive or on-demand)

I find out that jbosseap/modules/com/mysql/main is empty.

Version-Release number of selected component (if applicable): 
started after the update on August 27.

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
https://www.openshift.com/forums/openshift/missing-dependencies
Comment 1 Michal Fojtik 2013-08-30 09:11:55 EDT
Hmm, is the thing we are missing here something like this?

(copied from postgresql cart)

openshift-origin-cartridge-jbosseap/openshift-origin-cartridge-jbosseap.spec

74:mkdir -p /etc/alternatives/jbosseap-6/modules/org/postgresql/jdbc/main

75:ln -fs /usr/share/java/postgresql-jdbc3.jar /etc/alternatives/jbosseap-6/modules/org/postgresql/jdbc/main

76:cp -p %{cartridgedir}/versions/shared/modules/postgresql_module.xml /etc/alternatives/jbosseap-6/modules/org/postgresql/jdbc/main/module.xml
Comment 2 Oliver Hunt 2013-09-04 11:50:15 EDT
I'm also seeing this with mysql :(
Comment 3 Oliver Hunt 2013-09-04 11:52:00 EDT
My setup does not even have the jbosseap/modules/com/mysql directory
Comment 4 Oliver Hunt 2013-09-05 12:13:58 EDT
Okay, Nam sent me a Jar for mysql-connector-java-5.1.18-bin.jar and the module.xml for that jar.

I place these in my git repo in the .openshift/config/modules/com/mysql/jdbc/main/ directory (i hate to create these).  Then added, committed, and pushed these to the tree.

Perhaps the JSBossEAP should automatically include this if you have a mysql cartridge?
Comment 5 Michal Fojtik 2013-09-10 09:12:14 EDT
Hi,

I have pull request with a fix for this:

https://github.com/openshift/origin-server/pull/3595

This should enable mysql in jBoss in the same manner as we do with postgresql. Any sanity check on the pull request/testing is welcome :-)
Comment 6 openshift-github-bot 2013-09-10 11:43:08 EDT
Commits pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/160928351555ee22ab1f40c91b79911fc8d7833a
Bug 1002893 - Added mysql-connector-java dependency to mysql cartridge

https://github.com/openshift/origin-server/commit/953eff570d292c036227663930deaa2d49b2bc86
Bug 1002893 - Updated jbosseap cartridge to support mysql-connector
Comment 7 chunchen 2013-09-11 01:40:27 EDT
I checked this issue on devenv_3770, found it is not fixed completely. The mysql-connector jar are existing in the jbosseap/modules/com/mysql/jdbc/main directory, but the errors are still in the server logs. Please refer to the following results:

1. Create a jbosseap app
rhc app create ceap jbosseap-6
2. Check jbosseap/modules/com/mysql/jdbc/main directory
# rhc ssh ceap 'ls jbosseap/modules/com/mysql/jdbc/main'
module.xml
mysql-connector-java-5.1.18-bin.jar
mysql-connector-java.jar
3. Do some changes in the app local repo and git push
cd ceap
touch test.txt
git add .; git commit -amp; git push
4. SSH into this app and check the server logs
# rhc ssh ceap
\> tail -f jbosseap/logs/server.log
<-----------snip--------->
2013/09/11 00:17:01,303 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.jdbc-driver.mysql (missing) dependents: [service jboss.data-source.java:jboss/datasources/MysqlDS, service jboss.driver-demander.java:jboss/datasources/MysqlDS] 

2013/09/11 00:17:01,468 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.1.245.129:9990/management
2013/09/11 00:17:01,499 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.1.245.129:9990
2013/09/11 00:17:01,500 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.1.1.GA (AS 7.2.1.Final-redhat-10) started (with errors) in 52505ms - Started 198 of 340 services (3 services failed or missing dependencies, 136 services are passive or on-demand)
Comment 8 Michal Fojtik 2013-09-11 03:49:13 EDT
I would like to ask someone from JBoss guys about this because I'm not sure what file to modify to have this issue fixed... I guess we need to do some fiddling in the jboss cartridge to specify the load path...
Comment 9 Michal Fojtik 2013-09-11 10:58:09 EDT
chunsen:

We were not able to reproduce this on latest devenv, see:

http://fpaste.org/38742/78911330/

Could you please try it again?
Comment 10 Dan Mace 2013-09-11 11:00:12 EDT
I couldn't reproduce the problem in devenv_3773+. The mysql module is present/correctly linked within the jbosseap cartridge, and when creating a new jbosseap-6.0 application with a mysql-5.1 cartridge, the MySQL JNDI datasource is properly initialized.

It also survives a restart during the Git push cycle.

Please re-test this in the latest dev environments by creating a new jbosseap-6/mysql-5.1 application.
Comment 11 chunchen 2013-09-11 23:14:20 EDT
@Dan Mace,

I ckecked it again on devenv_3776, the above errors are still met and met new errors as below:

<----------snip------------>
2013/09/11 23:09:13,839 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 51) JBAS011800: Activating Naming Subsystem
2013/09/11 23:09:14,325 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013170: Current PicketBox version=4.0.17.SP2-redhat-2
2013/09/11 23:09:16,427 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on 127.1.246.1:9999
2013/09/11 23:09:16,726 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (IronJacamar 1.0.19.Final-redhat-2)
2013/09/11 23:09:16,833 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 35) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
2013/09/11 23:09:17,053 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service

2013/09/11 23:09:17,332 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 35) JBAS014613: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("jdbc-driver" => "mysql")
]) - failure description: "JBAS010441: Failed to load module for driver [com.mysql.jdbc]"
<----------snip------------>
Comment 12 chunchen 2013-09-12 00:30:19 EDT
My re-tested steps as below:

1. Create a scaled jbosseap-6 with mysql
rhc app create ceapms jbosseap-6 mysql-5.1 -s
2. Do some changes and git push
3. SSH into this app and ckeck server logs
rhc ssh ceapms
tail -f jbosseap/logs/server.log
Comment 13 Michal Fojtik 2013-09-12 09:16:12 EDT
chunchen: Thanks, I missed the 'scalable' app, I was indeed able to reproduce this issue and I found the problem. The pull request is now being merge, so please re-test once a new devenv will be spawned. Thanks!
Comment 14 openshift-github-bot 2013-09-12 09:24:22 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/be42928c838c72fe4cf13fbd1e934e94a4834137
Bug 1002893 - Added .jdbc to the mysql module name in JBossEAP
Comment 15 chunchen 2013-09-12 23:09:44 EDT
It's fixed, verified on devenv_stage_471.
Comment 16 Oliver Hunt 2013-09-16 15:41:30 EDT
(In reply to chunchen from comment #15)
> It's fixed, verified on devenv_stage_471.

When will this hit production?

Note You need to log in before you can comment on or make changes to this bug.