{"action":"created","issue":{"url":"https://api.github.com/repos/wso2/product-is/issues/3319","repository_url":"https://api.github.com/repos/wso2/product-is","labels_url":"https://api.github.com/repos/wso2/product-is/issues/3319/labels{/name}","comments_url":"https://api.github.com/repos/wso2/product-is/issues/3319/comments","events_url":"https://api.github.com/repos/wso2/product-is/issues/3319/events","html_url":"https://github.com/wso2/product-is/issues/3319","id":334268448,"node_id":"MDU6SXNzdWUzMzQyNjg0NDg=","number":3319,"title":"Regression via MySQL Connection on 5.6.0 RC3 vs 5.5.0","user":{"login":"djphan","id":6673572,"node_id":"MDQ6VXNlcjY2NzM1NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/6673572?v=4","gravatar_id":"","url":"https://api.github.com/users/djphan","html_url":"https://github.com/djphan","followers_url":"https://api.github.com/users/djphan/followers","following_url":"https://api.github.com/users/djphan/following{/other_user}","gists_url":"https://api.github.com/users/djphan/gists{/gist_id}","starred_url":"https://api.github.com/users/djphan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djphan/subscriptions","organizations_url":"https://api.github.com/users/djphan/orgs","repos_url":"https://api.github.com/users/djphan/repos","events_url":"https://api.github.com/users/djphan/events{/privacy}","received_events_url":"https://api.github.com/users/djphan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-06-20T22:12:17Z","updated_at":"2018-06-22T17:21:06Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI found a regression with the RC3 candidate when you swap the database connection to use mySQL.\r\n\r\nMy setup is:\r\n* Running the Identity Server in a Docker Container and modified master-datasources.xml to point to my local instance of mySQL on Mac. Example is:\r\n\r\n```        \r\n<datasource>\r\n            <name>WSO2_CARBON_DB</name>\r\n            <description>The datasource used for registry and user manager</description>\r\n            <jndiConfig>\r\n                <name>jdbc/WSO2CarbonDB</name>\r\n            </jndiConfig>\r\n            <definition type=\"RDBMS\">\r\n                <configuration>\r\n                    <url>jdbc:mysql://host.docker.internal:3306/regdb?serverTimezone=MST</url>\r\n                    <username>root</username>\r\n                    <password></password>\r\n                    <driverClassName>com.mysql.cj.jdbc.Driver</driverClassName>\r\n                    <maxActive>80</maxActive>\r\n                    <maxWait>60000</maxWait>\r\n                    <minIdle>5</minIdle>\r\n                    <testOnBorrow>true</testOnBorrow>\r\n                    <validationQuery>SELECT 1</validationQuery>\r\n                    <validationInterval>30000</validationInterval>\r\n                    <defaultAutoCommit>false</defaultAutoCommit>\r\n                </configuration>\r\n            </definition>\r\n        </datasource>\r\n```\r\n\r\n\r\n* I modified user-mgt.xml to uncomment the JDBCTenantManager UserStore Manager Example and commented out the LDAP UserStore\r\n* I ran both MySql5.7 scripts under the dbscripts/ root and dbscripts/identity folders on my local DB (regDB in this case)\r\n* Then hit the Identity Server and created a test service provider.\r\n* I used Postman (or any tool) to simulate an authorization_code grant request on /oauth2/authorize and generated the cookies successfully\r\n* But when I use the code value in the cookie in /oauth2/token to complete the flow i hit a mySQL error\r\n* I noticed that in the Auth_Code Tables and Token Tables that the matching values are being written to mySQL instance \r\n* But the Java side of things fails to fetch the data with this error:\r\n\r\n```\r\nERROR {org.wso2.carbon.identity.oauth2.OAuth2Service} -  Error occurred while issuing the access token for Client ID : f5hQz7Rr_ZNbLPjUHhZmhDM0gBUa, User ID null, Scope : [openid] and Grant Type : authorization_code\r\norg.wso2.carbon.identity.base.IdentityRuntimeException: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure\r\n\r\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.\r\n\r\n```\r\n\r\n* Note: When you go through password grant flow, I am able to retrieve the access token successfully in my setup\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/wso2/product-is/issues/comments/399517016","html_url":"https://github.com/wso2/product-is/issues/3319#issuecomment-399517016","issue_url":"https://api.github.com/repos/wso2/product-is/issues/3319","id":399517016,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTUxNzAxNg==","user":{"login":"djphan","id":6673572,"node_id":"MDQ6VXNlcjY2NzM1NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/6673572?v=4","gravatar_id":"","url":"https://api.github.com/users/djphan","html_url":"https://github.com/djphan","followers_url":"https://api.github.com/users/djphan/followers","following_url":"https://api.github.com/users/djphan/following{/other_user}","gists_url":"https://api.github.com/users/djphan/gists{/gist_id}","starred_url":"https://api.github.com/users/djphan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djphan/subscriptions","organizations_url":"https://api.github.com/users/djphan/orgs","repos_url":"https://api.github.com/users/djphan/repos","events_url":"https://api.github.com/users/djphan/events{/privacy}","received_events_url":"https://api.github.com/users/djphan/received_events","type":"User","site_admin":false},"created_at":"2018-06-22T17:21:06Z","updated_at":"2018-06-22T17:21:06Z","author_association":"NONE","body":"Sounds good. Doing the above was able to unblock me :). We may want to update the WSO2 docs with the above troubleshooting step as it would be an easy error to come across."}}
{"actor":{"display_login":"djphan"}}