Bug 802747 - Scalable jbossas app failed to connect to embedded mysql
Summary: Scalable jbossas app failed to connect to embedded mysql
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Dan McPherson
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-13 12:36 UTC by jizhao
Modified: 2015-05-14 22:52 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-13 14:03:28 UTC
Target Upstream Version:


Attachments (Terms of Use)
connect to mysql, insert some data, and read them (1016 bytes, application/octet-stream)
2012-03-13 12:37 UTC, jizhao
no flags Details

Description jizhao 2012-03-13 12:36:01 UTC
Description of problem:
Create a scalable jbossas app and embed mysql to it. Copy the app template to the git repo and git push.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Create an scalable jbossas app using REST API
$ curl -k -H "Accept: application/xml" --user "<user>:<pass>"  https://<server_dns>/broker/rest/domains/<domain_name>/applications -X POST -d name=<appname> -d cartridge=jbossas-7 -d scale=true
2.Embed mysql to the app
$ rhc app cartridge add -a <app_name> -c mysql-5.1
3.Copy the attached app template to git repo, change the username, password to your own ones and git push.
  
Actual results:
<-------------web page------------->
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/MysqlDS
...........
javax.resource.ResourceException: IJ000658: Unexpected throwable while trying to create a connection: null
.........
javax.resource.ResourceException: Could not create connection
......
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database '98a78c714b'
........
<-------------------------------->

Expected results:
The app should connect to mysql successfully.

Additional info:

Comment 1 jizhao 2012-03-13 12:37:26 UTC
Version-Release number of selected component (if applicable):
rhc-cartridge-haproxy-1.4-0.6.5-1.el6_2.noarch
rhc-cartridge-jbossas-7-0.88.4-1.el6_2.noarch
rubygem-stickshift-controller-0.6.6-1.el6_2.noarch
stickshift-abstract-0.6.6-1.el6_2.noarch
rubygem-stickshift-node-0.6.7-1.el6_2.noarch
rubygem-stickshift-common-0.6.4-1.el6_2.noarch

Comment 2 jizhao 2012-03-13 12:37:53 UTC
Created attachment 569660 [details]
connect to mysql, insert some data, and read them

Comment 3 Dan McPherson 2012-03-13 14:03:28 UTC
This use case doesn't make sense to me.  Embedded mysql shouldn't work with a scalable app.  It would only be embedded in the haproxy gear in this case right?  What should work is connecting to a standalone mysql from jboss based on US2009.


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