AtomGraph / LinkedDataHub

The low-code Knowledge Graph application platform. Apache license.
https://atomgraph.github.io/LinkedDataHub/
Apache License 2.0
485 stars 122 forks source link

Got "Internal Server Error" when browsing https://localhost:4443/ #134

Closed FNakano closed 1 year ago

FNakano commented 1 year ago

Hello, I'm installing LinkedDataHub. Followed the instructions in https://atomgraph.github.io/LinkedDataHub/linkeddatahub/docs/get-started/setup/. The docker-compose up --build command exited with a permission denied error which was overcome by prepending sudo. Is it ok, or, is it expected? It looks that the webserver is up (Fuseki with Tomcat?). I navigated to https://localhost:4443/ using the certificate generated by ./scripts/setup.sh .env ssl $owner_cert_pwd $secretary_cert_pwd 3650 and imported into Firefox as instructed in https://atomgraph.github.io/LinkedDataHub/linkeddatahub/docs/get-started/get-an-account/. Got the messages in the screen capture below:

Captura de tela de 2022-10-02 17-04-57

Messages in the terminal running sudo docker-compose up --build:

linkeddatahub_1     | 02-Oct-2022 21:31:44.449 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/usr/local/tomcat/conf/Catalina/localhost/ROOT.xml] has finished in [3,457] ms
linkeddatahub_1     | 02-Oct-2022 21:31:44.451 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-7070"]
linkeddatahub_1     | 02-Oct-2022 21:31:44.455 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [3477] milliseconds
^[[A^[[A^[[A^[[B^[[Bnginx_1             | 172.18.0.1 - - [02/Oct/2022:19:40:59 +0000] "GET / HTTP/1.1" 500 1012 "https://atomgraph.github.io/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0"
nginx_1             | 172.18.0.1 - - [02/Oct/2022:19:40:59 +0000] "GET /favicon.ico HTTP/1.1" 404 774 "https://localhost:4443/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0"
nginx_1             | 172.18.0.1 - - [02/Oct/2022:19:41:28 +0000] "GET / HTTP/1.1" 500 1012 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0"

How can I fix it?

namedgraph commented 1 year ago

Hi @FNakano. Looks like something's wrong with the config file. The sudo part is weird, but LinkedDataHub should be able to run under a non-root user. Some steps we can try:

FNakano commented 1 year ago

Hi, @namedgraph .

All the names and password were created to try out LinkedDataHub. If any name/password is expected match users in the computer LinkedDataHub is installed, there could cause an error.

Here is the .env complete listing:

COMPOSE_CONVERT_WINDOWS_PATHS=1
COMPOSE_PROJECT_NAME=linkeddatahub

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

# owner's WebID certificate properties
OWNER_MBOX=fabio@localhost
OWNER_GIVEN_NAME=Fabio
OWNER_FAMILY_NAME=Doe
OWNER_ORG_UNIT=Unique
OWNER_ORGANIZATION=Me
OWNER_LOCALITY=SomeCity
OWNER_STATE_OR_PROVINCE=SomeState
OWNER_COUNTRY_NAME=SomeCountry

SECRETARY_CERT_PASSWORD=H&ureka5!

SECRETARY_CERT_PASSWORD=fabio

SECRETARY_CERT_PASSWORD=H&ureka5!

SECRETARY_CERT_PASSWORD=H&ureka5!

I don't remember to have written these four SECRETARY_CERT_PASSWORD lines. I actually inserted the values while generating ssl certificates. I believe these lines were inserted in .env in the build process.

I didn´t record that full console log. It is lost. I can generate another one. Just send me instructions.

Where can I get the $container_id ?

Thanks, Fábio.

namedgraph commented 1 year ago

You can get container ID by looking at the output of docker ps.

I think I know what the problem is though -- you have configured the system base URI in the .env file as https://localhost:4443/home/fabio, and application base URIs are resolved against that. But you're attempting to open https://localhost:4443/ instead.

Try leaving the ABS_PATH as in the example, i.e. ABS_PATH=/. Otherwise you would need to use ABS_PATH=/home/fabio/ and open https://localhost:4443/home/fabio/.

(Updated, ignore the config file comment)

FNakano commented 1 year ago

Hi, @namedgraph . It works! I followed your instructions about .env file: (leave the ABS_PATH as in the example). Then I did some silly thing: erase the local copy of LinkedDataHub and clone (the forked repo) again. Followed the setup instructions, replaced the certificate in the browser. Got the initial screen: Captura de tela de 2022-10-05 13-05-49 Now I can go further. Thank you!

namedgraph commented 1 year ago

Great! Thanks for giving it a try.