isears
(Isaac Sears)
May 17, 2019, 12:59am
1
I’ve been getting the following error when trying to register an implementation id:
Your implementation id is in use by another installation. Please choose another source key or enter the valid passphrase for this source id.
I’ve tried submitting a completely random 20-character implementation id to ensure it’s unique, so I’m pretty confident that’s not the issue. The problem seems related to this issue from last year: Error while connecting to the implementation server to verify implementation
Is the implementationid endpoint down again? cc @cintiadr
PS I’m using the following html form in the admin module to set the implementation id: /openmrs/admin/maintenance/implementationid.form
cintiadr
(Cintia Del Rio)
May 17, 2019, 5:48am
2
Hum, I will check it tonight.
I do have monitoring if the application is up, but it’s hard to guess if it’s actually working. It doesn’t seem like, or I forgot everything.
1 Like
isears
(Isaac Sears)
May 17, 2019, 6:17am
3
I now have a quick-fix workaround so this is no longer as big of an issue for me personally, but FWIW, I get the same error when trying to register on demo.openmrs.org :
https://demo.openmrs.org/openmrs/admin/maintenance/implementationid.form
For anyone who’s interested in the workaround: the following sql command will manually insert the implementation id into the database
insert into global_property (property, property_value, description, uuid, datatype, datatype_config, preferred_handler, handler_config, date_changed, changed_by) values (
'implementation_id', '<org.openmrs.ImplementationId implementationId=\"YOUR IMPLEMENTATION ID HERE\"> <name>YOUR ORG NAME</name>\n<description>YOUR DESCRIPTION HERE</description>\n<passphrase>YOUR PASSWORD HERE</passphrase>\n</org.openmrs.ImplementationId>', NULL, UUID(), NULL, NULL, NULL, NULL, NULL, NULL
);
This is obviously not as desirable since there’s no actual communication with the centralized implementation id management service and unique implementation ids can’t be guaranteed.
cintiadr
(Cintia Del Rio)
May 17, 2019, 11:08am
4
Thank goodness I created a good Readme
Looking at the logs (UTC time):
172.19.0.1 - - [17/May/2019 01:05:24] "GET /tools/implementationid HTTP/1.0" 404 -
172.19.0.1 - - [17/May/2019 01:05:43] "POST /tools/implementationid HTTP/1.0" 404 -
172.19.0.1 - - [17/May/2019 05:46:12] "GET /tools/implementationid HTTP/1.0" 404 -
172.19.0.1 - - [17/May/2019 05:47:34] "GET /tools/implementationid HTTP/1.0" 404 -
It seems to be reaching /tools/implementationId instead of / . Do you reckon that’s the case?
isears
(Isaac Sears)
May 17, 2019, 11:35am
5
Yup, it looks like the implementationid service is running fine, but there’s a bug in openmrs core that has people using the wrong endpoint.
Also it looks like openmrs-core uses cleartext http:// by default, which exposes implementationid passwords, even if the implementationid service is actively trying to redirect people to https://
There’s already an open PR with the fix (both correct endpoint and https:// usage): TRUNK-5384: Handle server redirections in HttpClient and update implementationId urls. by ATLCTO · Pull Request #2810 · openmrs/openmrs-core · GitHub
1 Like
cintiadr
(Cintia Del Rio)
May 17, 2019, 11:40am
6
Indeed, that was a while ago, I’d thought it would already merged and released a while ago…