Unidata / thredds-docker

Dockerized THREDDS
https://hub.docker.com/r/unidata/thredds-docker
BSD 3-Clause "New" or "Revised" License
35 stars 28 forks source link

Running thredds-docker #295

Closed lucapaganotti closed 1 year ago

lucapaganotti commented 1 year ago

node OS CentOS Linux release 7.9.2009 (Core)

kernel version

[dockadmin@arpav-dckmstr1 thredds-docker]$ uname -a
Linux arpav-dckmstr1.arpa.local 3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

and getting these docker logs

Cannot find /usr/local/tomcat/bin/setclasspath.sh
This file is needed to run this program

The displayed log also suggest, as I am in a swarm, to use docker stack deploy

[dockadmin@arpav-dckmstr1 thredds-docker]$ docker-compose up -d thredds-production
WARNING: The THREDDS_COMPOSE_ENV_LOCAL variable is not set. Defaulting to a blank string.
WARNING: The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use `docker stack deploy`.

Creating thredds ... done

using stack deploy seems to be not mandatory, anyway I also did a stack deploy, but I'm getting the same results controlling logs in the UCP interface.

Have any hint about this? Am I missing something?

Thanks for your answer.

julienchastang commented 1 year ago

Pull the latest image again. This will ensure that you have the most recent version.

docker pull unidata/thredds-docker:5.4

Try again. Does the problem persist? If yes, try running the Docker container with an interactive shell so that you can inspect the file system inside the container.

docker run -it unidata/thredds-docker:5.4 /bin/bash

Navigate to the /usr/local/tomcat/bin/ directory and check if setclasspath.sh is present.

Also, in your configuration, I wonder if you are mounting over the /usr/local/tomcat/bin/ directory. For example, in your Docker Compose file, do you have something like:

  thredds:
    volumes:
      - ./local-dir:/usr/local/tomcat/bin

?

lucapaganotti commented 1 year ago

Hi @julienchastang,

thank you for your answer, checking the image contents reveals that setclasspath.sh file is where it has to be i.e inside /usr/local/tomcat/bin..

Anyway I do not exlìplicitly mount /usr/local/tomcat/bin in my docker-compose.yml file as a volume.

Here it is my docker-compose.yml file:

version: '3'

services:
  thredds-quickstart:
    image: unidata/thredds-docker:5.4
    ports:
      - "8088:8080"
      - "9443:8443"
      - "10443:8443"

  thredds-production:
    image: unidata/thredds-docker:5.4
    ports:
      - "8088:8080"
      - "9443:8443"
      - "10443:8443"
    container_name: thredds
    volumes:
      - /mnt/nfs_share/thredds/tomcat/logs:/usr/local/tomcat/logs/
      - /mnt/nfs_share/thredds/tomcat/thredds/logs:/usr/local/tomcat/content/thredds/logs/
      - /mnt/nfs_share/thredds/tomcat/conf/tomcat-users.xml:/usr/local/tomcat/conf/tomcat-users.xml
      - /mnt/nfs_share/thredds/tomcat/content/thredds:/usr/local/tomcat/content/thredds
      - /mnt/nfs_share/thredds/data/arpa:/usr/share/thredds/data/arpa
      # - /path/to/your/data/directory2:/path/to/your/data/directory2
    env_file:
      - "compose${THREDDS_COMPOSE_ENV_LOCAL}.env"

  ###
  # TDM
  # Not strictly part of this repo, but useful to have around
  # https://github.com/Unidata/tdm-docker
  ###

  tdm:
    image: unidata/tdm-docker:latest
    container_name: tdm
    volumes:
      - /mnt/nfs_share/thredds/tomcat/content/thredds:/usr/local/tomcat/content/thredds
      - /mnt/nfs_share/thredds/data/arpa:/usr/share/thredds/data/arpa
    env_file:
      - "compose${THREDDS_COMPOSE_ENV_LOCAL}.env"

as you can see I'm declaring some binding volume but towards this container image folders/files:

If I issue

$ docker-compose up thredds-production

I get

[dockadmin@arpav-dckmstr1 thredds-docker]$ docker-compose up thredds-production
WARNING: The THREDDS_COMPOSE_ENV_LOCAL variable is not set. Defaulting to a blank string.
WARNING: The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use `docker stack deploy`.

Creating thredds ... done
Attaching to thredds
thredds               | Cannot find /usr/local/tomcat/bin/setclasspath.sh
thredds               | This file is needed to run this program
thredds exited with code 1
[dockadmin@arpav-dckmstr1 thredds-docker]$ 

Any other hint?

I think I have to change my binding volumes, maybe I need only tomcat-users.xml and my data directory.

Thanks again, have a nice day.

-- lp

lucapaganotti commented 1 year ago

To give an update,

I removed all the unidata images, pull again the unidata/thredds-docker:5.4, remove all volumes from my docker-compose.yml and issue again the command:

docker-compose up thredds-production

unfortunately I get again the same output:

[dockadmin@arpav-dckmstr1 thredds-docker]$ docker-compose up thredds-production
WARNING: The THREDDS_COMPOSE_ENV_LOCAL variable is not set. Defaulting to a blank string.
WARNING: The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use `docker stack deploy`.

Creating thredds ... done
Attaching to thredds
thredds               | Cannot find /usr/local/tomcat/bin/setclasspath.sh
thredds               | This file is needed to run this program
thredds exited with code 1
[dockadmin@arpav-dckmstr1 thredds-docker]$
lucapaganotti commented 1 year ago

Further update:

[dockadmin@arpav-dckmstr1 ~]$ docker run -it --rm unidata/thredds-docker:5.4 /bin/bash

now from / issue the command

root@9aff420dafc3:/# ./entrypoint.sh start-tomcat.sh

and get this output:

root@9aff420dafc3:/# ./entrypoint.sh start-tomcat.sh
+ trap 'echo TRAPed signal' HUP INT QUIT KILL TERM
+ startup.sh -security
Cannot find /usr/local/tomcat/bin/catalina.sh
The file is absent or does not have execute permission
This file is needed to run this program
root@9aff420dafc3:/# 

really?

Check /usr/local/tomcat/bin

root@9aff420dafc3:/usr/local/tomcat/bin# ll
total 432
drwxr-xr-x. 1 tomcat tomcat   4096 Jul 18 03:07 ./
drwxr-xr-x. 1 tomcat tomcat   4096 Jul 18 03:28 ../
-rw-r--r--. 1 tomcat tomcat  36715 Jul  6 14:43 bootstrap.jar
-rwxr-xr-x. 1 tomcat tomcat  25333 Jul 11 00:25 catalina.sh*
-rw-r--r--. 1 tomcat tomcat   1664 Jul  6 14:43 catalina-tasks.xml
-rwxr-xr-x. 1 tomcat tomcat   2007 Jul 11 00:25 ciphers.sh*
-rw-r--r--. 1 tomcat tomcat  25661 Jul  6 14:43 commons-daemon.jar
-rw-r--r--. 1 tomcat tomcat 214214 Jul  6 14:43 commons-daemon-native.tar.gz
-rwxr-xr-x. 1 tomcat tomcat   1932 Jul 11 00:25 configtest.sh*
-rwxr-xr-x. 1 tomcat tomcat   9110 Jul 11 00:25 daemon.sh*
-rwxr-xr-x. 1 tomcat tomcat   1975 Jul 11 00:25 digest.sh*
-rwxr-xr-x. 1 tomcat tomcat    902 Apr  4 22:11 javaopts.sh*
-rwxr-xr-x. 1 tomcat tomcat   4327 Jul 11 00:25 setclasspath.sh*
-rwxr-xr-x. 1 tomcat tomcat    100 Jul 28  2022 setenv.sh*
-rwxr-xr-x. 1 tomcat tomcat   1912 Jul 11 00:25 shutdown.sh*
-rwxr-xr-x. 1 tomcat tomcat    147 Apr  4 18:06 start-tomcat.sh*
-rwxr-xr-x. 1 tomcat tomcat   1914 Jul 11 00:25 startup.sh*
-rw-r--r--. 1 tomcat tomcat  52826 Jul  6 14:43 tomcat-juli.jar
-rwxr-xr-x. 1 tomcat tomcat   5550 Jul 11 00:25 tool-wrapper.sh*
-rwxr-xr-x. 1 tomcat tomcat   1918 Jul 11 00:25 version.sh*
root@9aff420dafc3:/usr/local/tomcat/bin# 

catalina.sh has execution permissions for owner, group and others.

So now issue

root@9aff420dafc3:/usr/local/tomcat/bin# /entrypoint.sh catalina.sh

getting the desired error ....

root@9aff420dafc3:/usr/local/tomcat/bin# /entrypoint.sh catalina.sh
groupadd: group 'tomcat' already exists
Cannot find /usr/local/tomcat/bin/setclasspath.sh
This file is needed to run this program
root@9aff420dafc3:/usr/local/tomcat/bin# 

Issuing

root@9aff420dafc3:/usr/local/tomcat/bin# ./setclasspath.sh 
The JAVA_HOME environment variable is not defined correctly
JAVA_HOME=/opt/java/openjdk
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
root@9aff420dafc3:/usr/local/tomcat/bin#

JAVA_HOME is pointing to /op/java/openjdk that should be fine.

now issue a simple java -version getting

root@9aff420dafc3:/usr/local/tomcat/bin# /opt/java/openjdk/bin/java -version
[0.005s][warning][os,thread] Failed to start thread "GC Thread#0" - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create worker GC thread. Out of system resources.
# An error report file with more information is saved as:
# /usr/local/tomcat/bin/hs_err_pid766.log
root@9aff420dafc3:/usr/local/tomcat/bin#

this should be the real problem, how can I increase resoursec to the thredds container?

ana-v-espinoza commented 1 year ago

Thank you for your excellent detective work!

According to the Docker documentation:

By default, a container has no resource constraints and can use as much of a given resource as the host’s kernel scheduler allows.

I'm sure you've already checked that your host machine isn't running out of memory.

I'm running a more recent version of Docker and kernel version:

ana@ubuntu:~/Documents/thredds-docker$ docker --version
Docker version 24.0.2, build cb74dfc
ana@ubuntu:~/Documents/thredds-docker$ uname --kernel-{name,release,version}
Linux 5.19.0-50-generic #50-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 10 18:24:29 UTC 2023

I'm suspicious that this may somehow be related to this aspect of your host. I might fire up a VM later to see if I can recreate your problem.

==

Ana V. E.

lucapaganotti commented 1 year ago

Thanks Ana, I will re-check the host available resources, we are trying to run thredds in a 5 nodes swarm cluster, till now we have had no such problems.

All the nodes are centOS 7 VM.

Thank you very much for your hint.

Have a nice day.


-- Dott. Ing. Luca Paganotti -- Via Baroffio 4 -- 21040 Vedano Olona (VA) -- 393 1346898

-- softech s.r.l. email: -- @. -- @. -- https://github.com/lucapaganotti -- sourceforge email: -- @.*** -- skype name: luca.paganotti [image: http://it.linkedin.com/in/lucapaganotti] http://it.linkedin.com/in/lucapaganotti


-- Mistakes are portals of discovery - JAAJ


On Fri, Jul 28, 2023 at 6:36 PM Ana Espinoza @.***> wrote:

Thank you for your excellent detective work!

According to the Docker documentation https://docs.docker.com/config/containers/resource_constraints/:

By default, a container has no resource constraints and can use as much of a given resource as the host’s kernel scheduler allows.

I'm sure you've already checked that your host machine isn't running out of memory.

I'm running a more recent version of Docker and kernel version:

@.:~/Documents/thredds-docker$ docker --version Docker version 24.0.2, build cb74dfc @.:~/Documents/thredds-docker$ uname --kernel-{name,release,version} Linux 5.19.0-50-generic #50-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 10 18:24:29 UTC 2023

I'm suspicious that this may somehow be related to this aspect of your host. I might fire up a VM later to see if I can recreate your problem.

==

Ana V. E.

— Reply to this email directly, view it on GitHub https://github.com/Unidata/thredds-docker/issues/295#issuecomment-1655979711, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOYWHMQ6QHLWTSQJU35YOTXSPTAZANCNFSM6AAAAAA2Z3XGEQ . You are receiving this because you authored the thread.Message ID: @.***>

julienchastang commented 1 year ago

Hi Luca,

I think this is an aside, but above you mention the TDM in the docker-compose.yml. The TDM is a specialized utility that creates indexes for GRIB featureCollections, but probably does not apply in your scenario. I would remove the TDM portion in the docker-compose.yml.

julienchastang commented 1 year ago

Are you able to successfully launch the quickstart, or does that option give you the same problem?

lucapaganotti commented 1 year ago

Hi Julien,

yes, I've also tried after commenting the TDM docker-compose file section, but I get the same error message.

Thank you for your hint.

Have a good day.


-- Dott. Ing. Luca Paganotti -- Via Baroffio 4 -- 21040 Vedano Olona (VA) -- 393 1346898

-- softech s.r.l. email: -- @. -- @. -- https://github.com/lucapaganotti -- sourceforge email: -- @.*** -- skype name: luca.paganotti [image: http://it.linkedin.com/in/lucapaganotti] http://it.linkedin.com/in/lucapaganotti


-- Mistakes are portals of discovery - JAAJ


On Mon, Jul 31, 2023 at 6:54 PM Julien Chastang @.***> wrote:

Hi Luca,

I think this is an aside, but above you mention the TDM in the docker-compose.yml. The TDM is a specialized utility that creates indexes for GRIB featureCollections, but probably does not apply in your scenario. I would remove the TDM portion in the docker-compose.yml.

— Reply to this email directly, view it on GitHub https://github.com/Unidata/thredds-docker/issues/295#issuecomment-1658768728, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOYWHL7F6LUASGAOQ5AS3LXS7PODANCNFSM6AAAAAA2Z3XGEQ . You are receiving this because you authored the thread.Message ID: @.***>

lucapaganotti commented 1 year ago

Hi Julien,

yes I've also tried the quickstart launch but again I get the same error.

Have a nice day.


-- Dott. Ing. Luca Paganotti -- Via Baroffio 4 -- 21040 Vedano Olona (VA) -- 393 1346898

-- softech s.r.l. email: -- @. -- @. -- https://github.com/lucapaganotti -- sourceforge email: -- @.*** -- skype name: luca.paganotti [image: http://it.linkedin.com/in/lucapaganotti] http://it.linkedin.com/in/lucapaganotti


-- Mistakes are portals of discovery - JAAJ


On Mon, Jul 31, 2023 at 7:16 PM Julien Chastang @.***> wrote:

Are you able to successfully launch the quickstart, or does that option give you the same problem?

— Reply to this email directly, view it on GitHub https://github.com/Unidata/thredds-docker/issues/295#issuecomment-1658809835, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOYWHORW7CWYMFDKMEJORTXS7R5RANCNFSM6AAAAAA2Z3XGEQ . You are receiving this because you authored the thread.Message ID: @.***>

julienchastang commented 1 year ago

Hi Luca,

Can you please provide the output of the id command on the system you are running the docker container on? (Hint: I wonder if this problem has anything to do with this.)

Thanks.

julienchastang commented 1 year ago

Also, out of curiosity and to eliminate some more unknowns, are you able to get this example to work. Further, are you able to simply run docker run --name tomcat -d tomcat.

lucapaganotti commented 1 year ago

Hi Julien, the output of the id command is this:

@.*** ~]$ id uid=1000(dockadmin) gid=1001(dockadmin) gruppi=1001(dockadmin),991(docker),1000(adm-docker) contesto=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

the compose.env file contains 1000 for both UID and GID, I changed the GID to 1001 in compose.env file to have the same UID and GID of the user launching the container, I get this output:

@.*** thredds-docker]$ docker-compose up thredds-production WARNING: The THREDDS_COMPOSE_ENV_LOCAL variable is not set. Defaulting to a blank string. WARNING: Some services (thredds-production) use the 'deploy' key, which will be ignored. Compose does not support 'deploy' configuration - use docker stack deploy to deploy to a swarm. WARNING: The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use docker stack deploy.

Creating thredds ... done Attaching to thredds thredds | Cannot find /usr/local/tomcat/bin/setclasspath.sh thredds | This file is needed to run this program thredds exited with code 1

that is what I got till now. That did not the trick.

Have a good day.


-- Dott. Ing. Luca Paganotti -- Via Baroffio 4 -- 21040 Vedano Olona (VA) -- 393 1346898

-- softech s.r.l. email: -- @. -- @. -- https://github.com/lucapaganotti -- sourceforge email: -- @.*** -- skype name: luca.paganotti [image: http://it.linkedin.com/in/lucapaganotti] http://it.linkedin.com/in/lucapaganotti


-- Mistakes are portals of discovery - JAAJ


On Tue, Aug 1, 2023 at 6:55 PM Julien Chastang @.***> wrote:

Hi Luca,

Can you please provide the output of the id command on the system you are running the docker container on? (Hint: I wonder if this problem has anything to do with this https://github.com/Unidata/tomcat-docker#configurable-tomcat-uid-and-gid .)

Thanks.

— Reply to this email directly, view it on GitHub https://github.com/Unidata/thredds-docker/issues/295#issuecomment-1660737622, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOYWHNK2YZW5RNJRFIDUHDXTEYGVANCNFSM6AAAAAA2Z3XGEQ . You are receiving this because you authored the thread.Message ID: @.***>

lucapaganotti commented 1 year ago

Hi Julien,

I've tried the example running:

docker run --name tomcat -e TOMCAT_USER_ID=1000 -e TOMCAT_GROUP_ID=1001 -v /mnt/nfs_share/thredds/thredds-docker/test:/usr/local/tomcat/webapps -d -p 8095:8080 unidata/tomcat-docker:8.5-jdk11

I get now this error:

@.*** test]$ docker logs tomcat

that basically is the same error but now referring to catalina.sh file and mentioning permissions

Using

docker run --name tomcat -d tomcat makes docker pull the latest tomcat image and gives the same error as before about the catalina.sh file

Have a nice day.


-- Dott. Ing. Luca Paganotti -- Via Baroffio 4 -- 21040 Vedano Olona (VA) -- 393 1346898

-- softech s.r.l. email: -- @. -- @. -- https://github.com/lucapaganotti -- sourceforge email: -- @.*** -- skype name: luca.paganotti [image: http://it.linkedin.com/in/lucapaganotti] http://it.linkedin.com/in/lucapaganotti


-- Mistakes are portals of discovery - JAAJ


On Tue, Aug 1, 2023 at 11:55 PM Julien Chastang @.***> wrote:

Also, out of curiosity and to eliminate some more unknowns, are you able to get this example https://github.com/Unidata/tomcat-docker#testing to work. Further, are you able to simply run docker run --name tomcat -d tomcat.

— Reply to this email directly, view it on GitHub https://github.com/Unidata/thredds-docker/issues/295#issuecomment-1661151747, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOYWHJJ626LEWX3TTIXBITXTF3MJANCNFSM6AAAAAA2Z3XGEQ . You are receiving this because you authored the thread.Message ID: @.***>

julienchastang commented 1 year ago

Thank you for running those diagnostics.

docker run --name tomcat -d tomcat makes docker pull the latest tomcat image and gives the same error as before about the catalina.sh file

OK, then you don't have a unidata/thredds-docker or a unidata/tomcat-docker problem. You have a docker problem. Over the course of this thread, we've noticed some out-of-date software, e.g., 3.10 series Linux kernel. The Docker version in question is also quite old. CentOS has also been end-of-lifed, I believe. As mentioned earlier, you may first try to choose to modernize this system, if at all possible.

lucapaganotti commented 1 year ago

Hi @julienchastang,

as an update on this, I got access to another virtual machine (not in the test swarm cluster), an ubuntu 20.04 box, I updated the whole system, installed docker at the last version

$ docker version
Client: Docker Engine - Community
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.20.6
 Git commit:        ced0996
 Built:             Fri Jul 21 20:35:23 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.5
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.6
  Git commit:       a61e2b4
  Built:            Fri Jul 21 20:35:23 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.22
  GitCommit:        8165feabfdfe38c65b599c4993d227328c231fca
 runc:
  Version:          1.1.8
  GitCommit:        v1.1.8-0-g82f18fe
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

pulled the unidata/thredds-docker:5.4 image and issued

$ docker compose up -d thredds-production

I then got

WARN[0000] The "THREDDS_COMPOSE_ENV_LOCAL" variable is not set. Defaulting to a blank string. 
[+] Running 3/3
 ✔ Network thredds-docker_default                                                                                                     Created                              0.1s 
 ✔ Container thredds                                                                                                                  Started                              0.4s 
 ! thredds-production Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.

and then

$ docker ps -a

getting

CONTAINER ID   IMAGE                        COMMAND                  CREATED         STATUS                   PORTS                                                                                                                               NAMES
d1e17fd5be11   unidata/thredds-docker:5.4   "/entrypoint.sh cata…"   8 minutes ago   Up 8 minutes (healthy)   0.0.0.0:5902->8080/tcp, :::5902->8080/tcp, 0.0.0.0:9443->8443/tcp, 0.0.0.0:10443->8443/tcp, :::9443->8443/tcp, :::10443->8443/tcp   thredds

so I can see the deafult thredds web interface @ :5902/thredds.

So it was definetely a docker issue that is now in charge to network and system administrators.

I need to investigate now what does this means

! thredds-production Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.

but I suppose is a performance/memory limitation of this test environment. If you just have another hint on that it will be greatly appreciated.

Thank you for your valuable help.

Have a nice day.

lucapaganotti commented 1 year ago

Hi,

as a further update, I'm able to query the thredds-data-server but I'm getting these kind of exceptions everytime I try to use the preview tab and go to the Godiva3 viewer.

2023-08-17T08:11:53.488 +0000 [ 578960238][   57307] INFO  - threddsServlet - Remote host: 10.10.116.93 - Request: "GET /thredds/wms/radar/FLERO_interp_CAPPI.nc?request=GetMetadata&item=menu HTTP/1.1"
2023-08-17T08:11:53.489 +0000 [ 578960239][   57307] ERROR - uk.ac.rdg.resc.edal.wms.WmsServlet - Problem with GET request
java.lang.NullPointerException: null
        at thredds.server.wms.config.LayerSettings.replaceNullValues(LayerSettings.java:156) ~[classes/:5.4]
        at thredds.server.wms.config.WmsDetailedConfig.getSettings(WmsDetailedConfig.java:196) ~[classes/:5.4]
        at thredds.server.wms.TdsEnhancedVariableMetadata.<init>(TdsEnhancedVariableMetadata.java:45) ~[classes/:5.4]
        at thredds.server.wms.ThreddsWmsCatalogue.getLayerMetadata(ThreddsWmsCatalogue.java:423) ~[classes/:5.4]
        at uk.ac.rdg.resc.edal.wms.util.WmsUtils.getLayerMetadata(WmsUtils.java:285) ~[edal-wms-1.5.0.5-SNAPSHOT.jar:?]
        at uk.ac.rdg.resc.edal.wms.WmsServlet.addVariablesToArray(WmsServlet.java:1111) ~[edal-wms-1.5.0.5-SNAPSHOT.jar:?]
        at uk.ac.rdg.resc.edal.wms.WmsServlet.showMenu(WmsServlet.java:1082) ~[edal-wms-1.5.0.5-SNAPSHOT.jar:?]
        at uk.ac.rdg.resc.edal.wms.WmsServlet.getMetadata(WmsServlet.java:1034) ~[edal-wms-1.5.0.5-SNAPSHOT.jar:?]
        at uk.ac.rdg.resc.edal.wms.WmsServlet.dispatchWmsRequest(WmsServlet.java:391) ~[edal-wms-1.5.0.5-SNAPSHOT.jar:?]
        at thredds.server.wms.ThreddsWmsServlet.dispatchWmsRequest(ThreddsWmsServlet.java:120) ~[classes/:5.4]
        at uk.ac.rdg.resc.edal.wms.WmsServlet.doGet(WmsServlet.java:303) [edal-wms-1.5.0.5-SNAPSHOT.jar:?]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:489) [servlet-api.jar:?]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:583) [servlet-api.jar:?]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:212) [catalina.jar:8.5.91]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) [catalina.jar:8.5.91]
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) [tomcat-websocket.jar:8.5.91]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:181) [catalina.jar:8.5.91]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) [catalina.jar:8.5.91]
        at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:330) [catalina.jar:8.5.91]
        at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:155) [catalina.jar:8.5.91]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:181) [catalina.jar:8.5.91]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) [catalina.jar:8.5.91]
        at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:129) [catalina.jar:8.5.91]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:181) [catalina.jar:8.5.91]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) [catalina.jar:8.5.91]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327) [spring-security-web-5.6.5.jar:5.6.5]
        at thredds.servlet.filter.RequestBracketingLogMessageFilter.doFilter(RequestBracketingLogMessageFilter.java:50) [classes/:5.4]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.5.jar:5.6.5]
        at thredds.servlet.filter.RequestQueryFilter.doFilter(RequestQueryFilter.java:90) [classes/:5.4]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.5.jar:5.6.5]
        at thredds.servlet.filter.HttpHeadFilter.doFilter(HttpHeadFilter.java:47) [classes/:5.4]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.5.jar:5.6.5]
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211) [spring-security-web-5.6.5.jar:5.6.5]
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183) [spring-security-web-5.6.5.jar:5.6.5]
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) [spring-web-5.3.20.jar:5.3.20]
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) [spring-web-5.3.20.jar:5.3.20]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:181) [catalina.jar:8.5.91]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) [catalina.jar:8.5.91]
        at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) [log4j-web-2.17.1.jar:2.17.1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:181) [catalina.jar:8.5.91]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) [catalina.jar:8.5.91]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) [catalina.jar:8.5.91]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) [catalina.jar:8.5.91]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483) [catalina.jar:8.5.91]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) [catalina.jar:8.5.91]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) [catalina.jar:8.5.91]
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:682) [catalina.jar:8.5.91]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [catalina.jar:8.5.91]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:8.5.91]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:617) [tomcat-coyote.jar:8.5.91]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) [tomcat-coyote.jar:8.5.91]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:932) [tomcat-coyote.jar:8.5.91]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1694) [tomcat-coyote.jar:8.5.91]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) [tomcat-coyote.jar:8.5.91]
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-util.jar:8.5.91]
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-util.jar:8.5.91]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.91]
        at java.lang.Thread.run(Thread.java:829) [?:?]

but I don't have an idea of what that really means, is it something related to my configuration files? Or is it about the wms java servlet not finding what it needs? It seems not able to get that file metadata ...

Thank you for any answer.

julienchastang commented 1 year ago

Thanks for the reply @lucapaganotti. At this point, I don't think this is a unidata/thredds-docker issue strictly speaking. Could you possibly submit this issue to unidata/tds ? Also, after some internal discussion, we believe it may be your wmsConfig.xml file that may be the root issue, so point us to that as well. Thanks again!

lucapaganotti commented 1 year ago

Hi @julienchastang, thank you for your reply, I do not touched/modified the wmsConfig.xml file. Anyway here it is its content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wmsConfig SYSTEM "https://www.unidata.ucar.edu/schemas/thredds/dtd/ncwms/wmsConfig.dtd">
<!--
Detailed configuration of the WMS service.  This config file can be used to
set default styling parameters for each dataset/variable, and to enable or disable
the GetFeatureInfo operation.
-->
<wmsConfig>
    <global>
        <!-- These settings apply to all datasets unless overridden below -->
        <defaults>
            <!-- The global defaults. All elements are mandatory -->
            <allowFeatureInfo>true</allowFeatureInfo>
            <defaultColorScaleRange>-50 50</defaultColorScaleRange>
            <defaultPaletteName>psu-viridis</defaultPaletteName>
            <defaultNumColorBands>20</defaultNumColorBands>
            <logScaling>false</logScaling>
            <intervalTime>false</intervalTime>
        </defaults>
        <standardNames>
            <!-- Use this section to set defaults per standard name -->
            <!-- Units must come from the UDUNITS vocabulary -->
            <standardName name="sea_water_potential_temperature" units="K">
                <defaultColorScaleRange>268 308</defaultColorScaleRange>
            </standardName>
            <standardName name="sea_water_temperature" units="K">
                <defaultColorScaleRange>268 308</defaultColorScaleRange>
            </standardName>
            <standardName name="mass_concentration_of_chlorophyll_in_sea_water" units="kg m-3">
                <logScaling>true</logScaling>
            </standardName>
        </standardNames>
    </global>
    <overrides>
        <datasetPath pathSpec="testAll/20040503*_eta_211.nc">
            <!-- Will apply to all paths that match the path spec above -->
            <pathDefaults>
                <!-- These will apply to all variables in this path unless overridden below -->
                <allowFeatureInfo>false</allowFeatureInfo>
                <defaultPaletteName>x-Occam</defaultPaletteName>
            </pathDefaults>

            <variables>
                <!-- Configure variables individually according to their internal ID.
                     This is the most specific setting and will override any others -->
                <variable id="Z_sfc">
                    <defaultColorScaleRange>0 2920</defaultColorScaleRange>
                </variable>
            </variables>
        </datasetPath>
        <datasetPath pathSpec="testAll/20040504*_eta_211.nc">
            <!-- Will apply to all paths that match the path spec above -->
            <pathDefaults>
                <!-- These will apply to all variables in this path unless overridden below -->
                <allowFeatureInfo>true</allowFeatureInfo>
                <defaultPaletteName>seq-Reds</defaultPaletteName>
            </pathDefaults>
            <variables>
                <!-- Configure variables individually according to their internal ID.
                     This is the most specific setting and will override any others -->
                <variable id="Z_sfc">
                    <defaultColorScaleRange>0 3170</defaultColorScaleRange>
                </variable>
            </variables>
        </datasetPath>
    </overrides>
</wmsConfig>

I've updated my catalog.xml file in order to use my .nc files. I'm able to view my dataset and datasetScan setup in thredds web interface, i.e. I see the correct file names and url paths, but when I try to view them using the Godiva3 viewer I get in thredds logs this:

2023-08-24T10:12:18.798 +0000 [    534577][      54] WARN  - uk.ac.rdg.resc.edal.dataset.cdm.NetcdfDatasetAggregator - Dataset /usr/local/tomcat/content/thredds/public/data/arpa/FLERO_interp_CAPPI.nc is not in active dataset list but has been asked to be released!  This is not harmful in itself but may indicate a coding error whereby a dataset has been marked to be released from the cache multiple times.

I do not know what means that my nc file is not in active dataset list, how can I instruct thredds to see this dataset/datasetScan as active?

It says that it's a simple warning that should not be harmful but behind it there could be a coding error. How can I check this?

Then I get the same stack trace I sent in my previous reply.

If you need them I can attach here all the configuration files, logs and data files I'm using for testing.

I can then open the same issue to unidata/tds.

Have a nice day and thank you again.

tdrwenski commented 1 year ago

Hi @lucapaganotti,

2023-08-24T10:12:18.798 +0000 [ 534577][ 54] WARN - uk.ac.rdg.resc.edal.dataset.cdm.NetcdfDatasetAggregator - Dataset /usr/local/tomcat/content/thredds/public/data/arpa/FLERO_interp_CAPPI.nc is not in active dataset list but has been asked to be released! This is not harmful in itself but may indicate a coding error whereby a dataset has been marked to be released from the cache multiple times.

You can safely ignore this warning, it comes from a third party library we use and it occurs more often.

Could you please open an issue on unidata/tds with the stack trace above, the wmsConfig.xml, your catalog or at least the part of the catalog for this dataset, and the .nc file in the dataset with the issue (or a link to where we can download it)? Then we can try to reproduce your issue.

lucapaganotti commented 1 year ago

Hi Tara,

thank you for your reply, I've opened today an issue @ unidata/tds repository.

Best regards.


-- Dott. Ing. Luca Paganotti -- Via Baroffio 4 -- 21040 Vedano Olona (VA) -- 393 1346898

-- softech s.r.l. email: -- @. -- @. -- https://github.com/lucapaganotti -- sourceforge email: -- @.*** -- skype name: luca.paganotti [image: http://it.linkedin.com/in/lucapaganotti] http://it.linkedin.com/in/lucapaganotti


-- Mistakes are portals of discovery - JAAJ


On Thu, Aug 24, 2023 at 5:27 PM Tara Drwenski @.***> wrote:

Hi @lucapaganotti https://github.com/lucapaganotti,

2023-08-24T10:12:18.798 +0000 [ 534577][ 54] WARN - uk.ac.rdg.resc.edal.dataset.cdm.NetcdfDatasetAggregator - Dataset /usr/local/tomcat/content/thredds/public/data/arpa/FLERO_interp_CAPPI.nc is not in active dataset list but has been asked to be released! This is not harmful in itself but may indicate a coding error whereby a dataset has been marked to be released from the cache multiple times.

You can safely ignore this warning, it comes from a third party library we use and it occurs more often.

Could you please open an issue on unidata/tds with the stack trace above, the wmsConfig.xml, your catalog or at least the part of the catalog for this dataset, and the .nc file in the dataset with the issue (or a link to where we can download it)? Then we can try to reproduce your issue.

— Reply to this email directly, view it on GitHub https://github.com/Unidata/thredds-docker/issues/295#issuecomment-1691897441, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOYWHNMGPZCLHLBWZHYSGDXW5XERANCNFSM6AAAAAA2Z3XGEQ . You are receiving this because you were mentioned.Message ID: @.***>

tdrwenski commented 1 year ago

Thank you! We will have a look!