ImagingDataCommons / slim

Interoperable web-based slide microscopy viewer and annotation tool
https://imagingdatacommons.github.io/slim/
Apache License 2.0
120 stars 39 forks source link

docker-compose deployment bug? #131

Closed Steven-N-Hart closed 2 years ago

Steven-N-Hart commented 2 years ago

Docker was able to successfully build each image successfully using docker-compose up -d [with no errors or warnings]. The slim viewer is also displayed at localhost:8008. However, a modal appears saying: An error occurred. Search for studies failed. I suspect this has something to do with the dcm4chee instance, since when I try to run a query:

dicomweb_client -vvvvv --url http://localhost:8008/dcm4chee-arc/aets/DCM4CHEE/rs store instances ~/Desktop/Case-A/4c7cd7c7-d5a2-0f2e-0faa-553139f8fa18_073326/1.3.6.1.4.1.36533.1171137312611170711401821851643189224242163.dcm

the response is:

2022-11-11 13:34:45 | DEBUG    | dicomweb_client.session_utils            | 20   | initialize HTTP session
2022-11-11 13:34:45 | INFO     | dicomweb_client.web                      | 2642 | store instances
2022-11-11 13:34:45 | INFO     | dicomweb_client.web                      | 1487 | store data in chunks using chunked transfer encoding
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1483 | POST: http://localhost:8008/dcm4chee-arc/aets/DCM4CHEE/rs/studies {'Content-Type': 'multipart/related; type="application/dicom"; boundary="0f3cf5c0-70e0-41ef-baef-c6f9f65ec3e1"', 'Transfer-Encoding': 'chunked', 'Cache-Control': 'no-cache', 'Connection': 'Keep-Alive'}
2022-11-11 13:34:45 | DEBUG    | urllib3.connectionpool                   | 227  | Starting new HTTP connection (1): localhost:8008
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #0
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #1
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #2
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #3
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #4
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #5
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #6
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #7
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #8
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #9
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #10
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #11
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #12
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1469 | serve data chunk #13
2022-11-11 13:34:45 | DEBUG    | dicomweb_client.web                      | 1502 | request status code: 500
2022-11-11 13:34:45 | ERROR    | dicomweb_client.cli                      | 665  | 500 Server Error: Internal Server Error for url: http://localhost:8008/dcm4chee-arc/aets/DCM4CHEE/rs/studies
2022-11-11 13:34:45 | ERROR    | dicomweb_client.cli                      | 668  | Traceback (most recent call last):
  File "/home/m087494/.local/lib/python3.10/site-packages/dicomweb_client/cli.py", line 662, in main
    args.func(client, args)
  File "/home/m087494/.local/lib/python3.10/site-packages/dicomweb_client/cli.py", line 632, in _store_instances
    client.store_instances(datasets)
  File "/home/m087494/.local/lib/python3.10/site-packages/dicomweb_client/web.py", line 2650, in store_instances
    return self._http_post_multipart_application_dicom(
  File "/home/m087494/.local/lib/python3.10/site-packages/dicomweb_client/web.py", line 1551, in _http_post_multipart_application_dicom
    response = self._http_post(
  File "/home/m087494/.local/lib/python3.10/site-packages/dicomweb_client/web.py", line 1503, in _http_post
    response.raise_for_status()
  File "/home/m087494/.local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:8008/dcm4chee-arc/aets/DCM4CHEE/rs/studies

This also happens if I just search for instances or studies:

$ dicomweb_client -vvvvv --url http://localhost:8008/dcm4chee-arc/aets/DCM4CHEE/rs search studies

2022-11-11 13:37:17 | DEBUG    | dicomweb_client.session_utils            | 20   | initialize HTTP session
2022-11-11 13:37:17 | INFO     | dicomweb_client.web                      | 1640 | search for studies
2022-11-11 13:37:17 | DEBUG    | dicomweb_client.web                      | 520  | GET: http://localhost:8008/dcm4chee-arc/aets/DCM4CHEE/rs/studies {'Accept': 'application/dicom+json, application/json', 'Host': 'localhost'}
2022-11-11 13:37:17 | DEBUG    | urllib3.connectionpool                   | 227  | Starting new HTTP connection (1): localhost:8008
2022-11-11 13:37:17 | DEBUG    | urllib3.connectionpool                   | 452  | http://localhost:8008 "GET /dcm4chee-arc/aets/DCM4CHEE/rs/studies HTTP/1.1" 500 86
2022-11-11 13:37:17 | DEBUG    | dicomweb_client.web                      | 535  | request status code: 500
2022-11-11 13:37:17 | ERROR    | dicomweb_client.cli                      | 665  | 500 Server Error: Internal Server Error for url: http://localhost:8008/dcm4chee-arc/aets/DCM4CHEE/rs/studies
2022-11-11 13:37:17 | ERROR    | dicomweb_client.cli                      | 668  | Traceback (most recent call last):
  File "/home/m087494/.local/lib/python3.10/site-packages/dicomweb_client/cli.py", line 662, in main
    args.func(client, args)
  File "/home/m087494/.local/lib/python3.10/site-packages/dicomweb_client/cli.py", line 460, in _search_for_studies
    studies = client.search_for_studies(**params)
  File "/home/m087494/.local/lib/python3.10/site-packages/dicomweb_client/web.py", line 1649, in search_for_studies
    return self._http_get_application_json(
  File "/home/m087494/.local/lib/python3.10/site-packages/dicomweb_client/web.py", line 604, in _http_get_application_json
    return get(url, params, stream)
  File "/home/m087494/.local/lib/python3.10/site-packages/dicomweb_client/web.py", line 575, in get
    response = self._http_get(
  File "/home/m087494/.local/lib/python3.10/site-packages/dicomweb_client/web.py", line 536, in _http_get
    response.raise_for_status()
  File "/home/m087494/.local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:8008/dcm4chee-arc/aets/DCM4CHEE/rs/studies

Note that all services are up and running:

$ docker ps
CONTAINER ID   IMAGE                               COMMAND                  CREATED          STATUS          PORTS                                                                              NAMES
85abc482bc84   slim_app                            "/usr/bin/dumb-init …"   20 minutes ago   Up 19 minutes   0.0.0.0:8008->8008/tcp, :::8008->8008/tcp                                          slim_app_1
29cdfddfd955   dcm4che/dcm4chee-arc-psql:5.26.0    "/docker-entrypoint.…"   20 minutes ago   Up 19 minutes   2575/tcp, 2762/tcp, 8080/tcp, 8443/tcp, 9990/tcp, 9993/tcp, 11112/tcp, 12575/tcp   slim_arc_1
e37ec2272d49   dcm4che/slapd-dcm4chee:2.6.0-26.0   "/docker-entrypoint.…"   20 minutes ago   Up 20 minutes   389/tcp                                                                            slim_ldap_1
88abbb51469f   dcm4che/postgres-dcm4chee:14.2-26   "docker-entrypoint.s…"   20 minutes ago   Up 20 minutes   5432/tcp 

Is there supposed to be one more step in the configuration I'm missing?

hackermd commented 2 years ago

@Steven-N-Hart thanks for reporting the issue. I am not sure what's going on. Did you take a look at the dcm4chee application server log? Unfortunately, dcm4chee doesn't redirect log messages to stderr, so one needs to read the log file in the container:

docker compose exec arc tail -n 1000 /opt/wildfly/standalone/log/server.log

That should reveal the source of the problem.

Steven-N-Hart commented 2 years ago

Thanks. I don't know why it was erroring out before, but I re-downloaded everything and I'm good to go.