Welcome, Guest. Please login or register.
Did you miss your activation email?

News: Precision Simulator update 10.84 (20 July 2019) is now available

Author Topic: METAR Download Issues  (Read 1089 times)

RRVyper

  • Join date: Sep 2018
  • Posts: 51
Re: METAR Download Issues
« Reply #20 on: Tue, 16 Apr 2019 18:23 »
Today I fired up the same flight along with VisualPSX, FSX and FSXWX and... no issues. I didn't do anything computer-wise since yesterday's flight. Weather download occurred on schedule without any hangs over 5 hrs, both in PSX and FSX.

Strange, but all is right again in the (sim) world. 🤞

Randy

jcomm

  • Join date: Dec 2011
  • Location: Portugal
  • Posts: 1254
Re: METAR Download Issues
« Reply #21 on: Tue, 16 Apr 2019 19:07 »
Can incremental Win 10 updates be ruled out ?

There have been a few last week.

I've seen my networks going crazy due to it....

RRVyper

  • Join date: Sep 2018
  • Posts: 51
Re: METAR Download Issues
« Reply #22 on: Tue, 16 Apr 2019 23:06 »
Can incremental Win 10 updates be ruled out ?

There have been a few last week.

I've seen my networks going crazy due to it....
I didn't notice any heavy network traffic when I was having the issues. Even rebooting the computer and cable modem/router didn't help. My last Win 10 update was on 09 Apr. I'll keep an eye on it but it worked OK today.

Randy

James H

  • Join date: Dec 2010
  • Location: Melbourne, Australia
  • Posts: 39
Re: METAR Download Issues
« Reply #23 on: Sun, 26 May 2019 15:02 »
Hi all,

I’ve noticed lately that I’ve been having similar trouble on my setup, namely the METAR download gets to some random percentage and then hangs. There doesn’t seem to be any consistent reason that I’ve noticed for it: sometimes it happens, sometimes it doesn’t, sometimes the download is VERY slow, and sometimes it’s almost instant. I assume this is because the connection between me and the METAR server gets interrupted somehow. I only tend to notice the METAR download has failed when the PSX ATIS differs from the VATSIM ATIS.

Is there a way to force the METAR download to restart while PSX is still running? Closing PSX, then deleting the weather files, then restarting PSX works, but this can be very inconvenient part way through a flight.

James

Jeroen Hoppenbrouwers

  • Moderator
  • Join date: May 2009
  • Location: KTMB
  • Posts: 3498
  • Hoppie designs avionics equipment for airliners.
    • http://www.hoppie.nl/
Re: METAR Download Issues
« Reply #24 on: Sun, 26 May 2019 18:37 »
Another technical approach would be to add a bit of monitoring code to the download thread, which notices that the data flow has stopped mid-flow. If there is no more progress after, say, 15 seconds, you can safely assume that something on the way from the server to the PSX thread has "forgotten" about the TCP link but did not report the problem towards PSX. This kind of network trouble is unavoidable anyway, so a monitor is always useful.


Hoppie

Hardy Heinlin

  • Moderator
  • Join date: May 2009
  • Posts: 10599
    • Aerowinx
Re: METAR Download Issues
« Reply #25 on: Sun, 26 May 2019 19:52 »
On Instructor > Preferences > Basics, you can switch the checkbox "Download METARs ..." off and on at any time, even during a download. This will cancel the current download, and the next attempt will restart automatically several minutes later as usual.

However, this cancel function won't work if there is no progress at all. It needs to read at least one line feed from the downloading text to get into the cancel check.


|-|ardy

Hardy Heinlin

  • Moderator
  • Join date: May 2009
  • Posts: 10599
    • Aerowinx
Re: METAR Download Issues
« Reply #26 on: Sun, 26 May 2019 23:49 »
I just added a timeout function provided by Java itself. This will be available in PSX 10.80.

I tested it with the timeout set to 1 millisecond, and this is the exception it throws (as expected):


Code: [Select]
[Aerowinx Precision Simulator - Exceptions]

javax.net.ssl.SSLException: Read timed out
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:127)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:320)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:263)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:258)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:137)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1180)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1091)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:187)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1581)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:246)
at WeatherLoader$DownloadThread.downloadOneFile(WeatherLoader.java:68)
at WeatherLoader$DownloadThread.run(WeatherLoader.java:157)


As this timeout test is OK, I'll set the value to 15000 milliseconds. Is that a reasonable time limit?

When the timeout occurs, the download will be canceled and the next attempt will start in a couple of minutes.


|-|ardy


What's a good setting for the restart time delay? Perhaps 3 minutes - plus some random seconds?
« Last edit: Mon, 27 May 2019 00:39 by Hardy Heinlin »

Jeroen Hoppenbrouwers

  • Moderator
  • Join date: May 2009
  • Location: KTMB
  • Posts: 3498
  • Hoppie designs avionics equipment for airliners.
    • http://www.hoppie.nl/
Re: METAR Download Issues
« Reply #27 on: Mon, 27 May 2019 01:05 »
15,000 ms sounds good to me for a non-critical far internet link. Let's see what the users find out. Making it configurable only will lead to confusion, I bet.

Restart delay, 3 +/- random is fine. I would not bother if it were 10 minutes. Even METARs are not accurate to the minute, that squall may be just ahead of you, that microburst just behind you.


Hoppie

Hardy Heinlin

  • Moderator
  • Join date: May 2009
  • Posts: 10599
    • Aerowinx
Re: METAR Download Issues
« Reply #28 on: Mon, 27 May 2019 01:20 »
When a normal download starts, 30 minutes plus random time have already passed since the last METAR update, so the usual update interval plus random is already taken into account.

Compromise: 5 minutes :-)


|-|ardy

James H

  • Join date: Dec 2010
  • Location: Melbourne, Australia
  • Posts: 39
Re: METAR Download Issues
« Reply #29 on: Mon, 27 May 2019 02:29 »
Outstanding once again Hardy!

Thanks,

James

Hardy Heinlin

  • Moderator
  • Join date: May 2009
  • Posts: 10599
    • Aerowinx
Re: METAR Download Issues
« Reply #30 on: Mon, 3 Jun 2019 14:34 »
The timeout feature is now available in PSX 10.80:

http://aerowinx.com/board/index.php?topic=4191.0


Regards,

|-|ardy