1

I cannot get a Play app within Boxfuse to connect to a MariaDB instance on the same computer (development PC).

vb-3144982e => Caused by: org.mariadb.jdbc.internal.common.QueryException: Could not connect to address=(host=localhost)(port=3306)(type=master) : Connection refused
vb-3144982e =>  at org.mariadb.jdbc.internal.mysql.MySQLProtocol.connectWithoutProxy(MySQLProtocol.java:626)
vb-3144982e =>  at org.mariadb.jdbc.internal.common.Utils.retrieveProxy(Utils.java:541)
vb-3144982e =>  at org.mariadb.jdbc.Driver.connect(Driver.java:95)
vb-3144982e =>  ... 12 more
vb-3144982e => Caused by: java.net.ConnectException: Connection refused

What am I missing to get the "contained" app to connect to a "host" port?

rvange
  • 2,432
  • 2
  • 20
  • 23

1 Answers1

0

To make it easy to access services running on your physical machine (outside of your Boxfuse VirtualBox instance), Boxfuse exposes an environment variable named BOXFUSE_HOST_IP to each of its VirtualBox instances. This environment variable contains the IP address of your physical machine (example: 172.27.3.61) which you can use this to construct URLs to access your services.

More info: https://cloudcaptain.sh/docs/virtualbox#BOXFUSE_HOST_IP

Axel Fontaine
  • 34,542
  • 16
  • 106
  • 137
  • I recently created a simple monolithic JHipster app with Maria DB and used boxfuse to deploy to AWS. I got the same error mentioned in original question and from what I can see in boxfuse logs, the database server was not provisioned at all. `boxfuse info` command indicates "DB Type : No database". This seems to be the main reason why. Though I can not work out why it is so. How does boxfuse determine the database service/ RDS to provision in AWS? – Naymesh Mistry Nov 13 '17 at 22:36
  • Boxfuse currently supports PostgreSQL and MySQL. This is autodetected by scanning your war file. You can also manually specify this while creating your app: https://boxfuse.com/docs/commandline/create#db.type – Axel Fontaine Nov 14 '17 at 07:41