Error of communication with Cytomine core

Hi, I strictly followed the procedure there https://doc.cytomine.org/How-to-install-Cytomine?structure=Admins to install Cytomine locally. I did not modify configuration.h and I added to my /etc/hosts file the following lines

127.0.0.1   localhost-core
127.0.0.1   localhost-ims
127.0.0.1   localhost-ims2
127.0.0.1   localhost-upload
127.0.0.1   rabbitmq

When I try to access to the UI from Chrome, I get this

COMMUNICATION ERROR
Error of communication with Cytomine core

and using Chrome dev tools

localhost-core/server/ping.json:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED

The /etc/hosts file of the running nginx docker container contains this line

172.17.0.11     core cfc84a7b6300

and I do not understand why “core” and not “localhost-core”…
Any idea ?
Thanks a lot !
Michael

1 Like

Hi @Michael_Benguigui

Sorry for very late reply. Notifications from imagesc were not activated although we thought they were… Sigh.

Here are some suggestions from our team:

Is your nginx container running ? If not, do you have something else running on port 80 ?

Is localhost-ims responding in your browser (you should get a “Welcome to Grails” page) ? If it does, then this is not a network issue but probably something going wrong with starting core. Please check logs and try to locate error messages:

sudo docker logs core -t

Best,
Raphaël.

Me too.


I also followed https://doc.cytomine.org/How-to-install-Cytomine
and accessed my URL for cytomine (and it does not work…).

It seems nginx is working.

~/Cytomine_bootstrap# docker ps
CONTAINER ID        IMAGE                             COMMAND             CREATED             STATUS              PORTS                                              NAMES
da279425403a        cytomine/software_router:v1.1.1   "/tmp/deploy.sh"    9 minutes ago       Up 9 minutes        22/tcp                                             software_router
a95fc6e2ca42        cytomine/nginx:v1.2.0             "/tmp/deploy.sh"    11 minutes ago      Up 11 minutes       0.0.0.0:80->80/tcp, 443/tcp                        nginx
0b1dd9a47297        cytomine/core:v2.0.0              "/tmp/deploy.sh"    12 minutes ago      Up 12 minutes       8080/tcp                                           core
6688c4541789        cytomine/ims:v1.2.2               "/tmp/deploy.sh"    12 minutes ago      Up 12 minutes       8080-8082/tcp                                      ims
7fc1fb9b1456        cytomine/bioformat:v1.1.2         "/tmp/deploy.sh"    13 minutes ago      Up 13 minutes                                                          bioformat
76341443f8bc        cytomine/iipcyto:v1.2.1           "/tmp/deploy.sh"    14 minutes ago      Up 14 minutes                                                          iipCyto
342be376fa2a        cytomine/iipofficial:v1.2.0       "/tmp/deploy.sh"    14 minutes ago      Up 14 minutes                                                          iipOff
19b8452c32ec        cytomine/mongodb:v1.1.2           "/tmp/deploy.sh"    15 minutes ago      Up 15 minutes       27017/tcp, 28017/tcp                               mongodb
a13554889b77        cytomine/postgis:v2.0.0           "/tmp/deploy.sh"    15 minutes ago      Up 15 minutes       5432/tcp                                           postgresql
d54249500e39        cytomine/rabbitmq:v1.1.2          "/run.sh"           15 minutes ago      Up 15 minutes       0.0.0.0:5672->5672/tcp, 0.0.0.0:15672->15672/tcp   rabbitmq
222811fe8153        cytomine/memcached:v1.1.2         "/run.sh"           16 minutes ago      Up 16 minutes       11211/tcp                                          memcached

I found an error in docker logs core -t

~/Cytomine_bootstrap# docker logs core -t | grep ERROR
2020-02-22T03:22:16.527111170Z 22-02-2020 03:22:15,536 ERROR ResourceMeta - Resource not found: /css/scaffolding.css

Is this error related to the

COMMUNICATION ERROR
Error of communication with Cytomine core

?

I also tried reporting.sh.
But I don’t know what to look at in the generated files.
If you know about that, please let me know.

~/Cytomine_bootstrap# sh reporting.sh 
rm: cannot remove './reporting.tgz': No such file or directory
reporting/
reporting/catalinaCore.out
reporting/start_deploy.sh
reporting/logIIPCyto.out
reporting/catalinaIMS.out
reporting/configurationIMS.properties
reporting/configurationCore.groovy
reporting/logIIPOff.out

Hello,

I’m a contributor of the Cytomine project :slight_smile:
If you try to access the following URL : localhost-core/server/ping.json
What is the response ?
It should be a valid JSON with 6 elements.

As you can see this error message, it means that the nginx is running. So the core is not running or is unreacheable by the nginx component.

Can you copy the result of the command

sudo docker logs core

?

2 Likes

The response is

{"alive":true,"authenticated":false,"version":"2.0.0","serverURL":"http://localhost-core","serverID":"8a1f3593-a640-41d1-a903-e499ee4fefe5"}

and the result of the command is

~# docker logs core|grep -v INFO
 * Starting Tomcat servlet engine tomcat7
   ...fail!
Feb 22, 2020 3:21:47 AM org.apache.catalina.startup.Catalina load
Feb 22, 2020 3:21:47 AM org.apache.catalina.core.StandardService startInternal
Feb 22, 2020 3:21:47 AM org.apache.catalina.core.StandardEngine startInternal
Feb 22, 2020 3:21:47 AM org.apache.catalina.startup.HostConfig deployWAR
Feb 22, 2020 3:21:50 AM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
Feb 22, 2020 3:21:55 AM org.apache.catalina.startup.TaglibUriRule body
Feb 22, 2020 3:21:55 AM org.apache.catalina.startup.TldConfig execute
log4j:WARN No appenders could be found for logger (net.bull.javamelody).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
External config file: [file:/usr/share/tomcat7/.grails/cytomineconfig.groovy]
###########################################################################
###########################################################################
/usr/share/tomcat7/.grails/cytomineconfig.groovy=true
[dataSource:[url:jdbc:postgresql://postgresql:5432/docker, username:docker, 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, imageServerURL:[http://localhost-ims, http://localhost-ims2], uploadURL:http://localhost-upload, adminPassword:d10851b0-33d4-463f-8249-2b002cdc4b7d, adminPrivateKey:6c7c761c-2835-4b9a-a6cc-e0a465b60298, adminPublicKey:367438ba-288f-4531-b616-11387baac15b, superAdminPrivateKey:5040d08d-0ec7-401f-a45e-5abf8b7c00d2, superAdminPublicKey:ca320ca5-9a33-4343-b000-e66f05ab58d2, ImageServerPrivateKey:28ba03d9-7fdf-4fc3-8db5-fe943f3ae7cf, ImageServerPublicKey:17836663-370b-4a45-a339-4320d9e12c75, rabbitMQPrivateKey:428d5d40-451b-4eee-838f-0039fb1ef5c8, rabbitMQPublicKey:87ae0c20-cd82-4a49-8a6d-fc8b240ffcb6, notification:[email:your.email@gmail.com, password:passwd, smtp:[host:smtp.gmail.com, port:587]], admin:[email:info@cytomine.coop], mongo:[host:mongodb, options:[connectionsPerHost:10, threadsAllowedToBlockForConnectionMultiplier:5]], messageBrokerServerURL:rabbitmq:5672, serverID:8a1f3593-a640-41d1-a903-e499ee4fefe5], storage_buffer:/data/images/_buffer, storage_path:/data/images]
cas.active=false
disable CAS
Log4j consoleLevel
External config file: [file:/usr/share/tomcat7/.grails/cytomineconfig.groovy]
###########################################################################
###########################################################################
/usr/share/tomcat7/.grails/cytomineconfig.groovy=true
[dataSource:[url:jdbc:postgresql://postgresql:5432/docker, username:docker, 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, imageServerURL:[http://localhost-ims, http://localhost-ims2], uploadURL:http://localhost-upload, adminPassword:d10851b0-33d4-463f-8249-2b002cdc4b7d, adminPrivateKey:6c7c761c-2835-4b9a-a6cc-e0a465b60298, adminPublicKey:367438ba-288f-4531-b616-11387baac15b, superAdminPrivateKey:5040d08d-0ec7-401f-a45e-5abf8b7c00d2, superAdminPublicKey:ca320ca5-9a33-4343-b000-e66f05ab58d2, ImageServerPrivateKey:28ba03d9-7fdf-4fc3-8db5-fe943f3ae7cf, ImageServerPublicKey:17836663-370b-4a45-a339-4320d9e12c75, rabbitMQPrivateKey:428d5d40-451b-4eee-838f-0039fb1ef5c8, rabbitMQPublicKey:87ae0c20-cd82-4a49-8a6d-fc8b240ffcb6, notification:[email:your.email@gmail.com, password:passwd, smtp:[host:smtp.gmail.com, port:587]], admin:[email:info@cytomine.coop], mongo:[host:mongodb, options:[connectionsPerHost:10, threadsAllowedToBlockForConnectionMultiplier:5]], messageBrokerServerURL:rabbitmq:5672, serverID:8a1f3593-a640-41d1-a903-e499ee4fefe5], storage_buffer:/data/images/_buffer, storage_path:/data/images]
cas.active=false
disable CAS

Configuring Spring Security Core ...
... finished configuring Spring Security Core


Configuring Spring Security ACL ...
... finished configuring Spring Security ACL

22-02-2020 03:22:05,346  WARN GrailsUtil - [WARNING] Property [readingRole] of domain class be.cytomine.meta.Configuration has type [be.cytomine.meta.Configuration$Role] and doesn't support constraint [blank]. This constraint will not be checked during validation.
22-02-2020 03:22:05,351  WARN GrailsUtil - [WARNING] Property [index] of domain class be.cytomine.middleware.AmqpQueueConfig has type [java.lang.Integer] and doesn't support constraint [blank]. This constraint will not be checked during validation.
22-02-2020 03:22:05,351  WARN GrailsUtil - [WARNING] Property [isInMap] of domain class be.cytomine.middleware.AmqpQueueConfig has type [java.lang.Boolean] and doesn't support constraint [blank]. This constraint will not be checked during validation.
22-02-2020 03:22:05,379  WARN GrailsUtil - [WARNING] Property [queue] of domain class be.cytomine.middleware.AmqpQueueConfigInstance has type [be.cytomine.middleware.AmqpQueue] and doesn't support constraint [blank]. This constraint will not be checked during validation.
22-02-2020 03:22:05,379  WARN GrailsUtil - [WARNING] Property [config] of domain class be.cytomine.middleware.AmqpQueueConfigInstance has type [be.cytomine.middleware.AmqpQueueConfig] and doesn't support constraint [blank]. This constraint will not be checked during validation.
22-02-2020 03:22:05,641  WARN ConfigurationFactory - No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: jar:file:/var/lib/tomcat7/webapps/ROOT/WEB-INF/lib/ehcache-core-2.4.8.jar!/ehcache-failsafe.xml
22-02-2020 03:22:11,520  WARN ConfigurationFactory - No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: jar:file:/var/lib/tomcat7/webapps/ROOT/WEB-INF/lib/ehcache-core-2.4.8.jar!/ehcache-failsafe.xml
22-02-2020 03:22:11,532  WARN CacheManager - Creating a new instance of CacheManager using the diskStorePath "/tmp/tomcat7-tomcat7-tmp" which is already used by an existing CacheManager.
The source of the configuration was net.sf.ehcache.config.generator.ConfigurationSource$DefaultConfigurationSource@49c20c5c.
The diskStore path for this CacheManager will be set to /tmp/tomcat7-tomcat7-tmp/ehcache_auto_created_1582341731532.
To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
  Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

22-02-2020 03:22:15,261  WARN ModuleDeclarationsFactory - 'grails.resources.modules' in config does not define any modules
22-02-2020 03:22:15,339  WARN ResourceProcessor - There is a dependency on module [bootstrap] by module [scaffolding] but no such module has been defined
22-02-2020 03:22:15,536 ERROR ResourceMeta - Resource not found: /css/scaffolding.css
22-02-2020 03:22:15,540  WARN ResourceProcessor - Cannot locate resource [/css/scaffolding.css]
22-02-2020 03:22:17,167  WARN GrailsUtil - [WARNING] Property [readingRole] of domain class be.cytomine.meta.Configuration has type [be.cytomine.meta.Configuration$Role] and doesn't support constraint [blank]. This constraint will not be checked during validation.
22-02-2020 03:22:17,171  WARN GrailsUtil - [WARNING] Property [index] of domain class be.cytomine.middleware.AmqpQueueConfig has type [java.lang.Integer] and doesn't support constraint [blank]. This constraint will not be checked during validation.
22-02-2020 03:22:17,171  WARN GrailsUtil - [WARNING] Property [isInMap] of domain class be.cytomine.middleware.AmqpQueueConfig has type [java.lang.Boolean] and doesn't support constraint [blank]. This constraint will not be checked during validation.
22-02-2020 03:22:17,171  WARN GrailsUtil - [WARNING] Property [queue] of domain class be.cytomine.middleware.AmqpQueueConfigInstance has type [be.cytomine.middleware.AmqpQueue] and doesn't support constraint [blank]. This constraint will not be checked during validation.
22-02-2020 03:22:17,171  WARN GrailsUtil - [WARNING] Property [config] of domain class be.cytomine.middleware.AmqpQueueConfigInstance has type [be.cytomine.middleware.AmqpQueueConfig] and doesn't support constraint [blank]. This constraint will not be checked during validation.
                   _____      _                  _
                  / ____|    | |                (_)
                 | |    _   _| |_ ___  _ __ ___  _ _ __   ___
                 | |   | | | | __/ _ \| '_ ` _ \| | '_ \ / _ \
                 | |___| |_| | || (_) | | | | | | | | | |  __/
                  \_____\__, |\__\___/|_| |_| |_|_|_| |_|\___|
                 |  _ \  __/ |     | |     | |
                 | |_) ||___/  ___ | |_ ___| |_ _ __ __ _ _ __
                 |  _ < / _ \ / _ \| __/ __| __| '__/ _` | '_ \
                 | |_) | (_) | (_) | |_\__ \ |_| | | (_| | |_) |
                 |____/ \___/ \___/ \__|___/\__|_|  \__,_| .__/
                                                         | |
                                                         |_|
        
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
  Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

Feb 22, 2020 3:22:21 AM org.apache.catalina.startup.HostConfig deployWAR
Feb 22, 2020 3:22:21 AM org.apache.coyote.AbstractProtocol start
Feb 22, 2020 3:22:21 AM org.apache.catalina.startup.Catalina start
org.quartz.JobExecutionException: be.cytomine.Exception.ServerException [See nested exception: be.cytomine.Exception.ServerException]
	at grails.plugins.quartz.GrailsJobFactory$GrailsJob.execute(GrailsJobFactory.java:111)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: be.cytomine.Exception.ServerException
	at be.cytomine.processing.ImageRetrievalService.indexMissingAnnotation(ImageRetrievalService.groovy:265)
	at GrailsMelodyGrailsPlugin$_closure4_closure16_closure17.doCall(GrailsMelodyGrailsPlugin.groovy:184)
	at be.cytomine.job.IndexMissingAnnotationJob.execute(IndexMissingAnnotationJob.groovy:30)
	at grails.plugins.quartz.GrailsJobFactory$GrailsJob.execute(GrailsJobFactory.java:104)
	... 2 more
23-02-2020 01:00:00,092 ERROR ExceptionPrinterJobListener - Exception occurred in job: Grails Job
org.quartz.JobExecutionException: be.cytomine.Exception.ServerException [See nested exception: be.cytomine.Exception.ServerException]
	at grails.plugins.quartz.GrailsJobFactory$GrailsJob.execute(GrailsJobFactory.java:111)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: be.cytomine.Exception.ServerException
	at be.cytomine.processing.ImageRetrievalService.indexMissingAnnotation(ImageRetrievalService.groovy:265)
	at GrailsMelodyGrailsPlugin$_closure4_closure16_closure17.doCall(GrailsMelodyGrailsPlugin.groovy:184)
	at be.cytomine.job.IndexMissingAnnotationJob.execute(IndexMissingAnnotationJob.groovy:30)
	at grails.plugins.quartz.GrailsJobFactory$GrailsJob.execute(GrailsJobFactory.java:104)
	... 2 more

@kozo2

As the ping is responding, the nginx communication seems good. :confused:

Do you have any message into your browser console ?
Also in the Network panel of the “Developer bar” of the browser, do you have http requests with a 400,404 or 500 code ?

To all : as new users seems to not be authorized to post more than 3 replies (if an admin read this, could you confirm ?), this thread continue there : Error of communication with Cytomine core [part2].