Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulsar manager backend failed to start on v0.4.0 #365

Closed
packageman opened this issue Jun 5, 2023 · 10 comments
Closed

Pulsar manager backend failed to start on v0.4.0 #365

packageman opened this issue Jun 5, 2023 · 10 comments

Comments

@packageman
Copy link

Describe the bug

The pulsar manager backend keeps getting restarted.

apache/pulsar-manager#517

Screenshots

image image
@frodeopdahl
Copy link

I am having the same issue, but with all versions of Pulsar manager that I have tested. From reading the pulsar-manager.logs it seems to be a problem with connecting with the postgres db?

@gh777777
Copy link

gh777777 commented Jun 9, 2023

I am having the same issue, but with all versions of Pulsar manager that I have tested. From reading the pulsar-manager.logs it seems to be a problem with connecting with the postgres db?

Me too! My Pulsar Manager version in pulsar-helm-chart is v0.3.0. Here is the pulsar-manager.log:

2023-06-09 10:45:35.456  INFO 33881 --- [pool-2-thread-1] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2023-06-09 10:45:36.502 ERROR 33881 --- [pool-2-thread-1] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Exception during pool initialization.

org.postgresql.util.PSQLException: Connection to 127.0.0.1:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:280) ~[postgresql-42.2.5.jar:42.2.5]
	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) ~[postgresql-42.2.5.jar:42.2.5]
	at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195) ~[postgresql-42.2.5.jar:42.2.5]
	at org.postgresql.Driver.makeConnection(Driver.java:454) ~[postgresql-42.2.5.jar:42.2.5]
	at org.postgresql.Driver.connect(Driver.java:256) ~[postgresql-42.2.5.jar:42.2.5]
	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:117) ~[HikariCP-2.7.9.jar:na]
	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:123) ~[HikariCP-2.7.9.jar:na]
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:365) ~[HikariCP-2.7.9.jar:na]
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:194) ~[HikariCP-2.7.9.jar:na]
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:460) [HikariCP-2.7.9.jar:na]
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:534) [HikariCP-2.7.9.jar:na]
	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) [HikariCP-2.7.9.jar:na]
	at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) [HikariCP-2.7.9.jar:na]
	at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:151) [spring-jdbc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:115) [spring-jdbc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:78) [spring-jdbc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:80) [mybatis-spring-2.0.4.jar:2.0.4]
	at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67) [mybatis-spring-2.0.4.jar:2.0.4]
	at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:336) [mybatis-3.5.4.jar:3.5.4]
	at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:86) [mybatis-3.5.4.jar:3.5.4]
	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62) [mybatis-3.5.4.jar:3.5.4]
	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324) [mybatis-3.5.4.jar:3.5.4]
	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) [mybatis-3.5.4.jar:3.5.4]
	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) [mybatis-3.5.4.jar:3.5.4]
	at com.github.pagehelper.util.ExecutorUtil.executeAutoCount(ExecutorUtil.java:138) [pagehelper-5.1.11.jar:na]
	at com.github.pagehelper.PageInterceptor.count(PageInterceptor.java:150) [pagehelper-5.1.11.jar:na]
	at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:97) [pagehelper-5.1.11.jar:na]
	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) [mybatis-3.5.4.jar:3.5.4]
	at com.sun.proxy.$Proxy186.query(Unknown Source) [na:na]
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147) [mybatis-3.5.4.jar:3.5.4]
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) [mybatis-3.5.4.jar:3.5.4]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_312]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_312]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_312]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_312]
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426) [mybatis-spring-2.0.4.jar:2.0.4]
	at com.sun.proxy.$Proxy136.selectList(Unknown Source) [na:na]
	at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:223) [mybatis-spring-2.0.4.jar:2.0.4]
	at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147) [mybatis-3.5.4.jar:3.5.4]
	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80) [mybatis-3.5.4.jar:3.5.4]
	at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:144) [mybatis-3.5.4.jar:3.5.4]
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85) [mybatis-3.5.4.jar:3.5.4]
	at com.sun.proxy.$Proxy141.findEnvironmentsList(Unknown Source) [na:na]
	at org.apache.pulsar.manager.dao.EnvironmentsRepositoryImpl.getEnvironmentsList(EnvironmentsRepositoryImpl.java:58) [pulsar-manager.jar:na]
	at org.apache.pulsar.manager.dao.EnvironmentsRepositoryImpl$$FastClassBySpringCGLIB$$30650f82.invoke(<generated>) [pulsar-manager.jar:na]
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) [spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) [spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) [spring-tx-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) [spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) [spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at org.apache.pulsar.manager.dao.EnvironmentsRepositoryImpl$$EnhancerBySpringCGLIB$$3c7344c0.getEnvironmentsList(<generated>) [pulsar-manager.jar:na]
	at org.apache.pulsar.manager.service.impl.EnvironmentCacheServiceImpl.reloadEnvironments(EnvironmentCacheServiceImpl.java:139) [pulsar-manager.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_312]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_312]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_312]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_312]
	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) [spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_312]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_312]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_312]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_312]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_312]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_312]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_312]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
	at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_312]
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_312]
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_312]
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_312]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_312]
	at java.net.Socket.connect(Socket.java:607) ~[na:1.8.0_312]
	at org.postgresql.core.PGStream.<init>(PGStream.java:70) ~[postgresql-42.2.5.jar:42.2.5]
	at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:91) ~[postgresql-42.2.5.jar:42.2.5]
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192) ~[postgresql-42.2.5.jar:42.2.5]
	... 65 common frames omitted

2023-06-09 10:45:36.503  INFO 33881 --- [main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2023-06-09 10:45:36.514 ERROR 33881 --- [pool-2-thread-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task.

Maybe something wrong with values.yaml? Here are some default values:

pulsar_manager:
  component: pulsar-manager
  replicaCount: 1
  configData:
    REDIRECT_HOST: "http://127.0.0.1"
    REDIRECT_PORT: "9527"
    DRIVER_CLASS_NAME: org.postgresql.Driver
    URL: jdbc:postgresql://127.0.0.1:5432/pulsar_manager
    LOG_LEVEL: DEBUG

@gh777777
Copy link

gh777777 commented Jun 9, 2023

I am having the same issue, but with all versions of Pulsar manager that I have tested. From reading the pulsar-manager.logs it seems to be a problem with connecting with the postgres db?

Me too! My Pulsar Manager version in pulsar-helm-chart is v0.3.0. Here is the pulsar-manager.log:
......

Here is a fix. At least it works for v0.3.0.

@shlomitubul
Copy link

I did try to run it on OpenShift but it didn't work (I add the ENV var), the backend kept crashing

@alpreu
Copy link

alpreu commented Dec 29, 2023

@shlomitubul pulsar-manager does not support running on OpenShift. You can try @streamvisor as a free alternative though

@shlomitubul
Copy link

shlomitubul commented Dec 30, 2023

@alpreu interesting, can you elaborate why? aside from things like running as root that can be solved by proper scc,
regarding streamvisor, I saw license secret so im wondering if it free

@alpreu
Copy link

alpreu commented Dec 31, 2023

@alpreu interesting, can you elaborate why? aside from things like running as root that can be solved by proper scc,

You would have to change the pulsar-manager docker image but the project is not really maintained anymore (there is a thread on the pulsar mailing list asking for maintainers)

regarding streamvisor, I saw license secret so im wondering if it free

We offer a paid version with enterprise features such as RBAC etc. but the community version is completely free

@shlomitubul
Copy link

shlomitubul commented Feb 2, 2024

@packageman I able to make it working, you can take alook here

@lhotari
Copy link
Member

lhotari commented Feb 14, 2024

Fixed by #457

@lhotari lhotari closed this as completed Feb 14, 2024
@lhotari
Copy link
Member

lhotari commented Feb 14, 2024

We offer a paid version with enterprise features such as RBAC etc. but the community version is completely free

@alpreu Please stop spamming Apache issue trackers with your advertisements. That is completely inappropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants