gbif / ipt

GBIF Integrated Publishing Toolkit (IPT)
https://www.gbif.org/ipt
Apache License 2.0
127 stars 57 forks source link

Registration to GBIF UAT failing #2456

Closed PietrH closed 1 month ago

PietrH commented 2 months ago

We are on IPT v3.0.5 b3d11a2

I'm trying to publish a checklist to GBIF UAT via https://gbrds.gbif-uat.org but am getting an error upon registering:

image

It seems we are getting an empty response from the registry call:

DEBUG 02-Jul-2024 13:39:37 [org.gbif.utils.PreemptiveAuthenticationInterceptor] - GET /registry/network.json HTTP/1.1
DEBUG 02-Jul-2024 13:39:37 [org.gbif.ipt.action.manage.OverviewAction] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.2.xml
DEBUG 02-Jul-2024 13:39:37 [org.gbif.ipt.action.manage.OverviewAction] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.2.xml
DEBUG 02-Jul-2024 13:39:37 [org.gbif.ipt.action.manage.OverviewAction] - Checking if license (URL=http://creativecommons.org/licenses/by-nc/4.0/legalcode) is supported by GBIF..
DEBUG 02-Jul-2024 13:39:37 [org.gbif.ipt.action.manage.OverviewAction] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.2.xml
DEBUG 02-Jul-2024 13:39:37 [org.gbif.ipt.action.manage.OverviewAction] - Checking if license (URL=http://creativecommons.org/licenses/by-nc/4.0/legalcode) is supported by GBIF..
DEBUG 02-Jul-2024 13:39:47 [org.gbif.utils.PreemptiveAuthenticationInterceptor] - GET /registry/network.json HTTP/1.1
DEBUG 02-Jul-2024 13:39:47 [org.gbif.ipt.service.registry.impl.RegistryManagerImpl] - Registering resource...
DEBUG 02-Jul-2024 13:39:47 [org.gbif.ipt.service.registry.impl.RegistryManagerImpl] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.2.xml
DEBUG 02-Jul-2024 13:39:47 [org.gbif.ipt.service.registry.impl.RegistryManagerImpl] - Registering EML & DwC-A Checklist Service
DEBUG 02-Jul-2024 13:39:47 [org.gbif.utils.PreemptiveAuthenticationInterceptor] - POST /registry/ipt/resource HTTP/1.1
DEBUG 02-Jul-2024 13:39:47 [org.gbif.utils.PreemptiveAuthenticationInterceptor] - Authentication used for scope gbrds.gbif-uat.org
ERROR 02-Jul-2024 13:39:47 [org.gbif.ipt.action.manage.OverviewAction] - The response from the Registry was empty or invalid. [https://gbrds.gbif-uat.org/registry/ipt/resource]
ERROR 02-Jul-2024 13:39:47 [org.gbif.ipt.action.manage.OverviewAction] - Registration of resource failed!
DEBUG 02-Jul-2024 13:39:47 [org.gbif.utils.PreemptiveAuthenticationInterceptor] - GET /registry/network.json HTTP/1.1
DEBUG 02-Jul-2024 13:39:47 [org.gbif.ipt.action.manage.OverviewAction] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.2.xml
DEBUG 02-Jul-2024 13:39:47 [org.gbif.ipt.action.manage.OverviewAction] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.2.xml
DEBUG 02-Jul-2024 13:39:47 [org.gbif.ipt.action.manage.OverviewAction] - Checking if license (URL=http://creativecommons.org/licenses/by-nc/4.0/legalcode) is supported by GBIF..
DEBUG 02-Jul-2024 13:39:47 [org.gbif.ipt.action.manage.OverviewAction] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.2.xml
DEBUG 02-Jul-2024 13:39:47 [org.gbif.ipt.action.manage.OverviewAction] - Checking if license (URL=http://creativecommons.org/licenses/by-nc/4.0/legalcode) is supported by GBIF..

This is the dataset I'm trying to register: https://ipt-dev.inbo.be/resource?r=negative-eventdates

I was in communication with @MattBlissett about this over slack, this is related to a mapping question of @sannegovaert regarding negative eventDates

mike-podolskiy90 commented 2 months ago

Thank you @PietrH Looking into it

PietrH commented 2 months ago

Thanks for the quick response! Let me know if I can provide more information or make changes/try something on our IPT.

mike-podolskiy90 commented 2 months ago

It would be helpful to have an admin account in your IPT

PietrH commented 2 months ago

Let me get back to you on that in a moment, what do you need admin access for?

MattBlissett commented 2 months ago

@mike-podolskiy90, https://ipt.gbif.org/manage/resource.do?r=bfast2 gave the same error for me.

mike-podolskiy90 commented 2 months ago

Okay, the error message is the same, but the reason could be different? Anyway, I'll check our test IPT instead.

PietrH commented 2 months ago

I've sent some credentials your way @mike-podolskiy90

mike-podolskiy90 commented 2 months ago

It seems your installation has the key 08a0012f-5c72-429e-9f93-7df465ff9686 which is not present in our test environment:

https://api.gbif-uat.org/v1/installation/08a0012f-5c72-429e-9f93-7df465ff9686

mike-podolskiy90 commented 2 months ago

It means your IPT installation is not actually registered in the GBIF

PietrH commented 2 months ago

Aha, that seems like an easy fix. How do I go about registering it?

PietrH commented 2 months ago

A slightly more informative message might be useful in the future

mike-podolskiy90 commented 2 months ago

I'm not sure how this happened. I think you will have to reinstall the IPT.

mike-podolskiy90 commented 2 months ago

Oh, just reinstalling with the same data directory won't help. We have to scrap the registration2.xml file and replace with a default one.

PietrH commented 2 months ago

Is there no way to get around this without reinstalling our test ipt? I'd like to avoid that if at all possible.

I wonder if we were ever registered on our test ipt to be honest

mike-podolskiy90 commented 2 months ago

Yes, it'll work without reinstallation, but you need to manually edit IPT internal files. Namely, registration2.xml at datadir/confg. Whole registry section should be replaced with just <registry/>. Make sure IPT is stopped before editing and then started again. There is no other way to fix it I'm afraid.

PietrH commented 2 months ago

I'll give that a go!

PietrH commented 2 months ago

I've edited registration2.xml to the following (redacted):

<registration>
  <registry>
  </registry>
  <organisation>
    <key>0a16da09-7719-40de-8d4f-56a15ed52fb6</key>
    <description>Test Organization for IPT</description>
    <name>Test Organization #1</name>
    <homepageURL>[https://www.gbif.org/, https://registry.gbif.org/, https://ipt.gbif.org/]</homepageURL>
    <primaryContactType>administrative</primaryContactType>
    <primaryContactName>GBIF Helpdesk</primaryContactName>
    <primaryContactAddress>Universitetsparken 15</primaryContactAddress>
    <primaryContactEmail>helpdesk@gbif.org</primaryContactEmail>
    <primaryContactPhone>+45 35 32 14 70</primaryContactPhone>
    <password></password>
    <alias>Test Organisation #1</alias>
    <nodeKey>02c40d2a-1cba-4633-90b7-e36e5e97aba8</nodeKey>
    <nodeName>GBIF Secretariat</nodeName>
    <canHost>true</canHost>
    <agencyAccountPrimary>false</agencyAccountPrimary>
    <associatedWithDoiRegistrationAgency>false</associatedWithDoiRegistrationAgency>
  </organisation>
  <organisation>
    <key>1cd669d0-80ea-11de-a9d0-f1765f95f18b</key>
    <description>The Research Institute for Nature and Forest (INBO) is a scientific institute of the Flemish Government in Belgium. INBO has resulted from the merger of the Institute for Forestry and Game Management and the Institute of Nature Conservation on January, 1st 2006.</description>
    <name>Research Institute for Nature and Forest (INBO)</name>
    <homepageURL>[http://www.inbo.be]</homepageURL>
    <primaryContactType>technical</primaryContactType>
    <primaryContactName>Dimitri Brosens</primaryContactName>
    <primaryContactEmail></primaryContactEmail>
    <password></password>
    <alias>Research Institute for Nature and Forest (INBO)</alias>
    <nodeKey>fb11cfe1-ebc3-45af-9159-17d9fddbcdac</nodeKey>
    <nodeName>Belgian Biodiversity Platform</nodeName>
    <canHost>true</canHost>
    <agencyAccountPrimary>false</agencyAccountPrimary>
    <associatedWithDoiRegistrationAgency>false</associatedWithDoiRegistrationAgency>
    <agencyAccountPassword></agencyAccountPassword>
  </organisation>
  <organisation>
    <key>625a5522-1886-4998-be46-52c66dd566c9</key>
    <description>Installed by default, used to indicate resource is not published by any organisation</description>
    <name>No organisation</name>
    <password></password>
    <alias>No organisation</alias>
    <canHost>true</canHost>
    <agencyAccountPrimary>false</agencyAccountPrimary>
    <associatedWithDoiRegistrationAgency>false</associatedWithDoiRegistrationAgency>
  </organisation>
</registration>

I'm still unable to register datasets, this is a log entry:

DEBUG 04-Jul-2024 09:24:23 [org.gbif.utils.PreemptiveAuthenticationInterceptor] - GET /registry/network.json HTTP/1.1
DEBUG 04-Jul-2024 09:24:23 [org.gbif.ipt.action.manage.OverviewAction] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.3.xml
DEBUG 04-Jul-2024 09:24:24 [org.gbif.ipt.action.manage.OverviewAction] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.3.xml
DEBUG 04-Jul-2024 09:24:24 [org.gbif.ipt.action.manage.OverviewAction] - Checking if license (URL=http://creativecommons.org/licenses/by-nc/4.0/legalcode) is supported by GBIF..
DEBUG 04-Jul-2024 09:24:24 [org.gbif.ipt.action.manage.OverviewAction] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.3.xml
DEBUG 04-Jul-2024 09:24:24 [org.gbif.ipt.action.manage.OverviewAction] - Checking if license (URL=http://creativecommons.org/licenses/by-nc/4.0/legalcode) is supported by GBIF..
DEBUG 04-Jul-2024 09:24:32 [org.gbif.utils.PreemptiveAuthenticationInterceptor] - GET /registry/network.json HTTP/1.1
DEBUG 04-Jul-2024 09:24:32 [org.gbif.ipt.service.registry.impl.RegistryManagerImpl] - Registering resource...
DEBUG 04-Jul-2024 09:24:32 [org.gbif.ipt.service.registry.impl.RegistryManagerImpl] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.3.xml
DEBUG 04-Jul-2024 09:24:33 [org.gbif.ipt.service.registry.impl.RegistryManagerImpl] - Registering EML & DwC-A Checklist Service
DEBUG 04-Jul-2024 09:24:33 [org.gbif.utils.PreemptiveAuthenticationInterceptor] - GET /registry/network.json HTTP/1.1
DEBUG 04-Jul-2024 09:24:33 [org.gbif.ipt.action.manage.OverviewAction] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.3.xml
DEBUG 04-Jul-2024 09:24:33 [org.gbif.ipt.action.manage.OverviewAction] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.3.xml
DEBUG 04-Jul-2024 09:24:33 [org.gbif.ipt.action.manage.OverviewAction] - Checking if license (URL=http://creativecommons.org/licenses/by-nc/4.0/legalcode) is supported by GBIF..
DEBUG 04-Jul-2024 09:24:33 [org.gbif.ipt.action.manage.OverviewAction] - Loading EML from file: /home/lwatch/ipt-data/resources/negative-eventdates/eml-1.3.xml
DEBUG 04-Jul-2024 09:24:33 [org.gbif.ipt.action.manage.OverviewAction] - Checking if license (URL=http://creativecommons.org/licenses/by-nc/4.0/legalcode) is supported by GBIF..

A screenshot where the test ipt reports it's unregistered:

image

mike-podolskiy90 commented 2 months ago

Yes. Now you need to register the IPT again via Registration options.

PietrH commented 2 months ago

Aha! I'll ask around for a shared token/ipt password then. Thanks for all the help, I'll post here if I'm successful.

mike-podolskiy90 commented 1 month ago

Closing this