SIDN / entrada2

GNU General Public License v3.0
5 stars 2 forks source link

Application fails to start due to invalid configuration #6

Closed ukkarikari closed 3 months ago

ukkarikari commented 4 months ago

When running the application in docker, fails to deploy with the following error:

entrada-worker-1  | 2024-07-03T12:24:46.875Z  WARN 1 --- [entrada2] [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server
entrada-worker-1  | 2024-07-03T12:24:46.956Z  INFO 1 --- [entrada2] [           main] .s.b.a.l.ConditionEvaluationReportLogger : 
entrada-worker-1  | 
entrada-worker-1  | Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
entrada-worker-1  | 2024-07-03T12:24:47.019Z ERROR 1 --- [entrada2] [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 
entrada-worker-1  | 
entrada-worker-1  | ***************************
entrada-worker-1  | APPLICATION FAILED TO START
entrada-worker-1  | ***************************
entrada-worker-1  | 
entrada-worker-1  | Description:
entrada-worker-1  | 
entrada-worker-1  | Invalid Micrometer configuration detected:
entrada-worker-1  | 
entrada-worker-1  |   - management.influx.metrics.export.apiVersion was 'V2' but it requires 'token' is also configured
entrada-worker-1  | 
entrada-worker-1  | Action:
entrada-worker-1  | 
entrada-worker-1  | Update your application to correct the invalid configuration.

Couldn't trace the error back to a specific area of the source code. Replicated in three different machines running Debian 12 and Arch Linux kernel 6.9.7.

mwullink commented 4 months ago

This is related to the InfluxDB config in the docker.env file, i forgot to include some of the variables there. I fixed it with this commit: https://github.com/SIDN/entrada2/commit/4b8c4fd2280a2ed9d021bb99cc0f87518f6809cf

One thing, the name of the inflxudb bucket has changed to entrada2, but if you already have an existing influxdb docker volume, this new bucket will not be created automatically. You have to create it manually or just remove the old docker volume, then the bucket, using the correct name, is created again during startup.

delete volume command: docker volume rm docker_entradaInfluxDbVolume

rafagregs commented 4 months ago

We managed to install via Docker, but we would like to activate rdata recording, we edited the corresponding parameter in entrada2/src/main/resources/application.yml, but apparently the installation via Docker does not respect this configuration. How to enable rdata data writing when installing via docker? Thanks!

mwullink commented 4 months ago

you can override any variable from application.yml using enviroment variables.

option entrada.rdata.enabled: true can be expressed as an env var using ENTRADA_RDATA_ENABLED=true

mwullink commented 3 months ago

closing as fixed, was as config issue