Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

failed to loading image

Open zhan2016 opened this issue 7 years ago • 13 comments

Hello, I had tried to set up ohif viewer with orthanc docker on a cloud server.And i want to visit OHIF viewer with http://serverIP:3000. The images couldn't loading from orthanc with an error like this:

image the console return with error: image I set up as this process: https://github.com/OHIF/Viewers/wiki/Orthanc-with-Docker-Usage the only difference is how meteor started:

METEOR_PACKAGE_DIRS="../Packages" ROOT_URL=http://47.101.197.152:3000  meteor --settings ../config/orthancDICOMWeb.json --allow-superuser   (remove ROOT_URL  also not work!)

orthancDICOMWeb.json:

{
    "servers": {
        "dicomWeb": [
            {
                "name": "Orthanc",
                "wadoUriRoot": "http://localhost:8042/wado",
                "qidoRoot": "http://localhost:8042/dicom-web",
                "wadoRoot": "http://localhost:8042/dicom-web",
                "qidoSupportsIncludeField": false,
                "imageRendering": "wadouri",
                "thumbnailRendering": "wadouri",
                "requestOptions": {
                    "auth": "orthanc:orthanc",
                    "logRequests": true,
                    "logResponses": true,
                    "logTiming": true
                }
            }
        ]
    },
    "defaultServiceType": "dicomWeb",
    "dropCollections": true,
    "public": {
        "verifyEmail": false,
        "ui": {
            "studyListFunctionsEnabled": true,
            "leftSidebarOpen": false,
            "displaySetNavigationLoopOverSeries": false,
            "displaySetNavigationMultipleViewports": true,
            "autoPositionMeasurementsTextCallOuts": "TRLB",
            "studyListDateFilterNumDays": 1
        }
    },
    "proxy": {
        "enabled": true
    }
}

I had opened port 3000, 8042, 4242 on cloud server console. I can visit "http://47.101.197.152:8042 with orthanc and orthanc". When i tried to visit "http://47.101.197.152:3000", I could get studylist. but image load failed. I had tried all the solutions as mentiented: #226 #57 .
OHIFViewer itself contains proxy already, How should I fix it. Please help me. @swederik

zhan2016 avatar Apr 22 '19 09:04 zhan2016

I'm having the same issue using the dockerized version of both orthanc and the OHIF viewer

HowardLander avatar Apr 22 '19 13:04 HowardLander

And here is what is in my console log

15:08:21.571 The `stylus` package has been deprecated.

To continue using the last supported version
of this package, pin your package version to
2.513.14 (`meteor add stylus@=2.513.14`).
88e1189fbc333736c9f25db0faa5f5b11296a825.js:15:104
15:08:22.285 To use the ohif-user-oidc package, you must add relevant OpenID Connect settings to Meteor.settings.public.custom.oidc (client-side).
88e1189fbc333736c9f25db0faa5f5b11296a825.js:203:439
15:08:22.950 Route dispatch never rendered. Did you forget to call this.next() in an onBeforeAction?
88e1189fbc333736c9f25db0faa5f5b11296a825.js:133:1007
15:08:24.619
For some reason we could not retrieve the study's metadata for 1.2.840.113619.2.55.3.2831167752.431.1267718632.465.
88e1189fbc333736c9f25db0faa5f5b11296a825.js:191:45637
15:08:24.620
r@http://54.237.150.72:3000/88e1189fbc333736c9f25db0faa5f5b11296a825.js?meteor_js_resource=true:1:4116
_livedata_result@http://54.237.150.72:3000/88e1189fbc333736c9f25db0faa5f5b11296a825.js?meteor_js_resource=true:67:17916
onMessage@http://54.237.150.72:3000/88e1189fbc333736c9f25db0faa5f5b11296a825.js?meteor_js_resource=true:67:20252
_launchConnection/this.socket.onmessage/<@http://54.237.150.72:3000/88e1189fbc333736c9f25db0faa5f5b11296a825.js?meteor_js_resource=true:65:2800
forEachCallback@http://54.237.150.72:3000/88e1189fbc333736c9f25db0faa5f5b11296a825.js?meteor_js_resource=true:65:3992
_launchConnection/this.socket.onmessage@http://54.237.150.72:3000/88e1189fbc333736c9f25db0faa5f5b11296a825.js?meteor_js_resource=true:65:2765
sockjs-0.3.4.js/u</r.prototype.dispatchEvent@http://54.237.150.72:3000/88e1189fbc333736c9f25db0faa5f5b11296a825.js?meteor_js_resource=true:65:6509
sockjs-0.3.4.js/u</O.prototype._dispatchMessage@http://54.237.150.72:3000/88e1189fbc333736c9f25db0faa5f5b11296a825.js?meteor_js_resource=true:65:20153
sockjs-0.3.4.js/u</O.prototype._didMessage@http://54.237.150.72:3000/88e1189fbc333736c9f25db0faa5f5b11296a825.js?meteor_js_resource=true:65:21053
sockjs-0.3.4.js/u</O.websocket/o.ws.onmessage@http://54.237.150.72:3000/88e1189fbc333736c9f25db0faa5f5b11296a825.js?meteor_js_resource=true:65:23202
88e1189fbc333736c9f25db0faa5f5b11296a825.js:191:45652
15:11:12.212 Route dispatch never rendered. Did you forget to call this.next() in an onBeforeAction?
88e1189fbc333736c9f25db0faa5f5b11296a825.js:133:1007
15:12:11.866 Inserting default protocols
88e1189fbc333736c9f25db0faa5f5b11296a825.js:195:38437

HowardLander avatar Apr 22 '19 13:04 HowardLander

Did u figure out any solutions?

zhan2016 avatar Apr 22 '19 15:04 zhan2016

you have to configure a query / retrieve client in orthanc.

http://book.orthanc-server.com/faq/query-retrieve.html

tonygonzalez811 avatar Apr 22 '19 15:04 tonygonzalez811

I seem to have the query/retrieve configured correctly now,(at least the error I am getting has changed!)

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://pacsip:8042/wado?requestType=WADO&studyUID=1.3.12.2.1107.5.1.4.60078.30000009051117332575000000016&seriesUID=1.3.12.2.1107.5.1.4.60078.30000009051117290810900023393&objectUID=1.3.12.2.1107.5.1.4.60078.30000009051117290810900024172&contentType=application/dicom&transferSyntax=*. (Reason: CORS header \u2018Access-Control-Allow-Origin\u2019 missing).

I should mention that I am using the docker-compose version of OHIF from the github as well as the orthanc docker.

What's interesting about this is that I have another installation of orthanc docker and docker compose OHIF and it works fine! The difference seems to be in the way the network proxy is configured. For example (cut and pasted from the Firefox network console) this fails

image

but this works

image

So the issue seems to be that the install that is working is using a proxy (thereby avoiding the CORS issue) and the one that fails is not. I've compared my config files, but haven't yet found the magic that turns on the proxy. Any suggestions?

Thanks much Howard

HowardLander avatar Apr 22 '19 21:04 HowardLander

I just use wado to fetch dicom files. Why does Q/R client need? @HowardLander @tonygonzalez811 When I use curl on localhost, everything works good: image But on chrome console, the response from proxy always show error: image

So the problem maybe locate in the proxy from ohif to orthanc server?

zhan2016 avatar Apr 23 '19 01:04 zhan2016

So interestingly enough I have resolved my issue by reverting to ohif/viewer:travis-757 in my docker-compose file (rather than using viewer:latest). My instance that was working has been up for 6 weeks, so I suppose it's also using a version that is "old enough". Is this a bug in newer versions? Maybe the "proxy" flag in app.json is being ignored?

HowardLander avatar Apr 25 '19 15:04 HowardLander

Could you please confirm that the latest master with this commit fixes this issue? 7ff9a87b6e68f4fb8e9a527e292821c7ec9f966f

Note: Make sure that proxy is enabled in your configuration like here

evren217 avatar May 01 '19 15:05 evren217

I can confirm the new docker image, tag: travis-824, fixes this issue.

davidi1 avatar May 01 '19 16:05 davidi1

Great news! Thanks for the fix. Should this issue be closed now?

HowardLander avatar May 01 '19 17:05 HowardLander

Oh, and one of my colleagues here has tested travis-824 and also confirms that the issue is fixed

HowardLander avatar May 01 '19 17:05 HowardLander

Great, thanks! Closing this ticket.

evren217 avatar May 01 '19 17:05 evren217

Oh, and one of my colleagues here has tested travis-824 and also confirms that the issue is fixed

"Testing" done as part of a docker-compose deploy using Orthanc as image store. Reference: https://github.com/mjstealey/ohif-orthanc-dimse-docker

Makes use of image: ohif/viewer:latest

Looks to work as expected.

mjstealey avatar May 01 '19 18:05 mjstealey