Catalog does not fill on postgresql which is on a synology nas

Post Reply
willswing77
Posts: 4
Joined: 26 Nov 16 23:01

Catalog does not fill on postgresql which is on a synology nas

Post by willswing77 » 27 Nov 16 17:41

Hi,
as a newbie on PSU (and still on a trial version) I managed to install Photo Supreme Postgres Server edition. The catalog lies on my synology NAS (thanks to some articles found in the forum). After some postgresql customizing via phpPgAdmin (e.g. I had to configure text search configuration there) I was able to start PSU with that newly created catalog.
I see the database with all the tables and an additional _thumbs database via phpPgAdmin. However, when I try to import photos into that catalog nothing happens. After 10 seconds or so I reveive a message telling me "import finished without result. Maybe your photos are already catalogued..."
What could be the problem?
Thanks for any help.

weidmic
moderator
Posts: 2855
Joined: 04 Dec 06 22:21

Re: Catalog does not fill on postgresql which is on a synology nas

Post by weidmic » 27 Nov 16 20:35

Hello willswing77,
welcome to the forum!

Wow, would you mind to share what synology NAS you have and what you did to get PSU running on it?
I have spent hours to get it to run but my missing knowlegde in regard of postgres config and everything around made me give up on it.

Right now I run postgres on my windows 10 machine but would love to switch to synology :)

Sorry I can't help with your question.

Michael
PSUServer 4.x, PostgreSQL 10.x
My homepage http://www.michaelweidner.com
PSU Tips and Tricks http://www.michaelweidner.com/WP/psu/

willswing77
Posts: 4
Joined: 26 Nov 16 23:01

Re: Catalog does not fill on postgresql which is on a synology nas

Post by willswing77 » 01 Dec 16 20:41

Hi Michael
sorry for the delay, I was very busy the last few days.
I own a DS710+ with DSM 5.2 As you might know the synology NAS already have a built-in Postgresql DB which is used for internal applications like photo station or download station. So it is important not to mess with it, otherwise these apps will not work anymore.
It costed me hours of googling and testing, but finally i got it working. The main obstacle looking back was to get phpPgAdmin running. This is the frontend database management for Postgres, similar to phpMyAdmin for MySQL.
I followed this weblink to get it running: http://www.web3.lu/synology-photostatio ... -database/

After phpPgAdmin ran I was able to log into Postgres on my diskstation and knew which passwords were good (User: admin, PW from your syno login).

I am still stuck trying to fill the catalog. So for the moment the solution is useless for me.

amartel
Posts: 17
Joined: 16 Jul 16 17:03

Re: Catalog does not fill on postgresql which is on a synology nas

Post by amartel » 01 Dec 16 22:37

Hi,

I don't have any trouble with my synology NAS (DS916+) and PSU (mac client) but I don't use the internal postgresql database. My solution was to install the docker package (very easy to do) + postgresql 9.5.2. I don't remember all the installation process but it was not very difficult...
This solution has also a big advantage : no problem with DSM upgrades!
I'm not sure that docker is available with DSM 5 but if you can upgrade to DSM 6, give a try to docker + postgresql. This should resolve all your problems...

Hert
Posts: 15918
Joined: 13 Sep 03 7:24

Re: Catalog does not fill on postgresql which is on a synology nas

Post by Hert » 02 Dec 16 8:43

Below is a write up that a customer sent me through email some time ago. I did try it back then on my 216+and it worked. I don't know if it still works but thought I'd share it anyway.



Basic steps for getting Postgres to work on Synology:

Login to disk station as admin

Go to package manager

Go to Package Manager>Settings. Set Trust Level to “Any publisher”. (You can reset this when you are finished.)

Go to Package Manager>Package Sources. Add Name: “Community Package Hub”, Location: “https://www.cphub.net

Go to Community Tab in Package Manager. Install Easy Bootstrap Installer. Run it and select the default option, which is entware/opkg

Go to Community Tab in Package Manager. Install iPKGui. Run it (you can access it from the menu start bar at the top of the web page)

Go to the All tab and install the following packages:
pgsql-cli (right click and select install, then follow prompts)
pgsql-server (you may also need to select overwrite from the Installation submenu)
Finally hit Apply at the top of the IPKGui window.

You have now installed another copy of Postgres (9.4.4) onto the Synology disk station (it is in /opt). While I believe it is possible to skip installing a different postgres and just using Synology’s version (9.3), the advantage is that you get a later one and also you don’t have to worry there were weird configuration parameters in Synology’s version.

Ssh to the Synology from your desktop machine. (Make sure this option is enabled in Control Panel>Terminal & SNMP) On a Mac you can go to the terminal window and type “ssh -l root diskstation”. On a PC use putty.

Make a new database cluster:
mkdir -p /opt/var/services/pgsql
chown postgres:postgres /opt/var/services/pgsql
I put it in this directory to parallel how Synology does it, but also to keep it off the system partition (/opt is linked to one of your volumes).

su - postgres
(the rest needs to be done as the postgres user)

PATH=/opt/bin:$PATH
(make sure to call the correct versions of the postgres programs)

initdb -D /opt/var/services/pgsql [—pwprompt] [—nosync]
(optional additional arguments: —nosync if you are running btrfs file system, —pwprompt if you want to password protect the postgres user)

cd /opt/var/services/pgsql
Edit pg-hba.conf and add a line to accept connections from the local net as well as the loopback driver. Note my synology sits behind a firewall.

# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all samenet trust

Edit postgresql.conf. Change:
listen_addresses=‘*’

port=5433
These are the most important. You need to listen on all interfaces for connections, and you need to run with a different port than the Synology server. I haven’t done any other changes at this point, although probably there should be some tuning and changing the default location of the locking, logging, etc.

Start the postgres server:
postgres -D /opt/var/services/pgsql >logfile 2>&1 &

This will log to logfile in the current directory. Obviously this will need to be changed to log into a Synology standard location at some point.

You should now have a working Synology postgres. You can test using psql -h diskstation -p 5433 -U postgres from the Mac (or synology) command line, running phpadmin III with the correct connection parameters, or just go for it and run the PSU server edition.
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

weidmic
moderator
Posts: 2855
Joined: 04 Dec 06 22:21

Re: Catalog does not fill on postgresql which is on a synology nas

Post by weidmic » 02 Dec 16 17:53

Thank you all for your responses...
I will give it another shot :)

Michael

FYI: I have the DS1513+ and run the latest DSM 6.0.2
PSUServer 4.x, PostgreSQL 10.x
My homepage http://www.michaelweidner.com
PSU Tips and Tricks http://www.michaelweidner.com/WP/psu/

willswing77
Posts: 4
Joined: 26 Nov 16 23:01

Re: Catalog does not fill on postgresql which is on a synology nas

Post by willswing77 » 02 Dec 16 23:50

This is a perfect tutorial. Thanks! :D
It worked for me as described above. The only thing was that I had to do some cleanup on my synology first (remove old bootstrap and ipkg configs).

Post Reply