Hosting DashBox database on external server

jgreene
Posts: 79
Joined: Mon Aug 13, 2012 5:04 pm

Re: Hosting DashBox database on external server

Post by jgreene » Wed Apr 03, 2019 3:55 pm

jgreene wrote:I've been successful at installing Postsql on my linux server and dump the database and creating and restoring it on the linux server. So far so good. However, when I try to get the dashbox to connect to it all I get is "connection failed" when I test the connection. Not very helpful in determining why. I've made all the modifications to the configuration files to allow remote access and my server had no trouble grabbing the database from the dashbox, so I know they are communicating.
Nevermind, had a typo in the .conf file. Now it says it can connect.
jgreene
Posts: 79
Joined: Mon Aug 13, 2012 5:04 pm

Re: Hosting DashBox database on external server

Post by jgreene » Wed Apr 03, 2019 3:58 pm

jgreene wrote:
jgreene wrote:I've been successful at installing Postsql on my linux server and dump the database and creating and restoring it on the linux server. So far so good. However, when I try to get the dashbox to connect to it all I get is "connection failed" when I test the connection. Not very helpful in determining why. I've made all the modifications to the configuration files to allow remote access and my server had no trouble grabbing the database from the dashbox, so I know they are communicating.
Nevermind, had a typo in the .conf file. Now it says it can connect.
Aaaaand, now it says it cannot connect to the database. And I guess once that happens it doesn't even load the web interface? Guess I'll save this for the weekend when I have more time. Now to get it back to the SD card....
jgreene
Posts: 79
Joined: Mon Aug 13, 2012 5:04 pm

Re: Hosting DashBox database on external server

Post by jgreene » Wed Apr 03, 2019 4:15 pm

jgreene wrote:
jgreene wrote:
jgreene wrote:I've been successful at installing Postsql on my linux server and dump the database and creating and restoring it on the linux server. So far so good. However, when I try to get the dashbox to connect to it all I get is "connection failed" when I test the connection. Not very helpful in determining why. I've made all the modifications to the configuration files to allow remote access and my server had no trouble grabbing the database from the dashbox, so I know they are communicating.
Nevermind, had a typo in the .conf file. Now it says it can connect.
Aaaaand, now it says it cannot connect to the database. And I guess once that happens it doesn't even load the web interface? Guess I'll save this for the weekend when I have more time. Now to get it back to the SD card....
So it would appear that despite the 'test connection' saying it was happy and the connection was good, if anything else isn't perfect, and you 'save' the remote database server info, it pretty much bricks your dashbox? How can I get it back to using the SD Card? And is there any way to test this without killing the web interface?
ben
Site Admin
Posts: 4269
Joined: Fri Jun 04, 2010 9:39 am

Re: Hosting DashBox database on external server

Post by ben » Thu Apr 04, 2019 9:47 am

jgreene wrote: So it would appear that despite the 'test connection' saying it was happy and the connection was good, if anything else isn't perfect, and you 'save' the remote database server info, it pretty much bricks your dashbox? How can I get it back to using the SD Card? And is there any way to test this without killing the web interface?
An SD card is still needed for the DashBox to operate, but that SD card will no longer be written to. It will be used in case of emergency (for example if your server IP changes and the DashBox can no longer access the database). If you ever need to restore the original settings in order to access the DashBox, there's a script located in the /system/ section to restore them:

http://<your dashbox address>/system/db.php

What error message did you get afterwards? (HTTP500 would be indicative of a database issue).

Did you do a full dump of the database?

Our backup program excludes a few tables that are in the primary database (the -T statements).
Ben
Brultech Research Inc.
E: ben(at)brultech.com
jgreene
Posts: 79
Joined: Mon Aug 13, 2012 5:04 pm

Re: Hosting DashBox database on external server

Post by jgreene » Thu Apr 04, 2019 10:49 am

All I get is a blank page that says “cannot connect to the database” and nothing else.
jgreene
Posts: 79
Joined: Mon Aug 13, 2012 5:04 pm

Re: Hosting DashBox database on external server

Post by jgreene » Thu Apr 04, 2019 10:53 am

jgreene wrote:All I get is a blank page that says “cannot connect to the database” and nothing else.
And yes I did a complete dump of the database using the commands you posted in the forums. But I may have not done a step as I notice you say to do a backup, then restore, then do the dump which I did not do. I didn’t restore from a backup first and now it’s non-functional. I’m reluctant to do anything again without having the ability to completely test functionality before committing to the change and having the system lock me out. Hopefully this DB app you posted will at least get me back up and running.
ben
Site Admin
Posts: 4269
Joined: Fri Jun 04, 2010 9:39 am

Re: Hosting DashBox database on external server

Post by ben » Thu Apr 04, 2019 11:17 am

jgreene wrote:And yes I did a complete dump of the database using the commands you posted in the forums. But I may have not done a step as I notice you say to do a backup, then restore, then do the dump which I did not do. I didn’t restore from a backup first and now it’s non-functional. I’m reluctant to do anything again without having the ability to completely test functionality before committing to the change and having the system lock me out. Hopefully this DB app you posted will at least get me back up and running.
The user/pass it asks for is the user/pass on the card.

Can you check the error code the browser gives you before you switch it back? My guess is that it's missing an essential table for operation.

Login to the database on your server with the psql command (should be called brultech_dash), type in \dt and send me the list of tables it gives you (you can PM it if you want it private). I'll take a look to see if anythings missing. At a later point, I'll compile a list of required tables in order for the dashboard to operate.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
jgreene
Posts: 79
Joined: Mon Aug 13, 2012 5:04 pm

Re: Hosting DashBox database on external server

Post by jgreene » Thu Apr 04, 2019 11:52 am

I gave up on it last night so I went to do a screen capture for you of the error this morning and it’s workig. I don’t have time for it now but I’ll check later to see what database it thinks it is using. Unless you have already remoted in and that’s why it’s working?
ben
Site Admin
Posts: 4269
Joined: Fri Jun 04, 2010 9:39 am

Re: Hosting DashBox database on external server

Post by ben » Mon Apr 08, 2019 9:16 am

jgreene wrote:I gave up on it last night so I went to do a screen capture for you of the error this morning and it’s workig. I don’t have time for it now but I’ll check later to see what database it thinks it is using. Unless you have already remoted in and that’s why it’s working?
I didn't log onto it. Is it working with the remote database or local?
Ben
Brultech Research Inc.
E: ben(at)brultech.com
jgreene
Posts: 79
Joined: Mon Aug 13, 2012 5:04 pm

Re: Hosting DashBox database on external server

Post by jgreene » Mon Apr 08, 2019 10:38 am

ben wrote:
jgreene wrote:I gave up on it last night so I went to do a screen capture for you of the error this morning and it’s workig. I don’t have time for it now but I’ll check later to see what database it thinks it is using. Unless you have already remoted in and that’s why it’s working?
I didn't log onto it. Is it working with the remote database or local?
It started working with the local database. Maybe it times out after failing to connect to the remote database after some time?
Post Reply