protegeproject / webprotege

The webprotege code base
Other
628 stars 253 forks source link

Webprotégé is not configured properly #450

Closed JulJac closed 6 years ago

JulJac commented 6 years ago

Hi all there,

I'm new to webprotege so it might be an easy answer, but I cant find any solution :(

on a brand new Ubuntu-server 16.04 with openssh and Centrify-Express (Hyper-V virtual-machine) I installed a webprotege (following https://github.com/protegeproject/webprotege/wiki/WebProt%C3%A9g%C3%A9-3.0.0-Installation) Java 8 JDK (following https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04) Tomcat 8 (following https://devops.profitbricks.com/tutorials/how-to-install-and-configure-tomcat-8-on-ubuntu-1604/ from step "Create Tomcat User") and mongoDB-Enterprice (following https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-ubuntu/)

I also set data.directory=/srv/webprotege application.host=vm105.ad.popsenteret.no:8080/webprotege

in the webprotege.log it shows:

2018-02-22 10:06:31.855 INFO Initializing WebProtege 2018-02-22 10:06:56.297 INFO Loading webprotege.properties from /etc/webprotege/webprotege.properties 2018-02-22 10:07:10.147 INFO Loading mail.properties from /etc/webprotege/mail.properties 2018-02-22 10:07:12.096 INFO Max Memory: 910 MB 2018-02-22 10:07:12.098 INFO Initialized WebProtege 2018-02-22 10:15:58.839 INFO Found style customization file at /etc/webprotege/webprotege.css 2018-02-22 10:16:00.879 WARN System notification email address is not specified 2018-02-22 10:16:00.880 WARN Application host is not specified 2018-02-22 10:16:00.889 WARN Cannot construct well-formed application URL. (java.net.URISyntaxException: Expected hostname at index 8: https://:443) 2018-02-22 10:16:00.890 WARN Cannot construct well-formed project URLs. (java.net.URISyntaxException: Expected hostname at index 8: https://:443#projects/5a6229f8-b2c3-4f58-a97f-a83f00679ab9/edit/Classes) 2018-02-22 10:16:00.896 WARN Cannot construct well-formed OWL Entity URLs. (java.net.URISyntaxException: Expected hostname at index 8: https://:443#projects/6f3f0c30-3435-4ec1-b3f1-b3e36329206d/edit/Classes?selection=Class(owl:Thing))

could anyone give me some good advice ? why does it still say Application host is not specified?

Thanks! Julius

MarcoSpano commented 6 years ago

Try to run MongoDB and Tomcat. If you try to connect to the website (localhost:8080) what do you see? I had the same issue and following the final part of the configuration (https://github.com/protegeproject/webprotege/wiki/WebProt%C3%A9g%C3%A9-3.0.0-Installation#bootstrap-webprot%C3%A9g%C3%A9-with-an-admin-account) I have resolved.

Maybe this closed issue can help: https://github.com/protegeproject/webprotege/issues/447

JulJac commented 6 years ago

HI and thanks for your fast reply. I already looked at the issue #447.

mongodb is running and writing ongoing log files tomcat is also running and writing all it's log's

(but to shoure i stoped both and restarted first mongodb and than tomcat) ...I also tried a normal restart of the server. but sofar

I followed your recomendet installation guide, including the part "Bootstrap WebProtégé with an Admin Account" but since I'm only getting a red bar telling me "WebProtégé is not configured properly" and I can't sign in I cannot follow the last step "Edit the WebProtégé Settings" :( webprotege is not configured properly

MarcoSpano commented 6 years ago

Have you already created the admin account using the command line tool?

Download https://github.com/protegeproject/webprotege/releases/download/v3.0.0/webprotege-3.0.0-cli.jar and execute it with java -jar webprotege-3.0.0-cli.jar create-admin-account. The tool asks for initial admin account credentials.

JulJac commented 6 years ago

Yes.... I created the adminaccount, and it looked like it went all right.

I now knowticed in the #447 issue they are also talking about apache2? do I need apache2 to run webprotege?

MarcoSpano commented 6 years ago

I installed it on Windows and I didn't use apache2.. has Tomcat all the permission to write in /srv/webprotege? And have you already created these directories? My problem was different because I had the red bar like you but I had also the sign in form..

MarcoSpano commented 6 years ago

Another thing.. have you put the webprotege.properties file (with the data.directory=/srv/webprotege directive) in /etc/webprotege?

JulJac commented 6 years ago

so I went throu all folders once more... all are owned by the tomcat user and now I even added read/write permissions for everyone. and still the same result.

My guess is that for some reasons webprotege doesent set "application.host" as its "Application Host" or at least that's wat it claims in the log file. but I can't think of anything else in order to get application.host in. what I did is seting up the file /etc/webprotege/webprotege.properties and add the lines data.directory=/srv/webprotege application.host=vm110.ad.popsenteret.no:8080/webprotege

JulJac commented 6 years ago

it also claimes in the log file that there is a webprotege.css file in /etc/webprotege. but there isn't. so now I copied the css file from .../webapps/css/webprotege.css in to /etc/webprotege/webprotege.css

and it's still the same ;(

MarcoSpano commented 6 years ago

The host is configured after you log in with the admin account, so maybe it can't take the application.host directive from the file..

JulJac commented 6 years ago

hm... that would mean to delete the application.host setting from the webprotege.properties fiele? testet that now... but no luck.

MarcoSpano commented 6 years ago

no, that mean maybe WebProtege doesn't take that setting because you have to set it later from the admin account, but if you haven't the sign in form it's a bit hard..

JulJac commented 6 years ago

;) yes that's hard

JulJac commented 6 years ago

but just to double check, application.host=localhost:8080/webprotege should be the right setting in "webprotege.properties"?

JulJac commented 6 years ago

...at least if I open webprotege on the same mashine...

MarcoSpano commented 6 years ago

This is my webprotege.properties put in C:\ProgramData\WebProtege folder. As you can see I haven't the application.host setting:

############### WebProtege Properties ###############

# This file documents the required and optional properties for WebProtege.
# WebProtege loads the webprotege.properties file from the classpath of the
# web application.

# To change the default values used by WebProtege, copy this file
# on to the classpath i.e. for tomcat, make sure that it resides in
# webapps/webprotege/classes.

############### REQUIRED PROPERTIES ###############

# -------- data.directory ----------- #
# The directory where WebProtege data is stored.
# Must be writable by the user under which tomcat runs.
# Example: /srv/webprotege
# REQUIRED
data.directory=C:\\srv\\webprotege

############### OPTIONAL PROPERTIES ###############

# -------- application.version ----------#
# The version of WebProtege.  This is usually set at build time and does not normally
# need to be altered.
# Default: Automatically generated
# Optional
application.version=3.0.0

# -------- logs.directory ----------- #
# Default: /var/log/webprotege
 logs.directory=C:\\ProgramData\\WebProtege\\Logs

# -------- mongodb.host ----------- #
# The host name of the mongodb server.
# Default: localhost
# Optional
#mongodb.host=localhost

# -------- mongodb.port ----------- #
# The port number of the mongodb server.
# Default: 27017
# Optional
#mongodb.port=27017

your /srv/webprotege folder is empty? Maybe Tomcat can't write inside that folder..

JulJac commented 6 years ago

Yes, since I now took out the application.host my property file is the same (beside the Windows/Linux differance in the folder structure)

hm do you have any other good idea? and thanks for your help so far!

MarcoSpano commented 6 years ago

No problem :) I had a different issue so I really don't know why you can't see the sign in form.. maybe try to re-create all the folders and try to re-set all permissions.. (and try to access with Chrome instead of Internet Explorer). Let's wait for the reply of a developer :)

JulJac commented 6 years ago

what version of mongoDB are you using?

MarcoSpano commented 6 years ago

MongoDB 3.6 with default port

matthewhorridge commented 6 years ago

Just a heads up, we no longer use webprotege.properties for specifying application host and similar parameters. These are now specified via the application settings page.

@MarcoSpano what browser are you using? Is it Internet Explorer? Sorry, it's hard to tell.

matthewhorridge commented 6 years ago

Oooops sorry, that question was to @JulJac

what browser are you using? Is it Internet Explorer? Sorry, it's hard to tell.

JulJac commented 6 years ago

Hi sorry.... I was bussy rebuilding the whole server... on the local mashine I dont have any GUI /since it's a server ... so I use wget http://localhost:8080/webprotege and on an other windows server in the same LAN I'm using internet explorer could it be the browser?

JulJac commented 6 years ago

....... THANKS............

OK, I don't know what to say than thanks! In chrome I can see the login, and use the admin login... jep most often it's the easy things you don't try.

Thanks and Hilsen fra Norge (Greetings from Norway)

wcafdbg commented 4 years ago

Do you follow the configuration, or the prompt "webprot é g é is not configured properly"

sorenwacker commented 2 weeks ago

I just had to go to http://localhost:8080/#application/settings and switch scheme to http.