Running MyBatis with Amazon Aurora (MySQL)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Running MyBatis with Amazon Aurora (MySQL)

Tony Piazza
We have been running an open source app on AWS lately that uses MyBatis for persistence. Recently, we made the decision to use Amazon Aurora (MySQL) instead of managing our own database on an EC2 instance. Our app is now unable to communicate with the database. See this link for the stack trace. We installed the mysql-client on the EC2 instance running the app and are able to connect to Aurora and execute queries. Does anyone have suggestions or experience running MyBatis on Amazon Aurora? If so, we would appreciate any help you can provide.

Thanks,

-Tony

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Tim
Reply | Threaded
Open this post in threaded view
|

Re: Running MyBatis with Amazon Aurora (MySQL)

Tim
Hi, I have used Aurora (MySQL and Sql Server) with MyBatis before and, honestly, the only time that I have had issues was when I don't peer connect it to my application host correctly.
But you said that you tried using the mysql-client on the same machine and it worked fine. So what is your configuration? Maybe log the db url so that you know for sure it is not trying to read from the old db.
Also make sure you are using the same user account?




On Sat, Nov 3, 2018 at 3:43 PM Tony Piazza <[hidden email]> wrote:
We have been running an open source app on AWS lately that uses MyBatis for persistence. Recently, we made the decision to use Amazon Aurora (MySQL) instead of managing our own database on an EC2 instance. Our app is now unable to communicate with the database. See this link for the stack trace. We installed the mysql-client on the EC2 instance running the app and are able to connect to Aurora and execute queries. Does anyone have suggestions or experience running MyBatis on Amazon Aurora? If so, we would appreciate any help you can provide.

Thanks,

-Tony

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Running MyBatis with Amazon Aurora (MySQL)

Tony Piazza
Thanks for your reply. The configuration of the datasource/driver is done inside the app. I don't have a way to specify the URL. I am certain that we are using the same user account. We created the user with the same name and password in both databases. I've created a JIRA ticket on the site for the app and am hoping someone over there might be able to help us figure this out.

Cheers,

-Tony

On Saturday, November 3, 2018 at 3:56:32 PM UTC-5, h3adache wrote:
Hi, I have used Aurora (MySQL and Sql Server) with MyBatis before and, honestly, the only time that I have had issues was when I don't peer connect it to my application host correctly.
But you said that you tried using the mysql-client on the same machine and it worked fine. So what is your configuration? Maybe log the db url so that you know for sure it is not trying to read from the old db.
Also make sure you are using the same user account?




On Sat, Nov 3, 2018 at 3:43 PM Tony Piazza <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="MTNx74U_CAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">tonyp...@...> wrote:
We have been running an open source app on AWS lately that uses MyBatis for persistence. Recently, we made the decision to use Amazon Aurora (MySQL) instead of managing our own database on an EC2 instance. Our app is now unable to communicate with the database. See <a href="http://dpaste.com/0GJ63JE" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdpaste.com%2F0GJ63JE\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEnEDgEzuDTfxWPBipoidF-R-f9BA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdpaste.com%2F0GJ63JE\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEnEDgEzuDTfxWPBipoidF-R-f9BA&#39;;return true;">this link for the stack trace. We installed the mysql-client on the EC2 instance running the app and are able to connect to Aurora and execute queries. Does anyone have suggestions or experience running MyBatis on Amazon Aurora? If so, we would appreciate any help you can provide.

Thanks,

-Tony

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="MTNx74U_CAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mybatis-user...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Running MyBatis with Amazon Aurora (MySQL)

Mark Nolan
When you say you have no way to specify the URL, how do you configure which MySQL server the app connects to?

I have only encountered that exception when I have some misconfiguration such as wrong id, wrong password, wrong server, firewall issue or not adding the app server to the list of permitted hosts in MySQL. I would first double-check that when you connect to the server from the MySQL client, you are really connecting to the right server and with the same connection string as the app uses. The app is open-source, so you can determine what that string is. Possibly set logging to TRACE or DEBUG level. Or run on the server in debug mode.

M.
.


On Sun, 4 Nov 2018, 04:05 Tony Piazza, <[hidden email]> wrote:
Thanks for your reply. The configuration of the datasource/driver is done inside the app. I don't have a way to specify the URL. I am certain that we are using the same user account. We created the user with the same name and password in both databases. I've created a JIRA ticket on the site for the app and am hoping someone over there might be able to help us figure this out.

Cheers,

-Tony

On Saturday, November 3, 2018 at 3:56:32 PM UTC-5, h3adache wrote:
Hi, I have used Aurora (MySQL and Sql Server) with MyBatis before and, honestly, the only time that I have had issues was when I don't peer connect it to my application host correctly.
But you said that you tried using the mysql-client on the same machine and it worked fine. So what is your configuration? Maybe log the db url so that you know for sure it is not trying to read from the old db.
Also make sure you are using the same user account?




On Sat, Nov 3, 2018 at 3:43 PM Tony Piazza <[hidden email]> wrote:
We have been running an open source app on AWS lately that uses MyBatis for persistence. Recently, we made the decision to use Amazon Aurora (MySQL) instead of managing our own database on an EC2 instance. Our app is now unable to communicate with the database. See this link for the stack trace. We installed the mysql-client on the EC2 instance running the app and are able to connect to Aurora and execute queries. Does anyone have suggestions or experience running MyBatis on Amazon Aurora? If so, we would appreciate any help you can provide.

Thanks,

-Tony

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Running MyBatis with Amazon Aurora (MySQL)

Tony Piazza
It turns out that our configuration incorrectly specified the hostname. Once we changed that we were able to connect to RDS.

Thanks a lot for your help!

-Tony

On Sunday, November 4, 2018 at 2:27:43 AM UTC-6, Mark Nolan wrote:
When you say you have no way to specify the URL, how do you configure which MySQL server the app connects to?

I have only encountered that exception when I have some misconfiguration such as wrong id, wrong password, wrong server, firewall issue or not adding the app server to the list of permitted hosts in MySQL. I would first double-check that when you connect to the server from the MySQL client, you are really connecting to the right server and with the same connection string as the app uses. The app is open-source, so you can determine what that string is. Possibly set logging to TRACE or DEBUG level. Or run on the server in debug mode.

M.
.


On Sun, 4 Nov 2018, 04:05 Tony Piazza, <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="6gPLmT1lCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">tonyp...@...> wrote:
Thanks for your reply. The configuration of the datasource/driver is done inside the app. I don't have a way to specify the URL. I am certain that we are using the same user account. We created the user with the same name and password in both databases. I've created a JIRA ticket on the site for the app and am hoping someone over there might be able to help us figure this out.

Cheers,

-Tony

On Saturday, November 3, 2018 at 3:56:32 PM UTC-5, h3adache wrote:
Hi, I have used Aurora (MySQL and Sql Server) with MyBatis before and, honestly, the only time that I have had issues was when I don't peer connect it to my application host correctly.
But you said that you tried using the mysql-client on the same machine and it worked fine. So what is your configuration? Maybe log the db url so that you know for sure it is not trying to read from the old db.
Also make sure you are using the same user account?




On Sat, Nov 3, 2018 at 3:43 PM Tony Piazza <[hidden email]> wrote:
We have been running an open source app on AWS lately that uses MyBatis for persistence. Recently, we made the decision to use Amazon Aurora (MySQL) instead of managing our own database on an EC2 instance. Our app is now unable to communicate with the database. See <a href="http://dpaste.com/0GJ63JE" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdpaste.com%2F0GJ63JE\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEnEDgEzuDTfxWPBipoidF-R-f9BA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdpaste.com%2F0GJ63JE\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEnEDgEzuDTfxWPBipoidF-R-f9BA&#39;;return true;">this link for the stack trace. We installed the mysql-client on the EC2 instance running the app and are able to connect to Aurora and execute queries. Does anyone have suggestions or experience running MyBatis on Amazon Aurora? If so, we would appreciate any help you can provide.

Thanks,

-Tony

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="6gPLmT1lCAAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mybatis-user...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.