Cool, thanks Tobias!
-- John
On Wed, May 29, 2024 at 12:47 PM Tobias Megies <tobias.megies<at>lmu.de> wrote:
-- John
On Wed, May 29, 2024 at 12:47 PM Tobias Megies <tobias.megies<at>lmu.de> wrote:
https://urldefense.com/v3/__https://github.com/obspy/obspy/issues/3465*issuecomment-2138050112__;Iw!!IKRxdwAv5BmarQ!ZzykRuyHMXnnNf_WNg2VpUZ5sHbDDQG6nc-PMssbhuFDx-mEWpN_Hg1VesVNSqhgrrkpCndDM1PEUDwJMYhfVVdfswAz$
cheers,
Tobias
On 29/05/2024 20:21, John West (via SAGE) wrote:
-------------------------------------------------------------------------We might be dealing with two different issues, but perhaps we shouldsolve one at a time.
Well, OK, but the original issue was primarily about the XML problem. I
occasionally see the malformed gzip issue, but get the XML error
multiple times per day.
I'll look into turning off gzip in the obspy client, thanks!
-- John
On Wed, May 29, 2024 at 12:09 PM Rob Casey <rob.casey<at>earthscope.org
<rob.casey<at>earthscope.org>> wrote:
Hi John-
I have a couple of questions here: Is the gzip problem and themalformed XML problem the same issue? Or are we dealing with two
different issues?
We might be dealing with two different issues, but perhaps we should
solve one at a time.
I'm using the obspy client, which handles the requesting in thebackground. Is there a way to append headers to that client, or
would I have to rewrite my code to do that?
Not speaking from experience, but I note that the Accept-encoding
header addition is played out in obspy.clients.fdsn.client. I don't
see a way to externally configure this, so to test this, you'd need
to modify the code so that 'use_gzip' is set to false by default.
If that isn't enough, then you'd want to assert "gzip;q=0" where the
Accept-encoding header is written in that code.
Naturally, having the server on our end functioning suffiently well
with gzip turned off would be preferable. I am just not sure yet
what the side effects might be in making this change, including data
transfer performance.
-Rob
Thanks!<rob.casey<at>earthscope.org <rob.casey<at>earthscope.org>> wrote:
-- John
On Wed, May 29, 2024 at 11:45 AM Rob Casey
Hi John and Philip-nagging problem that didn't present obvious solutions over the past
Gillian alerted me to your posts. This has been a long
couple of years. We have had little to not staff time that we have
been able to place on this issue, either as we are deep in
infrastructure development in our new center.
That being said, one of our staffers, Dan, took a crackat trying to find a pattern and look for a way to circumvent, if not
solve. He got to the stage where we realized that there were not a
specific set of distributed servers that were causing the problem,
it could come from any of the systems, just at indeterminate times.
Something with the fdsnws-station web service call causes it to go
to a multipart content mode that inserts byte size values and seems
to trigger gzip output. (thx. Tobias)
There is a client-based way that Dan suggested could getaround the issue, and that is to have the client request to not
receive gzipped returns. He describes it like so:
-------------------------------------------------------------------------You can explicitly say "don't send gzip" by adding q=0like this:
Accept-Encoding:gzip;q=0server not to use gzip Transfer-Encoding
With the following in my Python code:
headers = {"Accept-Encoding":"gzip;q=0"} # asks
r = requests.get(url, headers=headers)
I get zero issues from station service.
https://urldefense.com/v3/__https://github.com/obspy/obspy/issues/3465__;!!IKRxdwAv5BmarQ!by8qJhcaNx0UirQy7fS_eIIjHB8u0U2EWHK7pbf4dlNmM_b6xEZRmMWLnzNsh2K773S2lj2fV1OqRhKvC-GfnNNFvzDT$So, you can try this out and see whether you get improvedresults. In fact, it would be great to get outside evaulation of
this. To be sustainable, though, we need a server-side solution, so
Dan also suggested that there is a way to configure Tomcat to not
opt for gzip output. This is something that we should be able to
try out in beta and see if that doesn't break something else.
Regards,<webservices-bounce<at>lists.ds.iris.edu
-Rob
On May 29, 2024, at 10:23 AM, John West (via SAGE)
<webservices-bounce<at>lists.ds.iris.edu>> wrote:
He has opened an issue on github to track this problem:Tobias is apparently having trouble posting to the mail list.
(
<
https://urldefense.com/v3/__https://github.com/obspy/obspy/issues/3465__;!!IKRxdwAv5BmarQ!by8qJhcaNx0UirQy7fS_eIIjHB8u0U2EWHK7pbf4dlNmM_b6xEZRmMWLnzNsh2K773S2lj2fV1OqRhKvC-GfnNNFvzDT$>
)
multiple<tobias.megies<at>lmu.de <tobias.megies<at>lmu.de>> wrote:-- John
On Wed, May 29, 2024 at 10:59 AM Tobias Megies
discoveryHi John,
yes, that's what I meant. My best guess was that the service
was creating the issue, because it's the only time we do
https://urldefense.com/v3/__https://github.com/obspy/obspy/issues/3465__;!!IKRxdwAv5BmarQ!by8qJhcaNx0UirQy7fS_eIIjHB8u0U2EWHK7pbf4dlNmM_b6xEZRmMWLnzNsh2K773S2lj2fV1OqRhKvC-GfnNNFvzDT$"normal"requests in parallel.
But yes, I can see that something also sometimes goes wrong in
issue torequests after the client initialization. Seems like a server
(me but not 100% sure yet.
Can you maybe mention that github ticket I made on the ML
<
https://urldefense.com/v3/__https://github.com/obspy/obspy/issues/3465__;!!IKRxdwAv5BmarQ!by8qJhcaNx0UirQy7fS_eIIjHB8u0U2EWHK7pbf4dlNmM_b6xEZRmMWLnzNsh2K773S2lj2fV1OqRhKvC-GfnNNFvzDT$>
), my mails don't go through,
anewmy old IRIS account has my old mail sender address and I made
https://urldefense.com/v3/__https://github.com/obspy/obspy/issues/3465__;!!IKRxdwAv5BmarQ!YbAqxDBWoNH9JDXLefMCt-N51qul5iRqXOqZKQeXCts8UL-jBXiT5LuOqCUjiwxkfp-C3ui9CONDDvIMI3gpakDxgJgS$Client('IRIS',account on EarthScope but no luck with that either.
cheers,
Tobias
On 29/05/2024 17:38, John D. West wrote:
Hi, Tobias.
I changed line 21 of my sample code to: DCclient =
the code_discover_services=False)
Is that what you had in mind? It doesn't make any difference,
<tobias.megies<at>lmu.de <tobias.megies<at>lmu.de>still generates errors on random networks.
Thanks!
-- John
On Wed, May 29, 2024 at 9:29 AM Tobias Megies
wrote:<tobias.megies<at>lmu.de <tobias.megies<at>lmu.de>>>
WADLs) and makesHi John,
a quick fix is this:
client = Client(_discover_services=False)
This skips service discovery (parsing the server side
it should beit so custom parameters Earthscope has can't be used, but
fine unless you do some real fancy requests.
cheers,
Tobias
On 29/05/2024 17:26, Tobias Megies wrote:
I opened an issue on github to track the issue:
<
https://urldefense.com/v3/__https://github.com/obspy/obspy/issues/3465__;!!IKRxdwAv5BmarQ!YbAqxDBWoNH9JDXLefMCt-N51qul5iRqXOqZKQeXCts8UL-jBXiT5LuOqCUjiwxkfp-C3ui9CONDDvIMI3gpakDxgJgS$>
<
https://urldefense.com/v3/__https://github.com/obspy/obspy/issues/3465__;!!IKRxdwAv5BmarQ!YbAqxDBWoNH9JDXLefMCt-N51qul5iRqXOqZKQeXCts8UL-jBXiT5LuOqCUjiwxkfp-C3ui9CONDDvIMI3gpakDxgJgS$
<
https://urldefense.com/v3/__https://github.com/obspy/obspy/issues/3465__;!!IKRxdwAv5BmarQ!YbAqxDBWoNH9JDXLefMCt-N51qul5iRqXOqZKQeXCts8UL-jBXiT5LuOqCUjiwxkfp-C3ui9CONDDvIMI3gpakDxgJgS$
https://urldefense.com/v3/__https://www.geophysik.uni-muenchen.de__;!!IKRxdwAv5BmarQ!YbAqxDBWoNH9JDXLefMCt-N51qul5iRqXOqZKQeXCts8UL-jBXiT5LuOqCUjiwxkfp-C3ui9CONDDvIMI3gpahg3U8Zc$XML.cheers,obspy client.get_stations()
Tobias
On 29/05/2024 04:19, John West (via SAGE) wrote:
Hi!
I'm calling the station service using the
method, and getting randomly distributed badly formed
expected,Typical error message is something like: "Start tag
(b'a\r')"'<' not
found, line 1, column 1 (<string>, line 1)"
I've also had a few errors with: "Not a gzipped file
without error, andThe attached sample Python code sometimes runs
errors aresometimes generates multiple errors during a run. The
networks on each run.NOT
in the same places, they appear for different
<tobias.megies<at>lmu.de <tobias.megies<at>lmu.de>>--Any ideas?
Thanks!
-- John
EMail: tobias.megies<at>lmu.de <tobias.megies<at>lmu.de>
WWW:
<
https://urldefense.com/v3/__https://www.geophysik.uni-muenchen.de__;!!IKRxdwAv5BmarQ!YbAqxDBWoNH9JDXLefMCt-N51qul5iRqXOqZKQeXCts8UL-jBXiT5LuOqCUjiwxkfp-C3ui9CONDDvIMI3gpahg3U8Zc$>
<
https://urldefense.com/v3/__https://www.geophysik.uni-muenchen.de__;!!IKRxdwAv5BmarQ!YbAqxDBWoNH9JDXLefMCt-N51qul5iRqXOqZKQeXCts8UL-jBXiT5LuOqCUjiwxkfp-C3ui9CONDDvIMI3gpahg3U8Zc$
<
https://urldefense.com/v3/__https://www.geophysik.uni-muenchen.de__;!!IKRxdwAv5BmarQ!YbAqxDBWoNH9JDXLefMCt-N51qul5iRqXOqZKQeXCts8UL-jBXiT5LuOqCUjiwxkfp-C3ui9CONDDvIMI3gpahg3U8Zc$
https://urldefense.com/v3/__https://www.geophysik.uni-muenchen.de__;!!IKRxdwAv5BmarQ!by8qJhcaNx0UirQy7fS_eIIjHB8u0U2EWHK7pbf4dlNmM_b6xEZRmMWLnzNsh2K773S2lj2fV1OqRhKvC-GfnHnkp9Zx$Geophysikalisches Observatorium--
Ludwigshöhe 8
82256 Fürstenfeldbruck
Tel: +49 (0) 89 2180-73981
Fax: +49 (0) 89 2180-73970
Ludwig-Maximilians-Universität
Department für Geo- und Umweltwissenschaften
Sektion Geophysik
Theresienstrasse 41/IV
80333 München
Tel: +49 (0) 89 2180-4237
Fax: +49 (0) 89 2180-4205
EMail: tobias.megies<at>lmu.de <tobias.megies<at>lmu.de>
WWW:
<
https://urldefense.com/v3/__https://www.geophysik.uni-muenchen.de__;!!IKRxdwAv5BmarQ!by8qJhcaNx0UirQy7fS_eIIjHB8u0U2EWHK7pbf4dlNmM_b6xEZRmMWLnzNsh2K773S2lj2fV1OqRhKvC-GfnHnkp9Zx$
https://urldefense.com/v3/__http://ds.iris.edu/message-center/topic/webservices/__;!!IKRxdwAv5BmarQ!ZKNqX6iReO0OgYUlhqyEpRvYxt3YTtGoFI06JkMiDNgcbH3GUwMXA-YyByyq8-DY4vCSNSBFl7kPa8CKUlv0ti8Wwg$Geophysikalisches Observatorium
Ludwigshöhe 8
82256 Fürstenfeldbruck
Tel: +49 (0) 89 2180-73981
Fax: +49 (0) 89 2180-73970
Ludwig-Maximilians-Universität
Department für Geo- und Umweltwissenschaften
Sektion Geophysik
Theresienstrasse 41/IV
80333 München
Tel: +49 (0) 89 2180-4237
Fax: +49 (0) 89 2180-4205
----------------------
Web Services
Topic home:
<
https://urldefense.com/v3/__http://ds.iris.edu/message-center/topic/webservices/__;!!IKRxdwAv5BmarQ!ZKNqX6iReO0OgYUlhqyEpRvYxt3YTtGoFI06JkMiDNgcbH3GUwMXA-YyByyq8-DY4vCSNSBFl7kPa8CKUlv0ti8Wwg$>
| Unsubscribe: webservices-unsubscribe<at>lists.ds.iris.edu <mailto:
webservices-unsubscribe<at>lists.ds.iris.edu>
https://urldefense.com/v3/__http://ds.iris.edu/message-center/__;!!IKRxdwAv5BmarQ!ZKNqX6iReO0OgYUlhqyEpRvYxt3YTtGoFI06JkMiDNgcbH3GUwMXA-YyByyq8-DY4vCSNSBFl7kPa8CKUlvVI56oCQ$(Sent from the IRIS Message Center
<
https://urldefense.com/v3/__http://ds.iris.edu/message-center/__;!!IKRxdwAv5BmarQ!ZKNqX6iReO0OgYUlhqyEpRvYxt3YTtGoFI06JkMiDNgcbH3GUwMXA-YyByyq8-DY4vCSNSBFl7kPa8CKUlvVI56oCQ$>
)
https://urldefense.com/v3/__http://ds.iris.edu/account/profile/__;!!IKRxdwAv5BmarQ!ZKNqX6iReO0OgYUlhqyEpRvYxt3YTtGoFI06JkMiDNgcbH3GUwMXA-YyByyq8-DY4vCSNSBFl7kPa8CKUltH577DAA$Update subscription preferences at
<
https://urldefense.com/v3/__http://ds.iris.edu/account/profile/__;!!IKRxdwAv5BmarQ!ZKNqX6iReO0OgYUlhqyEpRvYxt3YTtGoFI06JkMiDNgcbH3GUwMXA-YyByyq8-DY4vCSNSBFl7kPa8CKUltH577DAA$
https://urldefense.com/v3/__http://ds.iris.edu/message-center/topic/webservices/__;!!IKRxdwAv5BmarQ!ff2GOGJ6NGGxWxHIQrfg_7RJBjGmFvZT5n8_7EuLAk23whvuOJPScoj2zvQYJffy2ZAQ0hjTfN845lny5YLtKquQ_Q$----------------------
Web Services
Topic home:
<
https://urldefense.com/v3/__http://ds.iris.edu/message-center/topic/webservices/__;!!IKRxdwAv5BmarQ!ff2GOGJ6NGGxWxHIQrfg_7RJBjGmFvZT5n8_7EuLAk23whvuOJPScoj2zvQYJffy2ZAQ0hjTfN845lny5YLtKquQ_Q$>
| Unsubscribe: webservices-unsubscribe<at>lists.ds.iris.edu <mailto:
webservices-unsubscribe<at>lists.ds.iris.edu>
https://urldefense.com/v3/__http://ds.iris.edu/message-center/__;!!IKRxdwAv5BmarQ!ff2GOGJ6NGGxWxHIQrfg_7RJBjGmFvZT5n8_7EuLAk23whvuOJPScoj2zvQYJffy2ZAQ0hjTfN845lny5YJT1c67lQ$Sent from the IRIS Message Center(
<
https://urldefense.com/v3/__http://ds.iris.edu/message-center/__;!!IKRxdwAv5BmarQ!ff2GOGJ6NGGxWxHIQrfg_7RJBjGmFvZT5n8_7EuLAk23whvuOJPScoj2zvQYJffy2ZAQ0hjTfN845lny5YJT1c67lQ$>
)
https://urldefense.com/v3/__http://ds.iris.edu/account/profile/__;!!IKRxdwAv5BmarQ!ff2GOGJ6NGGxWxHIQrfg_7RJBjGmFvZT5n8_7EuLAk23whvuOJPScoj2zvQYJffy2ZAQ0hjTfN845lny5YLsKF4oPA$Update subscription preferences at
<
https://urldefense.com/v3/__http://ds.iris.edu/account/profile/__;!!IKRxdwAv5BmarQ!ff2GOGJ6NGGxWxHIQrfg_7RJBjGmFvZT5n8_7EuLAk23whvuOJPScoj2zvQYJffy2ZAQ0hjTfN845lny5YLsKF4oPA$
----------------------https://urldefense.com/v3/__http://ds.iris.edu/message-center/topic/webservices/__;!!IKRxdwAv5BmarQ!ZzykRuyHMXnnNf_WNg2VpUZ5sHbDDQG6nc-PMssbhuFDx-mEWpN_Hg1VesVNSqhgrrkpCndDM1PEUDwJMYhfVRmKmXan$
Web Services
Topic home:
| Unsubscribe: webservices-unsubscribe<at>lists.ds.iris.edu
Sent from the IRIS Message Center (https://urldefense.com/v3/__http://ds.iris.edu/message-center/__;!!IKRxdwAv5BmarQ!ZzykRuyHMXnnNf_WNg2VpUZ5sHbDDQG6nc-PMssbhuFDx-mEWpN_Hg1VesVNSqhgrrkpCndDM1PEUDwJMYhfVfquSI3V$
)
Update subscription preferences athttps://urldefense.com/v3/__http://ds.iris.edu/account/profile/__;!!IKRxdwAv5BmarQ!ZzykRuyHMXnnNf_WNg2VpUZ5sHbDDQG6nc-PMssbhuFDx-mEWpN_Hg1VesVNSqhgrrkpCndDM1PEUDwJMYhfVYM97ReI$
--
EMail: tobias.megies<at>lmu.de
WWW:
https://urldefense.com/v3/__https://www.geophysik.uni-muenchen.de__;!!IKRxdwAv5BmarQ!ZzykRuyHMXnnNf_WNg2VpUZ5sHbDDQG6nc-PMssbhuFDx-mEWpN_Hg1VesVNSqhgrrkpCndDM1PEUDwJMYhfVeUvNoAZ$
Geophysikalisches Observatorium
Ludwigshöhe 8
82256 Fürstenfeldbruck
Tel: +49 (0) 89 2180-73981
Fax: +49 (0) 89 2180-73970
Ludwig-Maximilians-Universität
Department für Geo- und Umweltwissenschaften
Sektion Geophysik
Theresienstrasse 41/IV
80333 München
Tel: +49 (0) 89 2180-4237
Fax: +49 (0) 89 2180-4205