LinkedDataHub icon indicating copy to clipboard operation
LinkedDataHub copied to clipboard

Failed to install LinkedDataHub (static net::ERR_CONNECTION_REFUSED error)

Open givemetarte opened this issue 1 year ago • 10 comments

Hi, I got an error while installing LinkedDataHub. I can access LinkedDataHub through http://localhost:4443/, but the problem is that static files are not loaded.

Screenshot 2024-05-17 at 7 15 23 PM

Machine info

  • Ubuntu v20.04.6
  • Docker v24.0.2
  • Docker Compose v2.27.0

Installation info

  1. add .env file
COMPOSE_CONVERT_WINDOWS_PATHS=1
COMPOSE_PROJECT_NAME=linkeddatahub

PROTOCOL=https
HTTP_PORT=81
HTTPS_PORT=4443
HOST=localhost
ABS_PATH=/

OWNER_MBOX=****@gmail.com
OWNER_GIVEN_NAME=****
OWNER_FAMILY_NAME=****
OWNER_ORG_UNIT=****
OWNER_ORGANIZATION=****
OWNER_LOCALITY=****
OWNER_STATE_OR_PROVINCE=****
OWNER_COUNTRY_NAME=**
  1. run ./scripts/setup.sh .env ssl password password 3650
  2. run docker-compose up --build
  3. localhost:4443 in the browser

I don't know what the problem is..🥲

Also, HTTPS is not authenticated, and as shown in the above image, an error saying 'Access not authorized for require URI' appears.'

givemetarte avatar May 17 '24 10:05 givemetarte

@givemetarte it looks like you're not accessing LDH on localhost? Reset the environment (see README) and try to specify the actual host (or IP address) in the .env config.

namedgraph avatar May 18 '24 10:05 namedgraph

Thanks for your help! Your directions worked, but another error comes up... I thinks the issue is related to certificates. I followed "get an account" direction and copy keystore.p12 to my local(using SCP).

But, as below image, the popup (an error has occurred) comes out and said "invalid password." (I double-checked my password..🥲)

Screenshot 2024-05-20 at 5 31 11 PM Screenshot 2024-05-20 at 5 36 37 PM

I've tried installing both cert.pem and public.pem locally, but only public.pem was successfully installed. However, even after relaunching Chrome, I still receive the "Accessed not authorized" error. How can I do?

givemetarte avatar May 20 '24 08:05 givemetarte

@givemetarte did you solve this? What was the problem?

namedgraph avatar May 22 '24 11:05 namedgraph

The error is not completely solved. My chrome browser still comes up the error in my Mac. However, in Window, I can access LinkedDataHub with no error.

The guides in README setup worked well in Window, not Mac.

  1. Install ssl/owner/keystore.p12 into a web browser of your choice (password is the $owner_cert_pwd value supplied to setup.sh) Google Chrome: Settings > Advanced > Manage Certificates > Import... Mozilla Firefox: Options > Privacy > Security > View Certificates... > Import... Apple Safari: The file is installed directly into the operating system. Open the file and import it using the Keychain Access tool (drag it to the local section). Microsoft Edge: Does not support certificate management, you need to install the file into Windows. Read more here.

The public.pem certificate is in my local, but nothing happens when I access to LinkedDataHub. Screenshot 2024-05-23 at 1 46 53 PM

givemetarte avatar May 23 '24 04:05 givemetarte

@givemetarte you have to import the .p12 keystore file (ssl/owner/keystore.p12), not the .pem certificate file.

namedgraph avatar May 30 '24 20:05 namedgraph

@givemetarte can you provide more info?

namedgraph avatar Jun 03 '24 20:06 namedgraph

The keystore.p12 does not work well in MacOS. I copied keystore.p12 in my MacOS laptop and Window desktop. The settings below in README.md worked well in Window chrome browser.

Install ssl/owner/keystore.p12 into a web browser of your choice (password is the $owner_cert_pwd value supplied to setup.sh) Google Chrome: Settings > Advanced > Manage Certificates > Import... Mozilla Firefox: Options > Privacy > Security > View Certificates... > Import... Apple Safari: The file is installed directly into the operating system. Open the file and import it using the Keychain Access tool (drag it to the local section). Microsoft Edge: Does not support certificate management, you need to install the file into Windows. Read more here.

However, when I clicked the keystore.p12 file in MacOS, the popup said the password is invalid. I set up the certificate well with the changed password in Window, and I don't know why the certificate is not recognized in macos.

Screenshot 2024-06-04 In Windows, I set up the certificate well with the changed password.at 1 50 57 PM

givemetarte avatar Jun 04 '24 05:06 givemetarte

Having the exact same problem here, on MacOS, seems to be related to

  • https://discussions.apple.com/thread/255082743?sortBy=best
  • https://discussions.apple.com/thread/254518218?sortBy=best

In shorts, from what I understood, there is a non compatibility between openssl used in the script and LibreSSL used by Apple Keychain, resulting in the error "wrong password".

Workaround: use Firefox (does not use keychain for certificates)

But still have the 403 issue (like here) on /sparql?query=...


EDIT: Making a clean reset solve the pb (sudo rm -rf data uploads && docker-compose down -v as mentioned here)

gaetanmuck avatar Jul 18 '24 10:07 gaetanmuck

@gaetanmuck thanks for a detailed report.

I need to do more testing on MacOS... Do you see an easy fix for this? Because I don't 😅

namedgraph avatar Jul 18 '24 18:07 namedgraph

Well, except telling Google to not use KeyChain, or to tell Apple to not use LibreSSL, or to ask OpenSSL devs to make it compatible, my only solution is to use Firefox, which works normally, so may be easier than the other solutions :)

Btw when I was researching the problem, I saw that the -legacy tag on openssl calls should have had solved the problem in your setup.sh, but was not able to make it work. Do not know why

gaetanmuck avatar Jul 19 '24 04:07 gaetanmuck