EBISPOT / OLS

Ontology Lookup Service from SPOT at EBI
http://www.ebi.ac.uk/ols
Apache License 2.0
96 stars 40 forks source link

Latest git pull of https://github.com/EBISPOT/ontotools-docker doesn't start on Centos 7 or 8 #491

Closed HowardLander closed 3 years ago

HowardLander commented 3 years ago

Hi all

I've done a nice fresh pull of https://github.com/EBISPOT/ontotools-docker but I'm having trouble making it work on Centos 7 or Centos 8. It works fine on my mac. I'm using the redeploy.sh script that comes with the code base, though I did add a -x to the #! /bin/bash line so I could follow what was happening:

Here's the relevant part of the failure on Centos 8 (it's the same on Centos 7):

Of course there is much more, but I think that's the relevant part.

Interesting, if I run the script as root, I get a slightly different result:

2021-07-02 19:16:43,418 INFO main LoadingApplication.logStarting - Starting LoadingApplication v3.2.1-SNAPSHOT on neurobridges.edc.renci.org with PID 1 (/opt/ols-indexer.jar started by root in /) 2021-07-02 19:16:43,427 DEBUG main LoadingApplication.logStarting - Running with Spring Boot v1.3.8.RELEASE, Spring v4.2.8.RELEASE 2021-07-02 19:16:43,428 INFO main LoadingApplication.logStartupProfileInfo - No active profile set, falling back to default profiles: default 2021-07-02 19:16:46,966 INFO main OLSEnv.getOLSHome - $OLS_HOME: /mnt/ 2021-07-02 19:16:52,863 DEBUG main FileUpdatingService.checkForUpdates - Starting file update check for neurobridges_ontology 2021-07-02 19:16:52,865 INFO ThreadPoolTaskExecutor-1 FileUpdatingService.run - Checking status of neurobridges_ontology 2021-07-02 19:16:52,906 INFO ThreadPoolTaskExecutor-1 FileUpdater.getFile - Downloading neurobridges_ontology from file:/projects/neurobridges/ols/OLS/config/NeuroBridge_062821.owl 2021-07-02 19:16:52,906 DEBUG ThreadPoolTaskExecutor-1 OLSEnv.getOLSHome - ols.home: /mnt/ 2021-07-02 19:16:52,911 ERROR ThreadPoolTaskExecutor-1 FileUpdatingService.run - Error checking: NeuroBridgesFailed to download file: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection uk.ac.ebi.spot.ols.exception.FileUpdateServiceException: Failed to download file: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection at uk.ac.ebi.spot.ols.util.FileUpdater.getFile(FileUpdater.java:138) at uk.ac.ebi.spot.ols.service.FileUpdatingService$FileUpdatingTask.run(FileUpdatingService.java:103) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection

Since it runs on my mac, I'm guessing that there could be something weird about my Centos file system permissions, but I can't see what. Has anyone seen anything like this?

All ideas/suggestions gratefully accepted. If this is the wrong place to post this, could someone please direct me to the proper place.

Best Howard Lander howard@renci.org

matentzn commented 3 years ago

We are also running it on centos, my initial thought is that somehow there is a problem with pwd. Can you verify that all these directories are created?

https://github.com/EBISPOT/ontotools-docker/blob/f4a510dda510eb2d871bbe7915f83152c455b24c/redeploy.sh#L26

HowardLander commented 3 years ago

The directories seem to be there, but they look a little wonky to me...

The ols-downloads dir seems ok but I'm not sure the ownership of the others is OK. We are not running this on local disk, so the directories are nsf mounted. Maybe that explains it? Maybe I need to create service account in the correct group?

ls -ld ols oxo zooma-data/ drwxr-sr-x 2 howard storage-neurobridges 4.0K Jul 9 13:47 ols-downloads/ drwxr-sr-x 4 nfsnobody storage-neurobridges 4.0K Jul 12 13:03 ols-neo4j-data/ drwxr-sr-x 2 nfsnobody storage-neurobridges 4.0K Jul 12 13:04 oxo-neo4j-import/ drwxr-sr-x 4 nfsnobody storage-neurobridges 4.0K Jul 12 13:06 zooma-data//

Does this help at all? Howard

matentzn commented 3 years ago

hmm interesting.. can you try running it on a local disk to just triangulate the problem a bit? I can imagine NFS mount problems for sure.. There are hundreds of tickets about docker and NFS volumes, and its possible they need to be mounted in a special way..

HowardLander commented 3 years ago

I'm not sure, as these are virtual machines. I'll see what I can figure out,

HowardLander commented 3 years ago

So it does turn out to be an NFS issue. Essentially, the volume I was trying to use was mounted using the "no-root-squash" option. Since docker runs by default as root, it was trying to do things it did not have permission to do. I've fixed the problem by running on a different, albeit less desirable volume. That volume is also mounted, but without the no-root-squash option. Another choice would be to not run docker as root, but having fixed my problem for now, I am content to move on.

matentzn commented 3 years ago

@HowardLander thanks a ton for sharing that - this is hugely useful for me (and I assume the rest of the community) to know!

I will close the issue then, please feel free to reopen if that was hasty.