Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-13518

Unable to upgrade from 1.9 to 1.10 with external db

    XMLWordPrintable

Details

    • Bug
    • Status: Done
    • Blocker
    • Resolution: Done
    • fuse-7.7-GA
    • fuse-7.7-GA
    • Fuse Online

    Description

      When trying to upgrade from 1.9.0 installation with external database to 1.10.0-20200417, the upgrade fails, because the upgrade pod doesn't use the external db url:

       oc logs -f syndesis-operator-3-zmcdd                         
      {"level":"info","ts":1587379722.3738093,"logger":"cmd","msg":"Go Version: go1.13.7"}
      {"level":"info","ts":1587379722.3739097,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
      {"level":"info","ts":1587379722.3739154,"logger":"cmd","msg":"Version of operator-sdk: v0.16.0"}
      {"level":"info","ts":1587379722.3739192,"logger":"cmd","msg":"Syndesis Operator Version: 1.10.0-20200417"}
      {"level":"info","ts":1587379722.3739223,"logger":"cmd","msg":"Syndesis Operator Image: syndesis/syndesis-operator"}
      {"level":"info","ts":1587379724.7359009,"logger":"util","msg":"Connecting to PostgreSQL server running at syndesis-db:5432"}
      {"level":"info","ts":1587379724.7532244,"logger":"leader","msg":"Trying to become the leader."}
      {"level":"info","ts":1587379727.12557,"logger":"leader","msg":"No pre-existing lock was found."}
      {"level":"info","ts":1587379727.1322732,"logger":"leader","msg":"Became the leader."}
      {"level":"info","ts":1587379729.4878995,"logger":"controller-runtime.metrics","msg":"metrics server is starting to listen","addr":"0.0.0.0:8383"}
      {"level":"info","ts":1587379729.4882855,"logger":"cmd","msg":"registering resource schemes."}
      {"level":"info","ts":1587379734.356655,"logger":"metrics","msg":"Metrics Service object updated","Service.Name":"syndesis-operator-metrics","Service.Namespace":"avano-syndesis"}
      {"level":"info","ts":1587379736.725149,"logger":"cmd","msg":"Could not create ServiceMonitor object","error":"servicemonitors.monitoring.coreos.com \"syndesis-operator-metrics\" already exists"}
      {"level":"info","ts":1587379736.7255402,"logger":"controller-runtime.manager","msg":"starting metrics server","path":"/metrics"}
      {"level":"info","ts":1587379736.7256174,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"syndesis-controller","source":"kind source: /, Kind="}
      {"level":"info","ts":1587379736.826217,"logger":"controller-runtime.controller","msg":"Starting Controller","controller":"syndesis-controller"}
      {"level":"info","ts":1587379736.8262663,"logger":"controller-runtime.controller","msg":"Starting workers","controller":"syndesis-controller","worker count":1}
      {"level":"info","ts":1587379739.8347003,"logger":"controller","msg":"syndesis resource changed in the meantime, requeue and rerun in 5 seconds","name":"app"}
      {"level":"info","ts":1587379742.1930902,"logger":"action","msg":"Upgrading syndesis resource ","type":"upgrade","name":"app","current version":"1.9.0","target version":"1.10.0-20200417"}
      {"level":"info","ts":1587379742.1931305,"logger":"action","msg":"running step","type":"upgrade","step":"Scale down"}
      {"level":"info","ts":1587379742.193136,"logger":"action","msg":"scale DeploymentConfig","type":"upgrade","direction":"down","deployments":["syndesis-meta","syndesis-server"]}
      {"level":"info","ts":1587379742.2936752,"logger":"action","msg":"scaling DeploymentConfigs","type":"upgrade","name":"syndesis-meta","desired replicas":0,"replicas":1}
      {"level":"info","ts":1587379742.3227808,"logger":"action","msg":"scaling DeploymentConfigs","type":"upgrade","name":"syndesis-server","desired replicas":0,"replicas":1}
      {"level":"info","ts":1587379742.3409643,"logger":"action","msg":"waiting for DeploymentConfig to scale","type":"upgrade","direction":"down","deployments":["syndesis-meta","syndesis-server"]}
      {"level":"info","ts":1587379752.3414216,"logger":"action","msg":"deploymentConfig successfully scaled","type":"upgrade","name":"syndesis-meta","desired replicas":0,"available replicas":0}
      {"level":"info","ts":1587379752.3415859,"logger":"action","msg":"deploymentConfig successfully scaled","type":"upgrade","name":"syndesis-server","desired replicas":0,"available replicas":0}
      {"level":"info","ts":1587379752.3416238,"logger":"action","msg":"running step","type":"upgrade","step":"Backup"}
      {"level":"info","ts":1587379752.3416393,"logger":"backup","msg":"starting backup for syndesis","action":"backup"}
      {"level":"info","ts":1587379752.4336648,"logger":"backup","msg":"Initiating database backup ...","action":"backup"}
      {"level":"info","ts":1587379767.4874697,"logger":"backup","msg":"Backup compiler container terminated so extracting data from logger container","action":"backup"}
      {"level":"info","ts":1587379767.593211,"logger":"backup","msg":"Backup extraction to complete","action":"backup","Running time":"29s"}
      {"level":"info","ts":1587379767.606719,"logger":"backup","msg":"backup for syndesis done","action":"backup"}
      {"level":"info","ts":1587379767.6067426,"logger":"action","msg":"running step","type":"upgrade","step":"Database migration"}
      {"level":"info","ts":1587379777.8997693,"logger":"action","msg":"waiting for database migration to finish","type":"upgrade","active jobs":1,"running time":"20s"}
      {"level":"error","ts":1587379787.7988098,"logger":"action","msg":"error while running migrations","type":"upgrade","step":"Database migration","error":"job failed, 1","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/syndesisio/syndesis/install/operator/pkg/syndesis/upgrade.(*migration).run\n\tsrc/github.com/syndesisio/syndesis/install/operator/pkg/syndesis/upgrade/migrations.go:75\ngithub.com/syndesisio/syndesis/install/operator/pkg/syndesis/upgrade.(*upgrade).Upgrade\n\tsrc/github.com/syndesisio/syndesis/install/operator/pkg/syndesis/upgrade/upgrade.go:100\ngithub.com/syndesisio/syndesis/install/operator/pkg/syndesis/action.(*upgradeAction).Execute\n\tsrc/github.com/syndesisio/syndesis/install/operator/pkg/syndesis/action/upgrade.go:62\ngithub.com/syndesisio/syndesis/install/operator/pkg/controller/syndesis.(*ReconcileSyndesis).Reconcile\n\tsrc/github.com/syndesisio/syndesis/install/operator/pkg/controller/syndesis/syndesis_controller.go:125\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:256\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}
      {"level":"error","ts":1587379787.7989936,"logger":"action","msg":"Failure while upgrading Syndesis","type":"upgrade","name":"app","target version":"1.10.0-20200417","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/syndesisio/syndesis/install/operator/pkg/syndesis/action.(*upgradeAction).Execute\n\tsrc/github.com/syndesisio/syndesis/install/operator/pkg/syndesis/action/upgrade.go:69\ngithub.com/syndesisio/syndesis/install/operator/pkg/controller/syndesis.(*ReconcileSyndesis).Reconcile\n\tsrc/github.com/syndesisio/syndesis/install/operator/pkg/controller/syndesis/syndesis_controller.go:125\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:256\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}
      {"level":"info","ts":1587379787.7990344,"logger":"action","msg":"rolling back step","type":"upgrade","step":"Scale down"}
      {"level":"info","ts":1587379787.7990565,"logger":"action","msg":"scale DeploymentConfig","type":"upgrade","direction":"down","deployments":["syndesis-meta","syndesis-server"]}
      {"level":"info","ts":1587379787.7991545,"logger":"action","msg":"waiting for DeploymentConfig to scale","type":"upgrade","direction":"down","deployments":["syndesis-meta","syndesis-server"]}
      {"level":"info","ts":1587379797.7994883,"logger":"action","msg":"deploymentConfig successfully scaled","type":"upgrade","name":"syndesis-meta","desired replicas":0,"available replicas":0}
      {"level":"info","ts":1587379797.7995703,"logger":"action","msg":"deploymentConfig successfully scaled","type":"upgrade","name":"syndesis-server","desired replicas":0,"available replicas":0}
      {"level":"info","ts":1587379797.7995875,"logger":"action","msg":"rolling back step","type":"upgrade","step":"Database migration"}
      
      oc logs -f upgrade-db-migration-qdfxt                           
      +(/opt/entrypoint.sh:75): migrate_db
      ++(/opt/entrypoint.sh:43): migrate_db(): readopt --user
      ++(/opt/common.sh:173): readopt(): filters=--user
      ++(/opt/common.sh:174): readopt(): next=false
      ++(/opt/common.sh:175): readopt(): for var in '"${ARGS[@]}"'
      ++(/opt/common.sh:176): readopt(): false
      ++(/opt/common.sh:180): readopt(): for filter in '$filters'
      ++(/opt/common.sh:181): readopt(): [[ --user = --user* ]]
      ++(/opt/common.sh:182): readopt(): local value=--user
      ++(/opt/common.sh:183): readopt(): '[' --user '!=' --user ']'
      ++(/opt/common.sh:187): readopt(): next=true
      ++(/opt/common.sh:175): readopt(): for var in '"${ARGS[@]}"'
      ++(/opt/common.sh:176): readopt(): true
      ++(/opt/common.sh:177): readopt(): echo testuser
      ++(/opt/common.sh:178): readopt(): break
      +(/opt/entrypoint.sh:43): migrate_db(): local user=testuser
      +(/opt/entrypoint.sh:44): migrate_db(): [[ -z testuser ]]
      ++(/opt/entrypoint.sh:48): migrate_db(): readopt --pass
      ++(/opt/common.sh:173): readopt(): filters=--pass
      ++(/opt/common.sh:174): readopt(): next=false
      ++(/opt/common.sh:175): readopt(): for var in '"${ARGS[@]}"'
      ++(/opt/common.sh:176): readopt(): false
      ++(/opt/common.sh:180): readopt(): for filter in '$filters'
      ++(/opt/common.sh:181): readopt(): [[ --user = --pass* ]]
      ++(/opt/common.sh:175): readopt(): for var in '"${ARGS[@]}"'
      ++(/opt/common.sh:176): readopt(): false
      ++(/opt/common.sh:180): readopt(): for filter in '$filters'
      ++(/opt/common.sh:181): readopt(): [[ testuser = --pass* ]]
      ++(/opt/common.sh:175): readopt(): for var in '"${ARGS[@]}"'
      ++(/opt/common.sh:176): readopt(): false
      ++(/opt/common.sh:180): readopt(): for filter in '$filters'
      ++(/opt/common.sh:181): readopt(): [[ --pass = --pass* ]]
      ++(/opt/common.sh:182): readopt(): local value=--pass
      ++(/opt/common.sh:183): readopt(): '[' --pass '!=' --pass ']'
      ++(/opt/common.sh:187): readopt(): next=true
      ++(/opt/common.sh:175): readopt(): for var in '"${ARGS[@]}"'
      ++(/opt/common.sh:176): readopt(): true
      ++(/opt/common.sh:177): readopt(): echo testpassword
      ++(/opt/common.sh:178): readopt(): break
      +(/opt/entrypoint.sh:48): migrate_db(): local pass=testpassword
      +(/opt/entrypoint.sh:49): migrate_db(): [[ -z testpassword ]]
      ++(/opt/entrypoint.sh:53): migrate_db(): readopt --url
      ++(/opt/common.sh:173): readopt(): filters=--url
      ++(/opt/common.sh:174): readopt(): next=false
      ++(/opt/common.sh:175): readopt(): for var in '"${ARGS[@]}"'
      ++(/opt/common.sh:176): readopt(): false
      ++(/opt/common.sh:180): readopt(): for filter in '$filters'
      ++(/opt/common.sh:181): readopt(): [[ --user = --url* ]]
      ++(/opt/common.sh:175): readopt(): for var in '"${ARGS[@]}"'
      ++(/opt/common.sh:176): readopt(): false
      ++(/opt/common.sh:180): readopt(): for filter in '$filters'
      ++(/opt/common.sh:181): readopt(): [[ testuser = --url* ]]
      ++(/opt/common.sh:175): readopt(): for var in '"${ARGS[@]}"'
      ++(/opt/common.sh:176): readopt(): false
      ++(/opt/common.sh:180): readopt(): for filter in '$filters'
      ++(/opt/common.sh:181): readopt(): [[ --pass = --url* ]]
      ++(/opt/common.sh:175): readopt(): for var in '"${ARGS[@]}"'
      ++(/opt/common.sh:176): readopt(): false
      ++(/opt/common.sh:180): readopt(): for filter in '$filters'
      ++(/opt/common.sh:181): readopt(): [[ testpassword = --url* ]]
      ++(/opt/common.sh:175): readopt(): for var in '"${ARGS[@]}"'
      ++(/opt/common.sh:176): readopt(): false
      ++(/opt/common.sh:180): readopt(): for filter in '$filters'
      ++(/opt/common.sh:181): readopt(): [[ --url = --url* ]]
      ++(/opt/common.sh:182): readopt(): local value=--url
      ++(/opt/common.sh:183): readopt(): '[' --url '!=' --url ']'
      ++(/opt/common.sh:187): readopt(): next=true
      ++(/opt/common.sh:175): readopt(): for var in '"${ARGS[@]}"'
      ++(/opt/common.sh:176): readopt(): true
      ++(/opt/common.sh:177): readopt(): echo 'postgresql://syndesis-db:5432/syndesis?sslmode=disable'
      ++(/opt/common.sh:178): readopt(): break
      +(/opt/entrypoint.sh:53): migrate_db(): local 'url=postgresql://syndesis-db:5432/syndesis?sslmode=disable'
      +(/opt/entrypoint.sh:54): migrate_db(): [[ -z postgresql://syndesis-db:5432/syndesis?sslmode=disable ]]
      +(/opt/entrypoint.sh:58): migrate_db(): java -jar /opt/syndesis-cli.jar migrate '--url=jdbc:postgresql://syndesis-db:5432/syndesis?sslmode=disable' --user=testuser --password=testpassword
      10:52:23.513 Unable to create initial connections of pool.
      org.postgresql.util.PSQLException: The connection attempt failed.
      	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:292)
      	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
      	at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195)
      	at org.postgresql.Driver.makeConnection(Driver.java:454)
      	at org.postgresql.Driver.connect(Driver.java:256)
      	at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319)
      	at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)
      	at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:744)
      	at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:676)
      	at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483)
      	at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)
      	at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
      	at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
      	at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
      	at org.skife.jdbi.v2.DataSourceConnectionFactory.openConnection(DataSourceConnectionFactory.java:34)
      	at org.skife.jdbi.v2.DBI.open(DBI.java:211)
      	at io.syndesis.server.jsondb.impl.SqlJsonDB.withTransaction(SqlJsonDB.java:560)
      	at io.syndesis.server.jsondb.impl.SqlJsonDB.<init>(SqlJsonDB.java:110)
      	at io.syndesis.server.runtime.DataStoreConfiguration.jsonDB(DataStoreConfiguration.java:69)
      	at io.syndesis.server.runtime.DataStoreConfiguration$$EnhancerBySpringCGLIB$$d42ead30.CGLIB$jsonDB$0(<generated>)
      	at io.syndesis.server.runtime.DataStoreConfiguration$$EnhancerBySpringCGLIB$$d42ead30$$FastClassBySpringCGLIB$$e41980ce.invoke(<generated>)
      	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
      	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
      	at io.syndesis.server.runtime.DataStoreConfiguration$$EnhancerBySpringCGLIB$$d42ead30.jsonDB(<generated>)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
      	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622)
      	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:607)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
      	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171)
      	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857)
      	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760)
      	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:218)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1341)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1187)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
      	at io.syndesis.server.cli.command.SyndesisCommand.createContext(SyndesisCommand.java:83)
      	at io.syndesis.server.cli.command.SyndesisCommand.call(SyndesisCommand.java:51)
      	at com.kakawait.spring.boot.picocli.autoconfigure.PicocliCommandLineRunner.run(PicocliCommandLineRunner.java:64)
      	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:779)
      	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:763)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:318)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202)
      	at io.syndesis.server.cli.main.SyndesisCommandLine.main(SyndesisCommandLine.java:51)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:47)
      	at org.springframework.boot.loader.Launcher.launch(Launcher.java:86)
      	at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
      	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
      Caused by: java.net.UnknownHostException: syndesis-db
      	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
      	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
      	at java.net.Socket.connect(Socket.java:607)
      	at org.postgresql.core.PGStream.<init>(PGStream.java:70)
      	at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:91)
      	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192)
      	... 72 common frames omitted
      10:52:23.522 Application run failed
      java.lang.IllegalStateException: Failed to execute CommandLineRunner
      	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:782)
      	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:763)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:318)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202)
      	at io.syndesis.server.cli.main.SyndesisCommandLine.main(SyndesisCommandLine.java:51)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:47)
      	at org.springframework.boot.loader.Launcher.launch(Launcher.java:86)
      	at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
      	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
      Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'integrationJsonDbDao' defined in URL [jar:file:/opt/syndesis-cli.jar!/BOOT-INF/lib/server-jsondb-1.10.0-20200417.jar!/io/syndesis/server/jsondb/dao/IntegrationJsonDbDao.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonDB' defined in class path resource [io/syndesis/server/runtime/DataStoreConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.syndesis.server.jsondb.impl.SqlJsonDB]: Factory method 'jsonDB' threw exception; nested exception is org.skife.jdbi.v2.exceptions.UnableToObtainConnectionException: org.postgresql.util.PSQLException: The connection attempt failed.
      	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769)
      	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:218)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1341)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1187)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
      	at io.syndesis.server.cli.command.SyndesisCommand.createContext(SyndesisCommand.java:83)
      	at io.syndesis.server.cli.command.SyndesisCommand.call(SyndesisCommand.java:51)
      	at com.kakawait.spring.boot.picocli.autoconfigure.PicocliCommandLineRunner.run(PicocliCommandLineRunner.java:64)
      	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:779)
      	... 13 common frames omitted
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonDB' defined in class path resource [io/syndesis/server/runtime/DataStoreConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.syndesis.server.jsondb.impl.SqlJsonDB]: Factory method 'jsonDB' threw exception; nested exception is org.skife.jdbi.v2.exceptions.UnableToObtainConnectionException: org.postgresql.util.PSQLException: The connection attempt failed.
      	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627)
      	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:607)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
      	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171)
      	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857)
      	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760)
      	... 29 common frames omitted
      Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.syndesis.server.jsondb.impl.SqlJsonDB]: Factory method 'jsonDB' threw exception; nested exception is org.skife.jdbi.v2.exceptions.UnableToObtainConnectionException: org.postgresql.util.PSQLException: The connection attempt failed.
      	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
      	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622)
      	... 43 common frames omitted
      Caused by: org.skife.jdbi.v2.exceptions.UnableToObtainConnectionException: org.postgresql.util.PSQLException: The connection attempt failed.
      	at org.skife.jdbi.v2.DBI.open(DBI.java:229)
      	at io.syndesis.server.jsondb.impl.SqlJsonDB.withTransaction(SqlJsonDB.java:560)
      	at io.syndesis.server.jsondb.impl.SqlJsonDB.<init>(SqlJsonDB.java:110)
      	at io.syndesis.server.runtime.DataStoreConfiguration.jsonDB(DataStoreConfiguration.java:69)
      	at io.syndesis.server.runtime.DataStoreConfiguration$$EnhancerBySpringCGLIB$$d42ead30.CGLIB$jsonDB$0(<generated>)
      	at io.syndesis.server.runtime.DataStoreConfiguration$$EnhancerBySpringCGLIB$$d42ead30$$FastClassBySpringCGLIB$$e41980ce.invoke(<generated>)
      	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
      	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
      	at io.syndesis.server.runtime.DataStoreConfiguration$$EnhancerBySpringCGLIB$$d42ead30.jsonDB(<generated>)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
      	... 44 common frames omitted
      Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
      	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:292)
      	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
      	at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195)
      	at org.postgresql.Driver.makeConnection(Driver.java:454)
      	at org.postgresql.Driver.connect(Driver.java:256)
      	at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319)
      	at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)
      	at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:744)
      	at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:676)
      	at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483)
      	at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)
      	at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
      	at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
      	at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
      	at org.skife.jdbi.v2.DataSourceConnectionFactory.openConnection(DataSourceConnectionFactory.java:34)
      	at org.skife.jdbi.v2.DBI.open(DBI.java:211)
      	... 57 common frames omitted
      Caused by: java.net.UnknownHostException: syndesis-db
      	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
      	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
      	at java.net.Socket.connect(Socket.java:607)
      	at org.postgresql.core.PGStream.<init>(PGStream.java:70)
      	at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:91)
      	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192)
      	... 72 common frames omitted
      

      here is the CR:

      oc get syndesis app -o yaml               
      apiVersion: syndesis.io/v1beta1
      kind: Syndesis
      metadata:
        annotations:
          syndesis.io/applicationUrl: https://syndesis-avano-syndesis.apps.fo-43-a.openshift-aws.rhocf-dev.com
        creationTimestamp: "2020-04-20T10:44:14Z"
        generation: 8
        name: app
        namespace: avano-syndesis
        resourceVersion: "17265660"
        selfLink: /apis/syndesis.io/v1beta1/namespaces/avano-syndesis/syndesises/app
        uid: 980b414f-d317-4089-a979-1254c1efaf62
      spec:
        addons:
          camelk: {}
          dv:
            resources: {}
          jaeger: {}
          knative: {}
          ops: {}
          publicApi: {}
          todo: {}
        backup: {}
        components:
          database:
            externalDbURL: postgresql://custom-postgres:5432
            name: testdb
            resources: {}
            user: testuser
          grafana:
            resources: {}
          meta:
            resources: {}
          oauth: {}
          prometheus:
            resources: {}
          server:
            features: {}
            resources: {}
          upgrade:
            resources: {}
        forceMigration: false
      status:
        backup: {}
        description: Upgrading from 1.9.0 to 1.10.0-20200417 (attempt 2)
        forceUpgrade: true
        lastUpgradeFailure: "2020-04-20T10:50:56Z"
        phase: Upgrading
        targetVersion: 1.10.0-20200417
        upgradeAttempts: 1
        version: 1.9.0
      
      

      Attachments

        Activity

          People

            parichar@redhat.com Paul Richardson
            avano@redhat.com Andrej Vano
            Andrej Vano Andrej Vano
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: