Thank you all, I have a bit more information. It isn't working perfectly yet but I am pretty close. The issue that I was having before appeared to be related to running postgres as a statefulset in K8s (mulitple pods working together) and setting up postgres with a master--> Slave model.
I was able to get syncope running just fine if I had a single primary database. This is a good sign but not good enough for an actual production install. There were two main issues: 1. No backups or replication which isn't realistic for a production install 2. For some reason, if I do manually scale up (or restart) the database then Syncope (and also console and enduser) crashes and burns. I had to restart them as well for it to pick up the new database. This is obviously an untenable solution as K8s is built around the idea of ephemeral pods. 3. Syncope is very slow and a bit of a memory hog - I had to throw a bunch of memory and CPU at it to get it to be performant. Not a big deal but certainly not ideal to have such large docker containers. None the less, I appear to be making progress. Any ideas would be helpful but I will keep on pushing. I do have a holiday starting tomorrow so it will be a couple weeks before I can pick this back up. Thank you all for your help so far. Craig On Tue, Aug 7, 2018 at 1:16 AM Andrea Patricelli < andreapatrice...@apache.org> wrote: > Hi Craig, > > > Il 07/08/2018 08:30, Francesco Chicchiriccò ha scritto: > > On 07/08/2018 00:03, craig wrote: > >> I am setting up syncope in Kubernetes. I will be happy to > >> contribute my > >> yamls once I get it running as it doesn't seem to be a common setup for > >> Syncope. > > > > This sounds great, it would be a great addition, maybe to place right > > after > > > > > https://syncope.apache.org/docs/getting-started.html#docker-compose-samples > > > > > >> I am new to Syncope and I am having some issues. > >> > >> I was able to get the docker-compose examples working just fine but > >> having > >> connectivity issues when running in K8s. Without knowing Syncope > >> (or even > >> postgres) that well I am struggling on where to start. > >> > >> Issue: Syncope cannot connect to postgres:5432 > >> > >> 20:49:13.640 ERROR > >> org.flowable.common.engine.impl.AbstractEngineConfiguration - Exception > >> while initializing Database connection > >> org.postgresql.util.PSQLException: Connection to postgres:5432 refused. > >> Check that the hostname and port are correct and that the postmaster is > >> accepting TCP/IP connections. > >> [...] > > Did you set a password for the user "syncope" like explained at [1]? > > Is connectivity on protocol TCP allowed on your postgres instance? > BTW I found something (maybe) useful for you at [2]. > > > > > Were the Syncope tables (SyncopeUser, for example) created, in the > > database? Were the Flowable (e.g. ACT_*) and Quartz (e.g. QRTZ_*) > > created as well? > > > > Did you setup any connection control on the postgresql container? > > > >> Things that I did: > >> > >> 1) Connect to database directly from postgres container command line > >> "psql > >> -U syncope" > >> 2) Connect to database from syncope container command line "psql -U > >> syncope > >> -h postgres" > > > > Since this works, I cannot figure out why you get the exception above... > > > >> 3) Confirm that the port 5432 is open by running the command "telnet > >> postgres 5432" and it was open > >> 4) Confirm that both a database named "syncope" and user named > >> "syncope" > >> exist in the postgres database > >> 5) Confirmed the configuration of K8s looks correct. The port > >> appears to > >> be up, the replica sets look correct > >> > >> Any help or guidance on things to look at would be helpful. > >> > >> Craig > > > > HTH, > Andrea > > [1] https://syncope.apache.org/docs/reference-guide.html#postgresql > [2] > > https://blog.bigbinary.com/2016/01/23/configure-postgresql-to-allow-remote-connection.html > > -- > Dott. Andrea Patricelli > Tel. +39 3204524292 > > Developer @ Tirasa S.r.l. > Viale D'Annunzio 267 - 65127 Pescara > Tel +39 0859116307 / FAX +39 0859111173 > http://www.tirasa.net > > Apache Syncope PMC Member > >