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: ERROR: relation "environments" does not exist #519

Open
schmidp opened this issue Aug 17, 2024 · 3 comments
Open

Pulsar Manager: ERROR: relation "environments" does not exist #519

schmidp opened this issue Aug 17, 2024 · 3 comments

Comments

@schmidp
Copy link

schmidp commented Aug 17, 2024

Describe the bug
I am trying to setup a development pulsar environment in Kubernetes and pulsar-manager does not seem to work out of the box.
I see the following log in the postgresql db log:

2024-08-17 12:36:46.349 GMT [7231] STATEMENT:  SELECT count(0) FROM environments
2024-08-17 12:36:46.358 GMT [7231] ERROR:  relation "environments" does not exist at character 22

and in the pulsar-manager.log

2024-08-17 12:38:15.909  INFO 15019 --- [main] o.a.p.manager.EmbeddedTomcatCustomizer   : Starting servletContainer
2024-08-17 12:38:16.015  INFO 15019 --- [main] o.a.p.manager.EmbeddedTomcatCustomizer   : Starting Tomcat Customizer
2024-08-17 12:38:16.135  INFO 15019 --- [main] o.a.p.manager.EmbeddedTomcatCustomizer   : Catalina base is /tmp/tomcat.9079225201476633646.7750
2024-08-17 12:38:16.136  INFO 15019 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 7750 (http)
2024-08-17 12:38:16.159  INFO 15019 --- [main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-08-17 12:38:16.160  INFO 15019 --- [main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.31
2024-08-17 12:38:16.170  INFO 15019 --- [localhost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2024-08-17 12:38:16.416  INFO 15019 --- [localhost-startStop-1] org.apache.jasper.servlet.TldScanner     : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2024-08-17 12:38:16.419  INFO 15019 --- [localhost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-08-17 12:38:16.420  INFO 15019 --- [localhost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2304 ms
2024-08-17 12:38:16.700  WARN 15019 --- [localhost-startStop-1] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2024-08-17 12:38:16.700  INFO 15019 --- [localhost-startStop-1] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2024-08-17 12:38:16.713  INFO 15019 --- [localhost-startStop-1] c.netflix.config.DynamicPropertyFactory  : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@2ddf98fc
2024-08-17 12:38:17.760  INFO 15019 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2024-08-17 12:38:17.761  INFO 15019 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2024-08-17 12:38:17.761  INFO 15019 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2024-08-17 12:38:17.761  INFO 15019 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2024-08-17 12:38:17.761  INFO 15019 --- [localhost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2024-08-17 12:38:17.762  INFO 15019 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpTraceFilter' to: [/*]
2024-08-17 12:38:17.762  INFO 15019 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webMvcMetricsFilter' to: [/*]
2024-08-17 12:38:17.762  INFO 15019 --- [localhost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2024-08-17 12:38:17.763  INFO 15019 --- [localhost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet zuulServlet mapped to [/zuul/*]
2024-08-17 12:38:18.433  WARN 15019 --- [main] f.a.AutowiredAnnotationBeanPostProcessor : Autowired annotation is not supported on static fields: private static java.lang.String org.apache.pulsar.manager.service.impl.BookiesServiceImpl.pulsarJwtToken
2024-08-17 12:38:18.819  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/admin/v2/clusters],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.ClustersController.getClusters(java.lang.Integer,java.lang.Integer)
2024-08-17 12:38:18.820  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/dashboard],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.DashboardController.getDashboardStats(java.util.List<java.lang.String>)
2024-08-17 12:38:18.822  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/users/user],methods=[PUT]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.UsersController.addUser(org.apache.pulsar.manager.entity.UserInfoEntity)
2024-08-17 12:38:18.823  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/users],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.UsersController.getUsers(java.lang.Integer,java.lang.Integer)
2024-08-17 12:38:18.823  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/users/user],methods=[POST]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.UsersController.updateUser(org.apache.pulsar.manager.entity.UserInfoEntity)
2024-08-17 12:38:18.823  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/users/user],methods=[DELETE]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.UsersController.deleteUser(org.apache.pulsar.manager.entity.UserInfoEntity)
2024-08-17 12:38:18.824  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/users/superuser],methods=[PUT]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.UsersController.createSuperUser(org.apache.pulsar.manager.entity.UserInfoEntity)
2024-08-17 12:38:18.824  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/users/userInfo],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.UsersController.getUserInfo()
2024-08-17 12:38:18.825  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/casdoor],methods=[POST]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.LoginController.callback(java.util.Map<java.lang.String, java.lang.String>)
2024-08-17 12:38:18.825  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/logout],methods=[POST]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.LoginController.logout()
2024-08-17 12:38:18.826  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/login],methods=[POST]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.LoginController.login(java.util.Map<java.lang.String, java.lang.String>)
2024-08-17 12:38:18.826  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/admin/v2/namespaces/{tenant}/{namespace}/stats],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.NamespacesController.getNamespacesStats(java.lang.String,java.lang.String)
2024-08-17 12:38:18.826  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/admin/v2/namespaces/{tenantOrNamespace}],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.NamespacesController.getNamespacesByTenant(java.lang.String,java.lang.Integer,java.lang.Integer)
2024-08-17 12:38:18.829  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/environments],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.EnvironmentsController.getEnvironmentsList(java.lang.Integer,java.lang.Integer)
2024-08-17 12:38:18.829  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/environments/environment],methods=[POST]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.EnvironmentsController.updateEnvironment(org.apache.pulsar.manager.entity.EnvironmentEntity)
2024-08-17 12:38:18.829  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/environments/environment],methods=[DELETE]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.EnvironmentsController.deleteEnvironment(org.apache.pulsar.manager.entity.EnvironmentEntity)
2024-08-17 12:38:18.830  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/environments/environment],methods=[PUT]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.EnvironmentsController.addEnvironment(org.apache.pulsar.manager.entity.EnvironmentEntity)
2024-08-17 12:38:18.830  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/admin/v2/brokers/{cluster}],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.BrokersController.getBrokers(java.lang.Integer,java.lang.Integer,java.lang.String)
2024-08-17 12:38:18.831  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/admin/v2/topics/{tenant}/{namespace}/stats],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> org.apache.pulsar.manager.controller.TopicsController.getTopicsStats(java.lang.Integer,java.lang.Integer,java.lang.String,java.lang.String)
2024-08-17 12:38:18.831  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/admin/v2/{persistent}/{tenant}/{namespace}/{topic}/subscription/{subName}/{messagePosition}],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.TopicsController.peekMessages(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Integer)
2024-08-17 12:38:18.832  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/admin/v2/topics/{tenant}/{namespace}],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> org.apache.pulsar.manager.controller.TopicsController.getTopicsByTenantNamespace(java.lang.Integer,java.lang.Integer,java.lang.String,java.lang.String)
2024-08-17 12:38:18.832  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/admin/v2/broker-stats/metrics],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.lang.String> org.apache.pulsar.manager.controller.BrokerStatsController.getBrokerStatsMetrics(java.lang.String)
2024-08-17 12:38:18.833  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/api/v1/bookies/{cluster}],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.BookiesController.getClusters(java.lang.Integer,java.lang.Integer,java.lang.String)
2024-08-17 12:38:18.833  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/api/v1/bookies/heartbeat/{bookie}],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.String>> org.apache.pulsar.manager.controller.BookiesController.bookieHeartbeat(java.lang.String)
2024-08-17 12:38:18.833  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/tokens],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.BrokerTokensController.getEnvironmentsList(java.lang.Integer,java.lang.Integer)
2024-08-17 12:38:18.834  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/tokens/token],methods=[POST]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.BrokerTokensController.updateBrokerToken(org.apache.pulsar.manager.entity.BrokerTokenEntity)
2024-08-17 12:38:18.834  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/tokens/{role}],methods=[DELETE]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.BrokerTokensController.deleteBrokerToken(java.lang.String)
2024-08-17 12:38:18.834  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/tokens/{role}],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.BrokerTokensController.getBrokerToken(java.lang.String)
2024-08-17 12:38:18.834  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/tokens/token],methods=[PUT]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.BrokerTokensController.addBrokerToken(org.apache.pulsar.manager.entity.BrokerTokenEntity)
2024-08-17 12:38:18.835  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/admin/v2/tenants],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.apache.pulsar.manager.controller.TenantsController.getTenants(java.lang.Integer,java.lang.Integer)
2024-08-17 12:38:18.835  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pulsar-manager/csrf-token],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.lang.String> org.apache.pulsar.manager.controller.CsrfTokenController.getCsrfToken(javax.servlet.http.HttpServletRequest)
2024-08-17 12:38:18.838  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/swagger-resources/configuration/security]}" onto public org.springframework.http.ResponseEntity<springfox.documentation.swagger.web.SecurityConfiguration> springfox.documentation.swagger.web.ApiResourceController.securityConfiguration()
2024-08-17 12:38:18.838  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/swagger-resources/configuration/ui]}" onto public org.springframework.http.ResponseEntity<springfox.documentation.swagger.web.UiConfiguration> springfox.documentation.swagger.web.ApiResourceController.uiConfiguration()
2024-08-17 12:38:18.839  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/swagger-resources]}" onto public org.springframework.http.ResponseEntity<java.util.List<springfox.documentation.swagger.web.SwaggerResource>> springfox.documentation.swagger.web.ApiResourceController.swaggerResources()
2024-08-17 12:38:18.841  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2024-08-17 12:38:18.841  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2024-08-17 12:38:18.911  INFO 15019 --- [main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2024-08-17 12:38:18.923  INFO 15019 --- [main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/health],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2024-08-17 12:38:18.923  INFO 15019 --- [main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/info],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2024-08-17 12:38:18.924  INFO 15019 --- [main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto protected java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.springframework.boot.actuate.endpoint.web.Link>> org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping.links(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2024-08-17 12:38:19.052  INFO 15019 --- [main] pertySourcedRequestMappingHandlerMapping : Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)]
2024-08-17 12:38:19.173  INFO 15019 --- [main] .s.s.UserDetailsServiceAutoConfiguration : 

Using generated security password: 3f342921-d0ee-4c19-a648-98219259aad7

2024-08-17 12:38:19.304  INFO 15019 --- [main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@1e471884, org.springframework.security.web.context.SecurityContextPersistenceFilter@4dd1548e, org.springframework.security.web.header.HeaderWriterFilter@72324965, org.springframework.security.web.csrf.CsrfFilter@329b331f, org.springframework.security.web.authentication.logout.LogoutFilter@4cc26df, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@1109730f, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@3f06ebe0, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@27261190, org.springframework.security.web.session.SessionManagementFilter@63cf578f, org.springframework.security.web.access.ExceptionTranslationFilter@786ff0ea]
2024-08-17 12:38:19.520  WARN 15019 --- [main] o.s.c.n.a.ArchaiusAutoConfiguration      : No spring.application.name found, defaulting to 'application'
2024-08-17 12:38:19.521  WARN 15019 --- [main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2024-08-17 12:38:19.521  INFO 15019 --- [main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2024-08-17 12:38:19.620  INFO 15019 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2024-08-17 12:38:19.827  INFO 15019 --- [main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6138e79a: startup date [Sat Aug 17 12:38:14 UTC 2024]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@11c9af63
2024-08-17 12:38:19.903  INFO 15019 --- [main] o.a.p.m.interceptor.WebAppConfigurer     : Front-end not found at /pulsar-manager/ui. Maybe you are deploying the front-end as a separate process
2024-08-17 12:38:19.905  INFO 15019 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2024-08-17 12:38:19.905  INFO 15019 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2024-08-17 12:38:19.932  INFO 15019 --- [main] .m.m.a.ExceptionHandlerExceptionResolver : Detected @ExceptionHandler methods in customizeExceptionHandler
2024-08-17 12:38:20.010  WARN 15019 --- [main] org.thymeleaf.templatemode.TemplateMode  : [THYMELEAF][main] Template Mode 'HTML5' is deprecated. Using Template Mode 'HTML' instead.
2024-08-17 12:38:20.060  INFO 15019 --- [main] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page template: index
2024-08-17 12:38:20.597  INFO 15019 --- [main] o.s.c.n.zuul.ZuulFilterInitializer       : Starting filter initializer
2024-08-17 12:38:20.622  INFO 15019 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2024-08-17 12:38:20.624  INFO 15019 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'dataSource' has been autodetected for JMX exposure
2024-08-17 12:38:20.631  INFO 15019 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'environmentManager' has been autodetected for JMX exposure
2024-08-17 12:38:20.632  INFO 15019 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'refreshScope' has been autodetected for JMX exposure
2024-08-17 12:38:20.632  INFO 15019 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2024-08-17 12:38:20.635  INFO 15019 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2024-08-17 12:38:20.642  INFO 15019 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2024-08-17 12:38:20.651  INFO 15019 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=6138e79a,type=ConfigurationPropertiesRebinder]
2024-08-17 12:38:20.656  INFO 15019 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2024-08-17 12:38:20.662  INFO 15019 --- [main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 2147483647
2024-08-17 12:38:20.662  INFO 15019 --- [main] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed
2024-08-17 12:38:20.666  INFO 15019 --- [main] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s)
2024-08-17 12:38:20.704  INFO 15019 --- [main] s.d.s.w.s.ApiListingReferenceScanner     : Scanning for api listing references
2024-08-17 12:38:20.817  INFO 15019 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: getClustersUsingGET_1
2024-08-17 12:38:20.829  INFO 15019 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: getEnvironmentsListUsingGET_1
2024-08-17 12:38:20.887  INFO 15019 --- [main] s.a.ScheduledAnnotationBeanPostProcessor : No TaskScheduler/ScheduledExecutorService bean found for scheduled processing
2024-08-17 12:38:20.891  INFO 15019 --- [main] o.a.p.manager.PulsarApplicationListener  : Start onApplicationEvent
2024-08-17 12:38:20.956  INFO 15019 --- [pool-2-thread-1] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2024-08-17 12:38:21.068  INFO 15019 --- [pool-2-thread-1] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2024-08-17 12:38:21.088  INFO 15019 --- [pool-2-thread-1] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
2024-08-17 12:38:21.126  INFO 15019 --- [pool-2-thread-1] o.s.jdbc.support.SQLErrorCodesFactory    : SQLErrorCodes loaded: [DB2, Derby, H2, HDB, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
2024-08-17 12:38:21.136  INFO 15019 --- [main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2024-08-17 12:38:21.139 ERROR 15019 --- [pool-2-thread-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task.

org.springframework.jdbc.BadSqlGrammarException: 
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: relation "environments" does not exist
  Position: 22
### The error may exist in org/apache/pulsar/manager/mapper/EnvironmentsMapper.java (best guess)
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT count(0) FROM environments
### Cause: org.postgresql.util.PSQLException: ERROR: relation "environments" does not exist
  Position: 22
; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "environments" does not exist
  Position: 22
	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234) ~[spring-jdbc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) ~[spring-jdbc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:88) ~[mybatis-spring-2.0.4.jar:2.0.4]
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440) ~[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$$d3e851b5.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_342]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_342]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_342]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_342]
	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_342]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_342]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_342]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_342]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_342]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_342]
	at java.lang.Thread.run(Thread.java:750) [na:1.8.0_342]
Caused by: org.postgresql.util.PSQLException: ERROR: relation "environments" does not exist
  Position: 22
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) ~[postgresql-42.2.5.jar:42.2.5]
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183) ~[postgresql-42.2.5.jar:42.2.5]
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308) ~[postgresql-42.2.5.jar:42.2.5]
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) ~[postgresql-42.2.5.jar:42.2.5]
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) ~[postgresql-42.2.5.jar:42.2.5]
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143) ~[postgresql-42.2.5.jar:42.2.5]
	at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:132) ~[postgresql-42.2.5.jar:42.2.5]
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-2.7.9.jar:na]
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) ~[HikariCP-2.7.9.jar:na]
	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64) ~[mybatis-3.5.4.jar:3.5.4]
	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79) ~[mybatis-3.5.4.jar:3.5.4]
	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63) ~[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.$Proxy197.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_342]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_342]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_342]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_342]
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426) ~[mybatis-spring-2.0.4.jar:2.0.4]
	... 30 common frames omitted

To Reproduce

Deploy helm chart with the following config (I use flux):

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: pulsar-dev
spec:
  serviceAccountName: dispo-team
  releaseName: pulsar-dev
  install:
    crds: Skip
  upgrade:
    crds: Skip
  chart:
    spec:
      chart: pulsar
      sourceRef:
        kind: HelmRepository
        name: pulsar
  interval: 5m
  values:
    components:
      zookeeper: true
      bookkeeper: true
      autorecovery: true
      broker: true
      functions: false
      proxy: false
      toolset: true
      pulsar_manager: true

    kube-prometheus-stack:
      enabled: false
      prometheusOperator:
        enabled: false
      grafana:
        enabled: false
      alertmanager:
        enabled: false
      prometheus:
        enabled: false

    zookeeper:
      podMonitor:
        enabled: false
      volumes:
        data:
          size: 1Gi
          local_storage: false
          storageClassName: longhorn-1rep-sl-retain
        datalog:
          size: 1Gi
          local_storage: false
          storageClassName: longhorn-1rep-sl-retain

    bookkeeper:
      podMonitor:
        enabled: false
      volumes:
        journal:
          size: 1Gi
          local_storage: false
          storageClassName: longhorn-1rep-sl-retain
        ledger:
          size: 1Gi
          local_storage: false
          storageClassName: longhorn-1rep-sl-retain
    autorecovery:
      podMonitor:
        enabled: false

    broker:
      podMonitor:
        enabled: false

    proxy:
      podMonitor:
        enabled: false

    pulsar_manager:
      nodeSelector:
        kubernetes.io/arch: amd64
      podMonitor:
        enabled: false
      configData:
        URL: "jdbc:postgresql://pulsar-dev-manager-postgresql:5432/pulsar_manager"
      admin:
        existingSecret: pulsar-dev
      ingress:
        enabled: true
        annotations:
          cert-manager.io/cluster-issuer: letsencrypt-prod-dns
          external-dns.alpha.kubernetes.io/hostname: pulsar-manager.internal.com
          external-dns.alpha.kubernetes.io/access: private
        ingressClassName: "nginx-internal"
        tls:
          enabled: true
          secretName: "pulsar-manager-dev-tls-secret"
        hostname: "pulsar-manager.internal.com"
        path: "/"

Expected behavior
Pulsar manager starts up and I can login.

@schmidp
Copy link
Author

schmidp commented Aug 17, 2024

its fixed by adding:

SPRING_CONFIGURATION_FILE: "/pulsar-manager/pulsar-manager/application.properties"

to configData

I wonder why that is not on per default?

@lhotari
Copy link
Member

lhotari commented Aug 23, 2024

its fixed by adding:

SPRING_CONFIGURATION_FILE: "/pulsar-manager/pulsar-manager/application.properties"

to configData

I wonder why that is not on per default?

@Mortom123 Would it make sense to make this the default?

@Mortom123
Copy link
Contributor

Mortom123 commented Aug 26, 2024

I would argue that this is a matter of preference.
SPRING_CONFIGURATION_FILE: "/pulsar-manager/pulsar-manager/application.properties" overwrites springs default configuration file bundled into the .jar.

When coding the manager part of the helm chart, I decided that its easier to use the properties from the repo source tree instead of the one bundled into the container. Hence, one should overwrite all variables as needed from the single configMap that holds all the attributes as environment variables without fiddling around with the files inside the container.
Have a look at the docs 1 2

Maybe @schmidp can figure out which key(s) the culprit is and we can add it to the configMap definition.
I also wonder, why this error does not occur in CI/CD?
Might be some missing keys (DRIVER_CLASS_NAME) in the configData in your values.yml? The default is:

  configData:
    REDIRECT_HOST: "http://127.0.0.1"
    REDIRECT_PORT: "9527"
    LOG_LEVEL: "INFO"
    # DB
    URL: "jdbc:postgresql://127.0.0.1:5432/pulsar_manager"
    DRIVER_CLASS_NAME: "org.postgresql.Driver"
    # enables the "message peeking" feature
    PULSAR_PEEK_MESSAGE: "true"

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

3 participants