You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the code requires a service account for Healthcare API by default, which may not be supplied if someone is trying to run the adapter using local DIMSE and DICOMweb services, primarily in a testing/development environment.
The error and stack that show up when trying to run the adapter w/o a service account:
ERROR com.google.cloud.healthcare.imaging.dicomadapter.CStoreService - C-STORE request failed:
com.google.cloud.healthcare.IDicomWebClient$DicomWebException: java.io.IOException: Scopes not configured for service account. Scoped should be specified by calling createScoped or passing scopes to constructor.
at com.google.cloud.healthcare.DicomWebClient.stowRs(DicomWebClient.java:132)
at com.google.cloud.healthcare.imaging.dicomadapter.CStoreService.lambda$store$3(CStoreService.java:129)
at com.google.cloud.healthcare.imaging.dicomadapter.CStoreService.processStream(CStoreService.java:174)
at com.google.cloud.healthcare.imaging.dicomadapter.CStoreService.store(CStoreService.java:137)
at org.dcm4che3.net.service.BasicCStoreSCP.onDimseRQ(BasicCStoreSCP.java:72)
at org.dcm4che3.net.service.DicomServiceRegistry.onDimseRQ(DicomServiceRegistry.java:86)
at org.dcm4che3.net.ApplicationEntity.onDimseRQ(ApplicationEntity.java:474)
at org.dcm4che3.net.Association.onDimseRQ(Association.java:713)
at org.dcm4che3.net.PDUDecoder.decodeDIMSE(PDUDecoder.java:467)
at org.dcm4che3.net.Association.handlePDataTF(Association.java:696)
at org.dcm4che3.net.State$4.onPDataTF(State.java:103)
at org.dcm4che3.net.Association.onPDataTF(Association.java:692)
at org.dcm4che3.net.PDUDecoder.nextPDU(PDUDecoder.java:177)
at org.dcm4che3.net.Association$2.run(Association.java:529)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.io.IOException: Scopes not configured for service account. Scoped should be specified by calling createScoped or passing scopes to constructor.
at com.google.auth.oauth2.ServiceAccountCredentials.refreshAccessToken(ServiceAccountCredentials.java:390)
at com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:157)
at com.google.auth.oauth2.OAuth2Credentials.getRequestMetadata(OAuth2Credentials.java:145)
at com.google.auth.http.HttpCredentialsAdapter.initialize(HttpCredentialsAdapter.java:91)
at com.google.api.client.http.HttpRequestFactory.buildRequest(HttpRequestFactory.java:88)
at com.google.api.client.http.HttpRequestFactory.buildPostRequest(HttpRequestFactory.java:128)
at com.google.cloud.healthcare.DicomWebClient.stowRs(DicomWebClient.java:125)
... 16 more
The text was updated successfully, but these errors were encountered:
jasonklotzer
changed the title
Feature request: Allow running dicom-adapter against a locally deployed DICOMweb endpoint
Feature request: Allow running against a locally deployed DICOMweb endpoint
Dec 22, 2020
rakeshdave-gcp
added
the
p2
Priority: Default priority, issue with HCLS products with not so great work around
label
Feb 4, 2021
It looks like the code requires a service account for Healthcare API by default, which may not be supplied if someone is trying to run the adapter using local DIMSE and DICOMweb services, primarily in a testing/development environment.
At first glance it seems the remedy, at least for the DIMSE->STOW-RS mode (pub/sub has not been tested), is to put some logic around the following line:
https://github.com/GoogleCloudPlatform/healthcare-dicom-dicomweb-adapter/blob/master/import/src/main/java/com/google/cloud/healthcare/imaging/dicomadapter/ImportAdapter.java#L92, only including
new HttpCredentialsAdapter(credentials)
when necessary?The error and stack that show up when trying to run the adapter w/o a service account:
ERROR com.google.cloud.healthcare.imaging.dicomadapter.CStoreService - C-STORE request failed:
com.google.cloud.healthcare.IDicomWebClient$DicomWebException: java.io.IOException: Scopes not configured for service account. Scoped should be specified by calling createScoped or passing scopes to constructor.
at com.google.cloud.healthcare.DicomWebClient.stowRs(DicomWebClient.java:132)
at com.google.cloud.healthcare.imaging.dicomadapter.CStoreService.lambda$store$3(CStoreService.java:129)
at com.google.cloud.healthcare.imaging.dicomadapter.CStoreService.processStream(CStoreService.java:174)
at com.google.cloud.healthcare.imaging.dicomadapter.CStoreService.store(CStoreService.java:137)
at org.dcm4che3.net.service.BasicCStoreSCP.onDimseRQ(BasicCStoreSCP.java:72)
at org.dcm4che3.net.service.DicomServiceRegistry.onDimseRQ(DicomServiceRegistry.java:86)
at org.dcm4che3.net.ApplicationEntity.onDimseRQ(ApplicationEntity.java:474)
at org.dcm4che3.net.Association.onDimseRQ(Association.java:713)
at org.dcm4che3.net.PDUDecoder.decodeDIMSE(PDUDecoder.java:467)
at org.dcm4che3.net.Association.handlePDataTF(Association.java:696)
at org.dcm4che3.net.State$4.onPDataTF(State.java:103)
at org.dcm4che3.net.Association.onPDataTF(Association.java:692)
at org.dcm4che3.net.PDUDecoder.nextPDU(PDUDecoder.java:177)
at org.dcm4che3.net.Association$2.run(Association.java:529)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.io.IOException: Scopes not configured for service account. Scoped should be specified by calling createScoped or passing scopes to constructor.
at com.google.auth.oauth2.ServiceAccountCredentials.refreshAccessToken(ServiceAccountCredentials.java:390)
at com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:157)
at com.google.auth.oauth2.OAuth2Credentials.getRequestMetadata(OAuth2Credentials.java:145)
at com.google.auth.http.HttpCredentialsAdapter.initialize(HttpCredentialsAdapter.java:91)
at com.google.api.client.http.HttpRequestFactory.buildRequest(HttpRequestFactory.java:88)
at com.google.api.client.http.HttpRequestFactory.buildPostRequest(HttpRequestFactory.java:128)
at com.google.cloud.healthcare.DicomWebClient.stowRs(DicomWebClient.java:125)
... 16 more
The text was updated successfully, but these errors were encountered: