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

no need to call if esindexer not config #56

Merged
merged 3 commits into from
Jul 8, 2024

Conversation

utas-raymondng
Copy link
Collaborator

No description provided.

@vietnguyengit
Copy link
Contributor

I commented out stuff related to the indexer in .env

#INDEXER_HOST=localhost
#INDEXER_PORT=8081
#INDEXER_APIKEY=Q*z6OfL^4u^1nMhH

and also in application.properties

#aodn.geonetwork4.esIndexer.host=${INDEXER_HOST:http://localhost}
aodn.geonetwork4.esIndexer.port=${INDEXER_PORT:80}
aodn.geonetwork4.esIndexer.apikey=${INDEXER_APIKEY}
#aodn.geonetwork4.esIndexer.urlIndex=${aodn.geonetwork4.esIndexer.host}:${aodn.geonetwork4.esIndexer.port}/api/v1/indexer/index/{uuid}

then I run the geonetwork4, cannot hit this line

logger.warn("Call to es-indexer is off due to config missing");

and when I tried to create a dummy record to see if the indexer still be called

geonetwork4   | 2024-07-08T11:13:27,382 INFO  [au.org.aodn.geonetwork4.handler.GenericEntityListener] - Call indexer on metadata 4613001f-3590-4d9d-a69e-4231da1487cc after metadata updated.
geonetwork4   | 2024-07-08T11:13:27,383 INFO  [au.org.aodn.geonetwork4.handler.GenericEntityListener] - Call indexer update http://localhost:8080/api/v1/indexer/index/{uuid} metadata 4613001f-3590-4d9d-a69e-4231da1487cc
geonetwork4   | 2024-07-08T11:13:27,426 ERROR [au.org.aodn.geonetwork4.handler.GenericEntityListener] - Fail to call indexer on metadata 4613001f-3590-4d9d-a69e-4231da1487cc after transaction committed. 404 Not Found: "{<EOL>"message":"Not Found",<EOL>"url":"/api/v1/indexer/index/4613001f-3590-4d9d-a69e-4231da1487cc",<EOL>"status":"404"<EOL>}"

looks like urlIndex still stuck somewhere in my environment, where should I look for @utas-raymondng ?

@utas-raymondng
Copy link
Collaborator Author

I commented out stuff related to the indexer in .env

#INDEXER_HOST=localhost
#INDEXER_PORT=8081
#INDEXER_APIKEY=Q*z6OfL^4u^1nMhH

and also in application.properties

#aodn.geonetwork4.esIndexer.host=${INDEXER_HOST:http://localhost}
aodn.geonetwork4.esIndexer.port=${INDEXER_PORT:80}
aodn.geonetwork4.esIndexer.apikey=${INDEXER_APIKEY}
#aodn.geonetwork4.esIndexer.urlIndex=${aodn.geonetwork4.esIndexer.host}:${aodn.geonetwork4.esIndexer.port}/api/v1/indexer/index/{uuid}

then I run the geonetwork4, cannot hit this line

logger.warn("Call to es-indexer is off due to config missing");

and when I tried to create a dummy record to see if the indexer still be called

geonetwork4   | 2024-07-08T11:13:27,382 INFO  [au.org.aodn.geonetwork4.handler.GenericEntityListener] - Call indexer on metadata 4613001f-3590-4d9d-a69e-4231da1487cc after metadata updated.
geonetwork4   | 2024-07-08T11:13:27,383 INFO  [au.org.aodn.geonetwork4.handler.GenericEntityListener] - Call indexer update http://localhost:8080/api/v1/indexer/index/{uuid} metadata 4613001f-3590-4d9d-a69e-4231da1487cc
geonetwork4   | 2024-07-08T11:13:27,426 ERROR [au.org.aodn.geonetwork4.handler.GenericEntityListener] - Fail to call indexer on metadata 4613001f-3590-4d9d-a69e-4231da1487cc after transaction committed. 404 Not Found: "{<EOL>"message":"Not Found",<EOL>"url":"/api/v1/indexer/index/4613001f-3590-4d9d-a69e-4231da1487cc",<EOL>"status":"404"<EOL>}"

looks like urlIndex still stuck somewhere in my environment, where should I look for @utas-raymondng ?

You have -D value set in your run profile?

@vietnguyengit
Copy link
Contributor

I used the script you prepared:

image

@utas-raymondng
Copy link
Collaborator Author

I used the script you prepared:

image

sorry my bad bug there let me fix it

@vietnguyengit
Copy link
Contributor

no problem

@utas-raymondng
Copy link
Collaborator Author

Comment INDEXER_HOST: ${INDEXER_HOST:-http://localhost} in the docker-gn-compose.yml should work now

Copy link
Contributor

@vietnguyengit vietnguyengit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

geonetwork4   | 2024-07-08T14:30:33,216 WARN  [au.org.aodn.geonetwork4.handler.GenericEntityListener] - Call to es-indexer is off due to config missing

@vietnguyengit vietnguyengit merged commit 44b0184 into main Jul 8, 2024
2 checks passed
@vietnguyengit vietnguyengit deleted the bugs/5688-ignore-indexer-call-if-not-confi branch July 8, 2024 04:32
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

Successfully merging this pull request may close these issues.

2 participants