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

Handle Service #4569

Closed
ghost opened this issue Apr 5, 2018 · 20 comments
Closed

Handle Service #4569

ghost opened this issue Apr 5, 2018 · 20 comments

Comments

@ghost
Copy link

ghost commented Apr 5, 2018

The UWI currently has a dataverse installation at: https://dataverse.sta.uwi.edu

We added handle service to it, however, when the handle url is clicked while on campus, it resolves to the internal IP address.
When it is clicked off campus, the site can’t be reached and displays the internal ip addres (192.168....)

Am I missing some setting somewhere or one that has to be changed to point to the external ip address or server name?

@pameyer
Copy link
Contributor

pameyer commented Apr 5, 2018

Is it possible that the handle system has the landing page for the identifier configured to be the internal IP (aka - curl -I http://hdl.handle.net/${handle_identifier} show the internal IP?

@ghost
Copy link
Author

ghost commented Apr 6, 2018

Are you talking about the settings in the config.dct?

I contacted handle.net and they have verified that all the settings are correct on their end. They seem to think it is a setting in the application.

@pameyer
Copy link
Contributor

pameyer commented Apr 6, 2018

I'm still trying to understand the problem. It sounds to me like the landing page for the identifier is set to an internal IP address (which that curl command should be able to confirm or not). If that's the case, I'd suspect that there's a dataverse setting for communicating with the handle system that's sending the internal address instead of the external address. But if the landing page for the identifier is set to the correct (publicly facing / external) URL, then trying to track that down wouldn't be likely to fix the problem.

@ghost
Copy link
Author

ghost commented Apr 6, 2018

This is the URL it tries to resolve to when I click on a handle identifier in dataverse:

https://192.168.224.83/loginpage.xhtml?redirectPage=%2Fdataset.xhtml%3FpersistentId%3Dhdl%3A20.500.12122%2FNTS0L5

@ghost
Copy link
Author

ghost commented Apr 6, 2018

It also tries to resolve to this once logged in.

http://192.168.224.83/citation?persistentId=hdl:20.500.12122/NTS0L5

@ghost
Copy link
Author

ghost commented Apr 6, 2018

Results for:

curl -I http://hdl.handle.net/${handle_identifier}

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 2580
Date: Fri, 06 Apr 2018 13:45:51 GMT

@pameyer
Copy link
Contributor

pameyer commented Apr 6, 2018

It sounds like either dataverse.fqdn or dataverse.siteUrl is set incorrectly in glassfish4/glassfish/domains/domain1/conf/domain.xml (http://guides.dataverse.org/en/latest/installation/config.html#dataverse-fqdn).

I'm vaguely surprised that there's no Location header in the curl response - thank you for checking.

@ghost
Copy link
Author

ghost commented Apr 6, 2018

Okay, I checked the domain.xml, dataverse.siteUrl was missing so I added that but it is still using the internal IP address.

@ghost
Copy link
Author

ghost commented Apr 6, 2018

This is what I have:

-Ddataverse.fqdn=dataverse.sta.uwi.edu
-Ddataverse.siteUrl=https://${dataverse.fqdn}:443

@ghost
Copy link
Author

ghost commented Apr 6, 2018

-Ddataverse.siteUrl=http://${dataverse.fqdn}:80
tried that too but still no luck still resolves to internal

@pameyer
Copy link
Contributor

pameyer commented Apr 6, 2018

Does it still go to the internal IP address after an update to the dataset is published (or a new dataset is created)?

BTW - if you're using the standard https / http protocols, I'd recommend leaving off the port numbers (they shouldn't be necessary).

@ghost
Copy link
Author

ghost commented Apr 6, 2018

I just created a new dataset and the handle resolves to the correct thing: https://dataverse.sta.uwi.edu/dataset.xhtml?persistentId=hdl:20.500.12122/XLRSMA

However, for already existing handles it still goes back to the internal ip address even after updating the dataset.

@pdurbin
Copy link
Member

pdurbin commented Apr 6, 2018

I'm not sure if this helps, but that new dataset you created is redirecting (HTTP code 303) to port 80 and HTTP rather than HTTPS:

$ curl -i http://hdl.handle.net/20.500.12122/XLRSMA
HTTP/1.1 303 See Other
Server: Apache-Coyote/1.1
Location: http://dataverse.sta.uwi.edu:80/citation?persistentId=hdl:20.500.12122/XLRSMA

Since your HTTP certificate seems to be valid, you should probably use the HTTPS version of your site with no port, like this:

-Ddataverse.siteUrl=https://dataverse.sta.uwi.edu

@solhm or @4tikhonov might know how to fix some of these problems since they wrote a lot of the code in pull request #3826.

@ghost
Copy link
Author

ghost commented Apr 6, 2018

Thanks @pdurbin that siteUrl setting works great. Its just to get the previously generated set of handles to do the same thing.

@pdurbin
Copy link
Member

pdurbin commented Apr 6, 2018

@lbigramUWI yeah, and that's the part I have no idea about. I've never set up a Handle server myself. :/

@pameyer
Copy link
Contributor

pameyer commented Apr 6, 2018

@lbigramUWI - I don't know how to do this with handles, but I believe that you need to change the target of the identifiers that have already been issued (and are resolving to the internal address). With DOIs, this is something that you'd be able to address with EZID/DataCite. I assume that there's a corresponding way to do this with the handle APIs, but unfortunately it's not something I could give you useful advice on.

@sekmiller
Copy link
Contributor

We have an API end point that is specifically for updating the targetURL of the identifier whether it is a DOI or handle

GET http://$SERVER/api/datasets/modifyRegistrationAll?key=$apiKey

The $apiKey you use must have super user status.

@ghost
Copy link
Author

ghost commented Apr 9, 2018

@sekmiller I will try this out. Thank you!

@ghost
Copy link
Author

ghost commented Apr 11, 2018

Okay, this worked. Thanks to all!

@djbrooke
Copy link
Contributor

Great to hear! Thanks @sekmiller @pameyer and @pdurbin for the assistance!

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

4 participants