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

Not able to run latest Knora Version #955

Closed
janCstoffregen opened this issue Jul 30, 2018 · 12 comments · Fixed by #959
Closed

Not able to run latest Knora Version #955

janCstoffregen opened this issue Jul 30, 2018 · 12 comments · Fixed by #959
Assignees
Labels
bug something isn't working
Milestone

Comments

@janCstoffregen
Copy link

Dear dhlab,
when I start and compile Knora as described on the README, it gives me the following error ( I only imported ontologies from your repository )

reStart
[info] Application webapi not yet started
[info] Starting application webapi in the background ...
webapi Starting org.knora.webapi.Main.main()
webapi[ERROR] objc[87402]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/bin/java (0x10f0db4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1101454e0). One of the two will be used. Which one is undefined.
[success] Total time: 13 s, completed Jul 30, 2018 2:30:13 PM
sbt:webapi> webapi [2018-07-30 14:30:21,904] INFO  - KnoraService(akka://webapi) - KnoraService - applicationStateActorReady
webapi KnoraService - startupTaskRunner starting
webapi [2018-07-30 14:30:24,214] INFO  - KnoraService(akka://webapi) - KnoraService - Startup State: StartingUp
webapi [2018-07-30 14:30:25,022] INFO  - KnoraService(akka://webapi) - KnoraService - Startup State: WaitingForRepository
webapi [2018-07-30 14:30:26,044] INFO  - KnoraService(akka://webapi) - KnoraService - checkRepository - status: NotInitialized: None of the available repositories meet our requirements of id: knora-test, sesameType: owlim:MonitorRepository.
webapi [2018-07-30 14:30:26,045] INFO  - KnoraService(akka://webapi) - Please initialize repository. Will exit now.
webapi[ERROR] Exception in thread "main" akka.pattern.AskTimeoutException: Recipient[Actor[akka://webapi/user/applicationState#-117355951]] had already been terminated. Sender[null] sent the message of type "org.knora.webapi.messages.app.appmessages.GetAppState".
webapi[ERROR] 	at akka.pattern.AskableActorRef$.internalAsk$extension(AskSupport.scala:291)
webapi[ERROR] 	at akka.pattern.AskableActorRef$.$qmark$extension1(AskSupport.scala:283)
webapi[ERROR] 	at org.knora.webapi.KnoraService.startupTaskRunner(KnoraService.scala:225)
webapi[ERROR] 	at org.knora.webapi.KnoraService.startService(KnoraService.scala:185)
webapi[ERROR] 	at org.knora.webapi.KnoraService.startService$(KnoraService.scala:177)
webapi[ERROR] 	at org.knora.webapi.Main$.startService(Main.scala:29)
webapi[ERROR] 	at org.knora.webapi.Main$.delayedEndpoint$org$knora$webapi$Main$1(Main.scala:82)
webapi[ERROR] 	at org.knora.webapi.Main$delayedInit$body.apply(Main.scala:29)
webapi[ERROR] 	at scala.Function0.apply$mcV$sp(Function0.scala:34)
webapi[ERROR] 	at scala.Function0.apply$mcV$sp$(Function0.scala:34)
webapi[ERROR] 	at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
webapi[ERROR] 	at scala.App.$anonfun$main$1$adapted(App.scala:76)
webapi[ERROR] 	at scala.collection.immutable.List.foreach(List.scala:389)
webapi[ERROR] 	at scala.App.main(App.scala:76)
webapi[ERROR] 	at scala.App.main$(App.scala:74)
webapi[ERROR] 	at org.knora.webapi.Main$.main(Main.scala:29)
webapi[ERROR] 	at org.knora.webapi.Main.main(Main.scala)
webapi ... finished with exit code 1

This happens on Mac and Ubuntu.

Thank you so much for your help.

Best regards,
Jan

@janCstoffregen janCstoffregen added the bug something isn't working label Jul 30, 2018
@benjamingeer
Copy link

The error message says:

None of the available repositories meet our requirements of id: knora-test, sesameType: owlim:MonitorRepository

Since #921, a GraphDB repository has to be of type owlim:MonitorRepository. This is set in the repository configuration file when the repository is created. Perhaps the Docker image dhlabbasel/graphdb-free hasn't been updated since then. @subotic ?

@janCstoffregen
Copy link
Author

Dear dhlab,
Sascha found the fix.

In graphdb-free-knora-test-repository-config.ttl

rep:repositoryType "owlim:MonitorRepository" ; and
sail:sailType "owlim:Sail" ;

It works now and I would like to do a pull request, but I'd like to ask if this has to be included then in the following file as well: graphdb-free-knora-test-repository-config.ttl

@subotic
Copy link
Collaborator

subotic commented Aug 6, 2018

I forgot about this use case. When graphdb-free is used, then according to the GraphDB documentation, the following settings should be used:

...
rep:repositoryType "graphdb:FreeSailRepository" ;
        sr:sailImpl [
            sail:sailType "graphdb:FreeSail" ;
...

To be able to know which setting to expect, we would need to have a distinction in application.conf.

I would thus suggest, to add graphdb-free and graphdb-se as separate values for dbtype (instead of graphdb).

@janCstoffregen
Copy link
Author

sorry, I meant should it be included in this file as well: graphdb-free-knora-test-unit-repository-config.ttl

@janCstoffregen
Copy link
Author

I can't estimate what your proposal implies, it would be nice to only set the variable for the db once though, in application.conf and the import scripts for example read this file and check which database you chose so that there is online one "init-knora-test-unit.sh" - file and not one for each database.

@subotic
Copy link
Collaborator

subotic commented Aug 6, 2018

Yes, the init scripts are not very user-friendly. I'm working on a more user-friendly version here, but his will take some time though as this is a side project of mine with a low priority.

I'm refactoring the graphdb-free scripts so that they behave the same as the graphdb-se scripts. You would need to use the correct one, depending on which GraphDB version you are using.

@subotic subotic added this to the v1.7.0 milestone Aug 6, 2018
@janCstoffregen
Copy link
Author

I agree, it's not so important, just a little bit more convenient.

@subotic
Copy link
Collaborator

subotic commented Aug 9, 2018

wip in #959

@janCstoffregen could you maybe try out the branch from #959 and see if it works for you?

@janCstoffregen
Copy link
Author

When using the webapi docker image with the environment variable set to graphdb, this error occurs again.. I know how to change it, just for your information.

@janCstoffregen janCstoffregen reopened this Dec 5, 2018
@subotic
Copy link
Collaborator

subotic commented Dec 5, 2018

The supported graphdb types are graphdb-free or graphdb-se.

@subotic subotic closed this as completed Dec 5, 2018
@janCstoffregen
Copy link
Author

So I thought if you use the docker webapi, you still have to declare the graphdb variable so that this message does not occur...

but I get this message again, after executing

 ./graphdb-free-docker-init-knora-test.sh

and using the docker webapi

@janCstoffregen
Copy link
Author

I set the variable in application.conf to graphdb-free, I meant the environment variable in the docker-compose file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants