Netflix / conductor-community

Apache License 2.0
61 stars 72 forks source link

Can't run Conductor with Postgres: Application failed to start #43

Open meilinkm opened 2 years ago

meilinkm commented 2 years ago

Describe the bug When I run the following command to deploy Conductor with Postgres: docker-compose -f docker-compose.yaml -f docker-compose-postgres.yaml up As described on https://conductor.netflix.com/architecture.html, I get the following messages:

conductor-server_1 | 18335 [main] INFO org.apache.catalina.core.StandardService [] - Stopping service [Tomcat] conductor-server_1 | 18442 [main] INFO org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener [] - conductor-server_1 | conductor-server_1 | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. conductor-server_1 | 18522 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter [] - conductor-server_1 | conductor-server_1 | conductor-server_1 | APPLICATION FAILED TO START conductor-server_1 | conductor-server_1 | conductor-server_1 | Description: conductor-server_1 | conductor-server_1 | Parameter 2 of constructor in com.netflix.conductor.core.execution.DeciderService required a bean of type 'com.netflix.conductor.dao.MetadataDAO' that could not be found. conductor-server_1 | conductor-server_1 | conductor-server_1 | Action: conductor-server_1 | conductor-server_1 | Consider defining a bean of type 'com.netflix.conductor.dao.MetadataDAO' in your configuration.

Running Conductor using Dynomite, using the following command, works just fine: docker-compose -f docker-compose.yaml -f docker-compose-dynomite.yaml up But it doesn't work with PostgreSQL.

Details Conductor version: v3.8.1 Persistence implementation: Postgres Queue implementation: N/A Lock: N/A Workflow definition: N/A Task definition: N/A Event handler definition: N/A

To Reproduce Steps to reproduce the behavior: Run command: docker-compose -f docker-compose.yaml -f docker-compose-postgres.yaml up

Expected behavior I expect Conductor to start up with PostgreSQL.

Screenshots N/A

Additional context Is there anything else needed to run Conductor with PostgreSQL (instead of Dynomite)? If so, where can I find documentation to run Conductor with PostgreSQL?

arielzadi commented 2 years ago

I am experiencing the same issue ever since the migration of the "contribs" module. I am building conductor locally from the source, maybe the build is not pulling the "conductor-community" modules? how can I check?

v1r3n commented 2 years ago

community modules are not pulled by the conductor-server by default. You will have to add the dependencies and rebuild conductor-server module for them to be included.

meilinkm commented 2 years ago

I'm confused by your statement. On https://github.com/Netflix/conductor-community, it says:

Does it change how I build Conductor or use the Conductor binaries? (Do I need to pull additional dependency in my builds going forward?)

Conductor (https://github.com/Netflix/conductor) pulls in all the dependencies from this repository as part of the conductor-server build. No additional changes are required to consume Conductor binaries.

Whenever I do a docker-compose build, should it automatically pull in all the dependencies or not? If it should, can you then please comment on why that's not working? If it should not pull in dependencies automatically, can you then please update https://github.com/Netflix/conductor-community so that it doesn't say that it will pull in dependences automatically and provide instructions how to add the dependencies ourselves?

mvaljakka commented 2 years ago

Experiencing the same issue. Without contemporary knowledge of the Gradle build- and Docker-compose setup, couldn't find a poper way out. Swithing the order of -f parameters made it start (I assumed that may affect library load order), but it seemed that the created PostgreSQL and Conductor containers were not aware of each other.

dcore94 commented 2 years ago

I'm trying to run a container using the community-server that is built directly inside the git repo conductor-community. Configuring conductor.db.type=postgres and getting the same error.

tanriverdiem commented 2 years ago

I was getting the same error too.

Adding "conductor.elasticsearch.clusterHealthColor=yellow" inside the "config-postgres.properties" configuration file also worked.

dcore94 commented 2 years ago

Does this https://github.com/Netflix/conductor-community/issues/91 actually solve?

johnico commented 2 years ago

@dcore94 managed to install in mac but in windows it still failed and after restarting it also crashes https://github.com/Netflix/conductor-community/issues/90

amimimor commented 2 years ago

I'm WIP on a fork but currently made it possible to run conductor3.9.2+es7+postgres on docker-compose and k8s (wip on Helm). When done I hope I'd be able to pull back into the source repo I've forked (that allows 3.5.1 to work on docker-compose). There is a whole lot of mess around the whole community build and the combination with the conductor-server. I am puzzled how such a significant and popular project doesn't have a decent way (at least in documentation) to deploy on something that resonates "production"

meilinkm commented 2 years ago

Based on your response, I've given it another try, while also looking at your fork. I am too looking for a production based Conductor install, that runs on Kubernetes, but I'm still unable to get Conductor to work properly with Postgres. I agree with you that the documentation is lacking information on how to configure Conductor with Postgres.

milhouse228 commented 2 years ago

Same problem and no idea to workaround.

dengguojie commented 2 years ago

how to fix? experience the same error while using docker-compose

amimimor commented 2 years ago

I made it work with Postgres11 while it failed to run against Postgres13 (RDS Postgres13). I’ve just pushed a couple of significant changes so have another look at it

On Tue, 12 Jul 2022 at 0:58 meilinkm @.***> wrote:

Based on your response, I've given it another try, while also looking at your fork. I am too looking for a production based Conductor install, that runs on Kubernetes, but I'm still unable to get Conductor to work properly with Postgres. I agree with you that the documentation is lacking information on how to configure Conductor with Postgres.

— Reply to this email directly, view it on GitHub https://github.com/Netflix/conductor-community/issues/43#issuecomment-1180910406, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHL4SQ2VR4IM766BNERXO3VTSKI3ANCNFSM5WC2RCNQ . You are receiving this because you commented.Message ID: @.***>

-- All the best, Amit Mor