Communication Error with Cytomine core

Hello everyone,

First of all, I apologize if this is a duplicate issue as this problem has already been discussed in
other threads.
But as those have been marked as solved I didn’t want to bump them.
Also our problem seems to be stemming from a different cause as we are trying to test cytomine
on local machines only (as in running on the same computer).

We receive the same ‘Error of communication with Cytomine core’.

pic-selected-200710-1058-09

Here are the answers to the checklist as posted in the the previuosly linked threads:

  • Do you have the 127.0.0.1 localhost-core line into your /etc/hosts files?

Yes, all the lines stated in the documentation have been added to /etc/hosts.

  • What is your OS/distribution ?

This is where our problem begins:

We first tested cytomine on a remote server running Ubuntu, where it seemed to work as expected.

Then we (a team of 3) tried installing cytomine locally, running MacOS, Manjaro Linux and Arch Linux
respectively. We each received the error mentioned above.

  • Did you install Cytomine on your laptop (more exactly the same PC that is running your browser) ? Or is it installed on another computer that the one you are using?

See above.

  • Can you get localhost-core/server/ping.json from a curl command in a terminal (
    curl -v localhost-core
    ,
    curl -v localhost-core/server/ping.json
    and
    curl -vX POST http://localhost-core/server/ping.json
    ) as well as in your browser ?
$ curl -v localhost-core
*   Trying 127.0.0.1:80...
* Connected to localhost-core (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> Host: localhost-core
> User-Agent: curl/7.71.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx/1.10.1
< Date: Fri, 10 Jul 2020 09:16:34 GMT
< Connection: keep-alive
< Last-Modified: Tue, 28 Apr 2020 13:10:41 GMT
< ETag: "5ea82b51-358"
< Accept-Ranges: bytes
<
* Connection #0 to host localhost-core left intact
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href="/favicon.ico?v=2"><title>Cytomine</title><link href=/css/app.c80dd102.css rel=preload as=style><link href=/css/chunk-vendors.e0f0dd85.css rel=preload as=style><link href=/js/app.330b1011.js rel=preload as=script><link href=/js/chunk-vendors.a2779da0.js rel=preload as=script><link href=/css/chunk-vendors.e0f0dd85.css rel=stylesheet><link href=/css/app.c80dd102.css rel=stylesheet></head><body><noscript><strong>We're sorry but this Cytomine Web-UI doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.a2779da0.js></script><script src=/js/app.330b1011.js></script></body></html>%

curl -v localhost-core/server/ping.json and curl -vX POST http://localhost-core/server/ping.json result in 404 errrors on Arch Linux, but work under MacOS.

  • Can you send me the following file :
    – configs/core/cytomineconfig.groovy
    – configs/nginx/nginx.conf
    – configs/nginx/dist/configuration.json

cytomine-configs.zip (5.7 KB)

  • Here are the outputs for sudo docker logs core -t | grep -v INFO and sudo docker ps

cytomine-docker-logs.zip (6.0 KB)

It seems to have some sort of problem with thread execution.

SEVERE: The web application [] appears to have started a thread named [be.cytomine.middleware.MessageBrokerServer.data] but has failed to stop it. This is very likely to create a memory leak.

Any help with this would be greatly appreciated :slight_smile:
Feel free to tell me if you need any other logs or information.

Hello,

Thank you for your interest into Cytomine.

In the cytomine-core-docker.log file I see the following line

...is not a valid e-mail address

But the
grails.admin.email
value is the default one. :confused:

What is the result of the command line
sudo docker exec -it core cat /usr/share/tomcat7/.grails/cytomineconfig.groovy
?

Renaud

Hello @geektortoise, thanks for your response :slight_smile:

This is the output for sudo docker exec -it core cat /usr/share/tomcat7/.grails/cytomineconfig.groovy (run after a clean build):

dataSource.url='jdbc:postgresql://postgresql:5432/docker'
dataSource.username='docker'
dataSource.password='docker'

cytomine.customUI.global = [
        dashboard: ["ALL"],
        search : ["ROLE_ADMIN"],
        project: ["ALL"],
        ontology: ["ROLE_ADMIN"],
        storage : ["ROLE_USER","ROLE_ADMIN"],
        activity : ["ALL"],
        feedback : ["ROLE_USER","ROLE_ADMIN"],
        explore : ["ROLE_USER","ROLE_ADMIN"],
        admin : ["ROLE_ADMIN"],
        help : ["ALL"]
]


grails.serverURL='http://localhost-core'
grails.imageServerURL=['http://localhost-ims','http://localhost-ims2']
grails.uploadURL='http://localhost-upload'

storage_buffer='/data/images/_buffer'
storage_path='/data/images'

grails.adminPassword='60b3aa7b-7e2b-4575-b3c5-ecb86057a7f4'
grails.adminPrivateKey='42d2433b-7462-4de5-8a82-512853b6cece'
grails.adminPublicKey='48f16a8a-8066-418d-b5be-53b123f8e190'
grails.superAdminPrivateKey='8623dcc1-8b9f-4a4b-8d2d-1319ced77466'
grails.superAdminPublicKey='6a7018cc-2f14-4b94-8794-bea57ff31fbd'
grails.ImageServerPrivateKey='8564269f-253c-428e-aef8-a100f56453c6'
grails.ImageServerPublicKey='88c4bcaa-b7d6-41e1-bde0-414fe8ff8013'
grails.rabbitMQPrivateKey='10dc27e7-b2f0-4fd7-b3d7-3fd63864ee67'
grails.rabbitMQPublicKey='981d9446-c048-4284-ae2f-61fc0e06dd03'

grails.notification.email='your.email@gmail.com'
grails.notification.password='password'
grails.notification.smtp.host='smtp.gmail.com'
grails.notification.smtp.port='587'
grails.admin.email='info@cytomine.coop'

grails.mongo.host = 'mongodb'
grails.mongo.options.connectionsPerHost=10
grails.mongo.options.threadsAllowedToBlockForConnectionMultiplier=5

grails.messageBrokerServerURL='rabbitmq:5672'

grails.serverID='d5dfe5c0-715c-4c85-9720-592a7dff46c9'

I realize i’ve left the dummy notification email data as is. Could that be the problem?
I didn’t bother changing it as I just intended to spin it up for a test run.

Hello,
Sorry for the delay.

As, I don’t see what is the problem, I uploaded a war file with specific additional debug instructions
You can download it at the url https://cytomine.org/core.war.
Move this war into the bootstrap folder.

To include it, modify your start_deploy.sh script and add
docker cp $PWD/core.war core:/var/lib/tomcat7/webapps/ROOT.war
before the line
docker start core

and run the restart.sh script

Renaud