protegeproject / webprotege

The webprotege code base
Other
627 stars 251 forks source link

Trouble on bootstraping webprotégé with an Admin Account when using Docker #603

Open Piks19 opened 5 years ago

Piks19 commented 5 years ago

I'm using docker i.e the webprotégé app and the mongodb are running in different container. To botstrap web protégé with an Admin account I've used the command line below:

docker exec -it webprotege java -jar webprotege-cli.jar create-admin-account

Here is the result

Exception in thread "main" com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches WritableServerSelector. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}] at com.mongodb.connection.BaseCluster.createTimeoutException(BaseCluster.java:377) at com.mongodb.connection.BaseCluster.selectServer(BaseCluster.java:104) at com.mongodb.binding.ClusterBinding$ClusterBindingConnectionSource.<init>(ClusterBinding.java:75) at com.mongodb.binding.ClusterBinding$ClusterBindingConnectionSource.<init>(ClusterBinding.java:71) at com.mongodb.binding.ClusterBinding.getWriteConnectionSource(ClusterBinding.java:68) at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:411) at com.mongodb.operation.MixedBulkWriteOperation.execute(MixedBulkWriteOperation.java:168) at com.mongodb.operation.MixedBulkWriteOperation.execute(MixedBulkWriteOperation.java:74) at com.mongodb.Mongo.execute(Mongo.java:845) at com.mongodb.Mongo$2.execute(Mongo.java:828) at com.mongodb.MongoCollectionImpl.executeSingleWriteRequest(MongoCollectionImpl.java:550) at com.mongodb.MongoCollectionImpl.replaceOne(MongoCollectionImpl.java:369) at edu.stanford.bmir.protege.web.server.user.UserRecordRepository.save(UserRecordRepository.java:68) at edu.stanford.bmir.protege.web.server.cmdline.SetupTools.createAdministratorAccount(SetupTools.java:80) at edu.stanford.bmir.protege.web.server.cmdline.SetupTools.createAdministratorAccount(SetupTools.java:65) at edu.stanford.bmir.protege.web.server.cmdline.SetupTools.main(SetupTools.java:120) at edu.stanford.bmir.protege.web.server.cmdline.CreateAdminAccountCmd.run(CreateAdminAccountCmd.java:17) at edu.stanford.bmir.protege.web.server.cmdline.WebProtegeCli.run(WebProtegeCli.java:48) at edu.stanford.bmir.protege.web.server.cmdline.WebProtegeCli.main(WebProtegeCli.java:58)

timcroydon commented 4 years ago

I've started encountering this problem. Worked fine the other day and then my WebProtege container stopped being able to communicate with mongo. Tried removing all Docker artefacts and reinstalling but issue persists. No other errors encountered and can see the login page fine.

Platform: OSX Docker engine: 19.05.5 build 633a0ea Docker desktop: 2.2.0.0 (42247)