Stream: implementers
Topic: Validating Behind a Proxy
Charlie Filkins (Oct 19 2020 at 18:31):
I'm trying to run the FHIR Validator 5.1.17 behind a proxy server. While I can access the packages just fine (hl7.fhir.r4.core#4.0.1), I can't access the terminology server (http://tx.fhir.org). For the packages, proxy negotiation settles on NTLM as the authentication method. However, the terminology server request doesn't provide any authentication information. Does anyone have any clue what is happening or how I can get this working?
Thanks ... Charlie
Vassil Peytchev (Oct 19 2020 at 18:56):
I think it is very unlikely that there is any use of NTLM in the validating process. Unless we are talking about the some kind of npm authentication?
Charlie Filkins (Oct 19 2020 at 19:27):
Yes, it is in the process of authenticating to the proxy server. I can see the headers in WireShark.
Lloyd McKenzie (Oct 19 2020 at 20:57):
@Grahame Grieve
Charlie Filkins (Oct 19 2020 at 21:38):
This is command I run ...
cygdrive/c/Program\ Files/Common\ Files/Oracle/Java/javapath/java -Dhttp.proxyHost=proxy -Dhttp.proxyPort=9119 -jar ./validator_cli.jar -version 4.0 FullUrl.json
I have confirmed that the starting text that appears in the stacktrace is from our proxy server. I also used WireShark to view the exchange and saw Proxy-authentication : NTLM ... in the HTTP headers to get the package, but not in the call to the terminology server.
And here are the results ...
FHIR Validation tool Version 5.1.17 (Git# 44f7dca1c794). Built 2020-10-14T20:04:32.293Z (4 days old)
Java: 11.0.8 from C:\Program Files\Java\jdk11 on amd64 (64bit). 2048MB available
Paths: Current = XXX, Package Cache = C:\Users\XXX\.fhir\packages
Params: -version 4.0 FullUrl.json
Loading
Load FHIR v4.0 from hl7.fhir.r4.core#4.0.1Installing hl7.fhir.r4.core#4.0.1 to the package cache
Fetching:....................................................................................................
Installing: .................................................................................................... done.
Installing hl7.fhir.xver-extensions#0.0.4 to the package cache
Fetching:
Installing: done.
- 4575 resources (01:45.0217)
Terminology server http://tx.fhir.orgException in thread "main" org.hl7.fhir.exceptions.FHIRException: Unable to connect to terminology server. Use parameter '-tx n/a' to run without using terminology services to validate LOINC, SNOMED, ICD-X etc. Error = Error parsing response message: only whitespace content allowed before start tag and not A (position: START_DOCUMENT seen <!--Title-->\nA... @2:2)
at org.hl7.fhir.r5.context.SimpleWorkerContext.connectToTSServer(SimpleWorkerContext.java:303)
at org.hl7.fhir.validation.ValidationEngine.connectToTSServer(ValidationEngine.java:1033)
at org.hl7.fhir.validation.ValidationEngine.setTerminologyServer(ValidationEngine.java:407)
at org.hl7.fhir.validation.cli.services.ValidationService.getValidator(ValidationService.java:209)
at org.hl7.fhir.validation.Validator.main(Validator.java:190)
Caused by: org.hl7.fhir.r5.utils.client.EFhirClientException: Error parsing response message: only whitespace content allowed before start tag and not A (position: START_DOCUMENT seen <!--Title-->\nA... @2:2)
at org.hl7.fhir.r5.utils.client.ClientUtils.unmarshalReference(ClientUtils.java:378)
at org.hl7.fhir.r5.utils.client.ClientUtils.issueResourceRequest(ClientUtils.java:242)
at org.hl7.fhir.r5.utils.client.ClientUtils.issueResourceRequest(ClientUtils.java:224)
at org.hl7.fhir.r5.utils.client.ClientUtils.issueResourceRequest(ClientUtils.java:215)
at org.hl7.fhir.r5.utils.client.ClientUtils.issueGetResourceRequest(ClientUtils.java:151)
at org.hl7.fhir.r5.utils.client.FHIRToolingClient.getCapabilitiesStatementQuick(FHIRToolingClient.java:185)
at org.hl7.fhir.convertors.txClient.TerminologyClientR5.getCapabilitiesStatementQuick(TerminologyClientR5.java:95)
at org.hl7.fhir.r5.context.SimpleWorkerContext.connectToTSServer(SimpleWorkerContext.java:299)
... 4 more
Caused by: org.hl7.fhir.exceptions.FHIRFormatError: only whitespace content allowed before start tag and not A (position: START_DOCUMENT seen <!--Title-->\nA... @2:2)
at org.hl7.fhir.r5.formats.XmlParserBase.parse(XmlParserBase.java:122)
at org.hl7.fhir.r5.formats.ParserBase.parse(ParserBase.java:61)
at org.hl7.fhir.r5.utils.client.ClientUtils.unmarshalReference(ClientUtils.java:371)
... 11 more
Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not A (position: START_DOCUMENT seen <!--Title-->\nA... @2:2)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at org.hl7.fhir.r5.formats.XmlParserBase.next(XmlParserBase.java:232)
at org.hl7.fhir.r5.formats.XmlParserBase.loadXml(XmlParserBase.java:222)
at org.hl7.fhir.r5.formats.XmlParserBase.parse(XmlParserBase.java:119)
... 13 more
Grahame Grieve (Oct 20 2020 at 23:43):
make a github issue for this. I'll have to figure out whether there's anything I can do about it
Charlie Filkins (Oct 21 2020 at 17:06):
@Grahame Grieve I see that there is an issue open for the Validator and proxies (https://github.com/hapifhir/org.hl7.fhir.core/issues/204). Should I open a more specific one regarding the terminology server?
Grahame Grieve (Oct 21 2020 at 19:27):
make a comment against that task
Charlie Filkins (Oct 21 2020 at 21:05):
Comment written.
Last updated: Apr 12 2022 at 19:14 UTC