Author Topic: Test site error  (Read 2756 times)

0 Members and 1 Guest are viewing this topic.

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1455
  • BismarckWeather.net
    • BismarckWeather.net
Test site error
« on: November 07, 2024, 10:03:07 AM »
I'm exploring moving my site from GD to my own Synology.  I wasn't getting this error this weekend.  Not sure why that is.  I'm getting:

Warning: Undefined array key "updateTime" in /volume1/web/advforecast2.php on line 764

https://test.bismarckweather.net/index.php

No live data as I haven't flipped anything over really.  Just a script I can run on demand to copy the WD and Cumulus live files over.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9700
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Test site error
« Reply #1 on: November 07, 2024, 10:25:57 AM »
Odd... running view-source:https://test.bismarckweather.net/wxforecast.php?force=1 doesn't show that error.

You are running V5.19 of advforecast,php which is current.

I can only surmise that there was an incomplete fetch of the JSON from api.weather.gov.  Does that error show persistently in the error_log?
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1455
  • BismarckWeather.net
    • BismarckWeather.net
Re: Test site error
« Reply #2 on: November 07, 2024, 10:55:11 AM »
It doesn't look like I had my PHP error section setup.  So it didn't capture the error.  Hopefully I have that now.

But yes, the error is gone now.  Must have been some weird fetch issue like you mentioned.

Thanks for quickly checking on this for me.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1455
  • BismarckWeather.net
    • BismarckWeather.net
Re: Test site error
« Reply #3 on: November 10, 2024, 01:19:35 PM »
I figured out how to have WD and Cumulus replicate my files to my test site live now.  But noticed a different issue.

When I first load the site, it shows date and data from Nov 3.  But after 10 seconds, it shows the correct data.  What's causing this?
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9700
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Test site error
« Reply #4 on: November 10, 2024, 03:36:36 PM »
The first place to check is https://www.bismarckweather.net/wxstatus.php and make sure the FTP time and Weather Data time are correct (testtags.php is converted and uploaded in a timely manner).

Looks good, right now.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1455
  • BismarckWeather.net
    • BismarckWeather.net
Re: Test site error
« Reply #5 on: November 10, 2024, 05:01:49 PM »
Yep, that's the issue.  But on my test site.  Not sure where to duplicate that FTP file upload to second FTP server.
https://test.bismarckweather.net/wxstatus.php
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1455
  • BismarckWeather.net
    • BismarckWeather.net
Re: Test site error
« Reply #6 on: November 10, 2024, 05:39:36 PM »
Can't seem to get my testtags.php file to upload on schedule to second site.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1455
  • BismarckWeather.net
    • BismarckWeather.net
Re: Test site error
« Reply #7 on: November 10, 2024, 06:02:51 PM »
Looks like for the CUtags.php file, there is no copy option for Extra Web files...  Hmmmm.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline hcorrin

  • Senior Contributor
  • ****
  • Posts: 196
    • Ballaugh Weather
Re: Test site error
« Reply #8 on: November 11, 2024, 04:31:15 AM »
You do not appear to have any upload times in your screenshot try clicking upload every 5 minutes and also tick the little box on the right of the testtags for second server then save changes and see if that works

I see you have tried that
« Last Edit: November 11, 2024, 04:44:07 AM by hcorrin »

Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 278
    • Weather Doc's Weather
Re: Test site error
« Reply #9 on: November 11, 2024, 07:32:25 AM »
Here's a screen shot of my FTP/Internet Setup for my Synology NAS. I don't upload testtags.php as a separate file, but I do upload the wdisplay files to /web every minute. I notice you're uploading to the root directory but the Synology guidelines for hosting a website on the NAS is to upload everything to /web.

 [ You are not allowed to view attachments ]
« Last Edit: November 11, 2024, 07:34:49 AM by weatherdoc »

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1455
  • BismarckWeather.net
    • BismarckWeather.net
Re: Test site error
« Reply #10 on: November 11, 2024, 11:20:53 AM »
Yeah, I went into my Synology advanced FTP settings and set the home FTP folder to /web.  That way after login, it defaults to that /web folder.

I've tested the logins with WinSCP to verify the credentials and folders are working as designed.  So I'm fairly certain the issue is on the WD side.  I'll double check your checkmarks.

Yeah, hcorrin, I figured out those times later too.  Still didn't make any difference.

I've turned on my FTP logging.  All I'm seeing is Cumulus and WD realtime files being transferred.  Not the other two.

Thanks for the suggestions.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline hcorrin

  • Senior Contributor
  • ****
  • Posts: 196
    • Ballaugh Weather
Re: Test site error
« Reply #11 on: November 11, 2024, 12:08:28 PM »
I use a bat file with a copy from to in which is located in the WD folder and that copies the files I need on the synology from the WD pc provided the WD pc can access the synology
I have my WD pc logon to the DSM folder on boot up and use a scheduler to run the bat file

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1455
  • BismarckWeather.net
    • BismarckWeather.net
Re: Test site error
« Reply #12 on: November 11, 2024, 12:58:48 PM »
I just looked at about a half a dozen other sync solutions.  In the end, I did just that.  Batch file and scheduled task.  It's working.  Would have preferred WD be able to do it.  Oh well, barring some other solution cropping up, that's what I'll be doing.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline Fox_Of_The_Wind

  • Forecaster
  • *****
  • Posts: 501
  • Hi there!
    • http://www.desotowiwx.com
Re: Test site error
« Reply #13 on: November 11, 2024, 03:29:45 PM »
I'm exploring moving my site from GD to my own Synology.  I wasn't getting this error this weekend.  Not sure why that is.  I'm getting:

Warning: Undefined array key "updateTime" in /volume1/web/advforecast2.php on line 764

https://test.bismarckweather.net/index.php

No live data as I haven't flipped anything over really.  Just a script I can run on demand to copy the WD and Cumulus live files over.

That is neat. I am doing the same thing on my site. If I may ask how are you opening up your Synology to the WWW?

Anthony

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1455
  • BismarckWeather.net
    • BismarckWeather.net
Re: Test site error
« Reply #14 on: November 11, 2024, 04:27:40 PM »
I actually haven't opened it up, directly that is.  It's a bit complicated.

A few years ago, I put a copy of NGINX for Windows on my weather PC.  I configured it to serve up subdomains of my Bismarckweather.net.  For each subdomain, I created a CNAME entry on GoDaddy pointing to my NOIP DNS name.  So if my home IP changes, NOIP DNS record changes, and my subdomain name stays pointing to my home PC.

One of the features of NGINX is that you can setup a reverse proxy.  NGINX calls it "proxypass".  So as traffic comes in to say my test.bismarckweather.net DNS name, it relays the traffic to my Synology web server.  So my weather station copy of HTTPS is acting as a proxy to protect my site from direct hacking.

So I have broadcast.bismarckweather.net, test.bismarckweather.net, and a few others.  All with their own pointers to either folders, or to devices internal to my network.  So test.bismarckweather.net traffic comes into my weather PC NGIX, then is passed onto the Synology.  So the Synology serves up the webpages through my weather PC.  But if the weather PC is down, so is my test site.  Not that is super likely.

Along with that, I use a program called Certify the web.  That gets me my Let's Encrypt certificates.  I have one for *.bismarckweather.net.  That allows me to put he certs on my GoDaddy site and my NGINX at home.  So SSL for everything in one cert.  Including my Plex server and NAS internally.

It was a lot of work to figure it all out.  But externally, I only have port 443 open in my firewall.  And "most" of my subdomains have a redirect to my main site if someone tries to access it.  So it stays mostly secured.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1455
  • BismarckWeather.net
    • BismarckWeather.net
Re: Test site error
« Reply #15 on: November 11, 2024, 04:33:21 PM »
One more thing. I never got NGIX for Windows to run PHP for Windows.  That was my big weakness as I would have preferred to do that vs. the Synology.  When I got the Synology web server to do it easily, that's why I took up that option.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline Fox_Of_The_Wind

  • Forecaster
  • *****
  • Posts: 501
  • Hi there!
    • http://www.desotowiwx.com
Re: Test site error
« Reply #16 on: November 11, 2024, 05:27:30 PM »
I actually haven't opened it up, directly that is.  It's a bit complicated.

A few years ago, I put a copy of NGINX for Windows on my weather PC.  I configured it to serve up subdomains of my Bismarckweather.net.  For each subdomain, I created a CNAME entry on GoDaddy pointing to my NOIP DNS name.  So if my home IP changes, NOIP DNS record changes, and my subdomain name stays pointing to my home PC.

One of the features of NGINX is that you can setup a reverse proxy.  NGINX calls it "proxypass".  So as traffic comes in to say my test.bismarckweather.net DNS name, it relays the traffic to my Synology web server.  So my weather station copy of HTTPS is acting as a proxy to protect my site from direct hacking.

So I have broadcast.bismarckweather.net, test.bismarckweather.net, and a few others.  All with their own pointers to either folders, or to devices internal to my network.  So test.bismarckweather.net traffic comes into my weather PC NGIX, then is passed onto the Synology.  So the Synology serves up the webpages through my weather PC.  But if the weather PC is down, so is my test site.  Not that is super likely.

Along with that, I use a program called Certify the web.  That gets me my Let's Encrypt certificates.  I have one for *.bismarckweather.net.  That allows me to put he certs on my GoDaddy site and my NGINX at home.  So SSL for everything in one cert.  Including my Plex server and NAS internally.

It was a lot of work to figure it all out.  But externally, I only have port 443 open in my firewall.  And "most" of my subdomains have a redirect to my main site if someone tries to access it.  So it stays mostly secured.
Wow you know a lot more then I do. I just cheat. I use cloudflare and it has my domain  on it and from there I have a tunnel to my synology.

Anthony

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1455
  • BismarckWeather.net
    • BismarckWeather.net
Re: Test site error
« Reply #17 on: November 11, 2024, 06:24:22 PM »
Worked in IT for 30 some years now.  27 years now for state government.  Windows sysadmin basically.  Hence why I prefer doing things the Windows way, since that's what I know...
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline hcorrin

  • Senior Contributor
  • ****
  • Posts: 196
    • Ballaugh Weather
Re: Test site error
« Reply #18 on: November 11, 2024, 06:35:44 PM »
this is what i have http://ballaugh.no-ip.biz:59202/WD-AJAX2/index.php i have not gotten around to ssl certificate yet

Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 278
    • Weather Doc's Weather
Re: Test site error
« Reply #19 on: November 12, 2024, 07:13:46 AM »
I use no-ip.com as my service provider and get my SSL certificate from Let's Encrypt directly on the NAS via Synology. I ended up getting a Synology router to pair with the NAS. Everything works more seamlessly than my internet provider's router and the security protocols work hand-in-hand between the router and NAS. I have no issues with WD directly copying files from the PC to the NAS. Guess I got lucky because it certainly wasn't my knowledge or skill!