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

Cleanup in Elastic? #126

Open
mrsombre opened this issue Feb 1, 2024 · 1 comment
Open

Cleanup in Elastic? #126

mrsombre opened this issue Feb 1, 2024 · 1 comment

Comments

@mrsombre
Copy link

mrsombre commented Feb 1, 2024

I see elastic variables are commented out https://github.com/reportportal/service-jobs/blob/develop/src/main/resources/application.yml#L48, but there are also some logic to cleanup elastic.
Is it not working yet or just not could be changed using environment variables?

@mrsombre
Copy link
Author

mrsombre commented Feb 5, 2024

After conducting several tests, I discovered that the queue in RabbitMQ is not being consumed by the jobs service unless there is a configuration set for Elasticsearch. This can be verified by referring to the SaveLogMessageJob.java file (see SaveLogMessageJob.java, Line 17).
Therefore, it is crucial to define the necessary environment variables in Docker.

      RP_ELASTICSEARCH_HOST: http://${ELASTIC_HOST}:${ELASTIC_PORT}
      RP_ELASTICSEARCH_USERNAME: ${ELASTIC_USERNAME}
      RP_ELASTICSEARCH_PASSWORD: ${ELASTIC_PASSWORD}

It is also important to note that the names of the Elasticsearch environment variables differ from those used in the API. Specifically, they use the prefix 'RP_ELASTICSEARCHLOGMESSAGE_'. Moreover, the variable 'RP_ELASTICSEARCH_HOST' should be specified in the format of 'scheme://host:port'. This is in contrast to the API configuration, where the host and port are separated into distinct variables.
If not configured correctly, the queue may become overloaded, consuming excessive disk space. Additionally, Elasticsearch indexes will not be created under these circumstances.

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

1 participant