I've been fighting to get external database to work but no success. Wiki page has instructions for Arch Linux, but it is not working to Jessie. I have tried to do same steps, but can't make it work.
Goal is to run database on one of Octoprint Raspberries and others to connect to this database.
Has anyone managed to get this working? Is there better instructions somewhere, tried to search..
All help is welcome. Thank You,
most of steps does not match with Jessie, commands does not exist or things are in different folders. I managedto install everything, I guess without errors, but I'm not too confident.
Not sure if virtual environment point went ok, but managed to install psyopg2.
On "host octoprint_filamentmanager octoprint 192.168.178.1/24 md5" instruction says "adapt IP to your network" Not clear which IP is to put here. I run Octoprint on 192.168.0.75, but should I use same address here too? I did but could not connect.
On database-tab, I did put Octoprint IP on URI and other points as in instructions, but test connection button stays red while pressing it.
It would be nice, if someone could make step-by-step instructions for latest Octoprint releases. Present instructions are for Linux enthusiast more than for average 3D-printer user.
All commands should be present if you have the postgresql and postgresql-client package installed (I just took a brief look at the Debian package list).
If your raspberry Pi IP is 192.168.0.75 you need to specify your network in the pg_hba.conf with 192.168.0.1/24.
The information from the log files might be interesting if the connection test fails.
I would make a guide for Raspbian too, but I haven't any unused SD card flying around right now.
Edit: If you are still running Jessie you should upgrade to Stretch or install the package from the backports repository otherwise you can run into issues, because there is at least version 9.5 required.
Without any experience with the filament manager plugin, if you are running OctoPi (which based on your log you are) this was wrong. OctoPi already has a virtual environment where OctoPrint and plugins are installed, and that's at /home/pi/oprint. So try ~/oprint/bin/pip install psycopg2.
Thanks. ~/oprint/bin/pip install psycopg2 did the trick. I was able to get test button green, but only on 192.168.0.75 which is my Octoprint and Filament Manager running.
So, I have two Octoprint's on network: one at 192.168.0.75 and other on 192.168.0.76.
192.168.0.75 is running database, Octoprint at 192.168.0.75 can connect to database (green button) and can add entries on database. Connection to database at settings page is possible only to address 192.168.0.75. On any other address 192.168.0.xxx connection test fails.
Other Octoprint running at 192.168.0.76 cannot connect to database at all. Tried 192.168.0.75 and other addresses 192.168.0.xxx
I have tried to change listen_addresses = '*' to listen_addresses = '0.0.0.0' but no difference.
So, what might be reason that other Octroprint with ilament Manager installed can connect to database?
Yes, I did. Octoprint (192.168.0.75) running database, can only make connection to database when URI ise set to: postgresql://192.168.0.75. If I use different address, no connection.
Other Octoprint at 192.168.0.76, cannot connect to database, no matter which IP is tried on URI.
Attached log, after rebooting.. There is some error on Filament Manager code.log2.log (8.6 KB)
Hmmm, did I understood somethng wrong here? I thought that:
One Raspberry Pi (Pi3 in my case) can run Octoprint and Filament Manager plugin with external database.
Other Raspberry Pi's running Octoprint and Filament Manager plugin, can connect to database running on 1.
Point 1 is working partially. Can connect to external database, add spool. But when selecting spool comes error, like on spool.log.
Point 2, is not working at all, cannot make connection to database located at another Pi.
Yes, followed guide, as said it works partially. If I can get it into state that connection to external database is ok, can add spool, but selecting gives error.
Have you done "sudo apt-get update" and "sudo apt-get upgrade"? The "update" will get the latest package database and the "upgrade" will update all of your installed packages to the latest version(s).
Yes, I have done that. To get postgresql to version >=9.5 is not that simple on Debian 8 Jessie. Trying to upgrade to Stretch. If it doesn't work, then install Stretch and try ti install Octoprint manually.