incorrect date on web page

Talks about solar stuff
jerrymex
Posts: 10
Joined: Fri May 03, 2019 11:56 pm

incorrect date on web page

Post by jerrymex » Wed May 08, 2019 4:30 pm

Using 123solar 1.8.2
New install on archlinux, raspberry pi
[root@alarmpi csv]# uname -a
Linux alarmpi 4.19.37-2-ARCH #1 SMP PREEMPT Fri May 3 01:14:02 UTC 2019 armv7l GNU/Linux

The web page shows as 04/05/2019, todays current date 08/05/2019

[root@alarmpi csv]# timedatectl
Local time: Wed 2019-05-08 10:26:04 CDT
Universal time: Wed 2019-05-08 15:26:04 UTC
RTC time: n/a
Time zone: America/Mexico_City (CDT, -0500)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
What needs to changed to reflect the correct date?

Also in the /srv/http/123solar/data/123solar.err this appears:
cp: cannot create regular file '/srv/http/123solar/data//errors/de20190508-10:27:38.err': No such file or directory
PHP Warning: file_put_contents(/srv/http/123solar/data//errors/out20190508-10:27:38.txt): failed to open stream: No such file or directory in /srv/http/123solar/scripts/protocols/aurora.php on line 90

[root@alarmpi csv]# ls -all /srv/http/123solar/data/123solar.err
-rw-r--r-- 1 http http 34715 May 8 10:27 /srv/http/123solar/data/123solar.err

What needs to be changed to fix this?

Thanks

jerrymex
Posts: 10
Joined: Fri May 03, 2019 11:56 pm

Re: incorrect date on web page

Post by jerrymex » Wed May 08, 2019 4:47 pm

whoops, just realized the date is from a couple days ago, and relates to the graph below it.
The other error is vaild
Thanks

jeanmarc
Posts: 1812
Joined: Thu Aug 29, 2013 7:16 am

Re: incorrect date on web page

Post by jeanmarc » Wed May 08, 2019 4:52 pm

Did you set a correct TZ in main config ?
For the errors change scripts/protocols/aurora.php at the bottom remove a /

Code: Select all

        exec('cp /tmp/de.err ' . $DATADIR . 'errors/de' . $time . '.err');
        file_put_contents($DATADIR . 'errors/out' . $time . '.txt', $CMD_RETURN);

jerrymex
Posts: 10
Joined: Fri May 03, 2019 11:56 pm

Re: incorrect date on web page

Post by jerrymex » Wed May 08, 2019 6:30 pm

edit:
/srv/http/123solar/scripts/protocols/aurora.php
changes the lines as suggested
start nginx php-fpm
start 123solar


cp: cannot create regular file '/srv/http/123solar/data/errors/de20190508-12:28:42.err': No such file or directory
PHP Warning: file_put_contents(/srv/http/123solar/data/errors/out20190508-12:28:42.txt): failed to open stream: No such file or directory in /srv/http/123solar/scripts/protocols/aurora.php on line 90

[root@alarmpi data]# ls -all /srv/http/123solar/data/errors/de20190508-12:28:42.err
ls: cannot access '/srv/http/123solar/data/errors/de20190508-12:28:42.err': No such file or directory

[root@alarmpi data]# ls -all /srv/http/123solar/data/
total 20
drwxrwxrwx 3 http http 4096 May 8 12:26 .
drwxrwxrwx 11 http http 4096 May 5 09:35 ..
-rw-r--r-- 1 http http 4164 May 8 12:29 123solar.err
drwxrwxrwx 7 http http 4096 Aug 23 2017 invt1
[root@alarmpi data]#

jeanmarc
Posts: 1812
Joined: Thu Aug 29, 2013 7:16 am

Re: incorrect date on web page

Post by jeanmarc » Wed May 08, 2019 6:38 pm

Your http user probably don't have permission to write /tmp chmod 777 /tmp/

jerrymex
Posts: 10
Joined: Fri May 03, 2019 11:56 pm

Re: incorrect date on web page

Post by jerrymex » Wed May 08, 2019 8:24 pm

chmod 777 /tmp/

root@alarmpi data]# ls -all /tmp/
total 4
drwxrwxrwx 12 root root 240 May 8 14:13 .
drwxr-xr-x 17 root root 4096 May 3 14:51 ..
drwxrwxrwt 2 root root 40 Apr 30 07:51 .ICE-unix
drwxrwxrwt 2 root root 40 Apr 30 07:51 .Test-unix
drwxrwxrwt 2 root root 40 Apr 30 07:51 .X11-unix
drwxrwxrwt 2 root root 40 Apr 30 07:51 .XIM-unix
drwxrwxrwt 2 root root 40 Apr 30 07:51 .font-unix
drwx------ 3 root root 60 Apr 30 07:51 systemd-private-1507c5d4b3d243f2b187a3a2e5999be1-haveged.service-Ewhm1D
drwx------ 3 root root 60 May 8 14:13 systemd-private-1507c5d4b3d243f2b187a3a2e5999be1-php-fpm.service-eBUiPm
drwx------ 3 root root 60 May 5 10:59 systemd-private-1507c5d4b3d243f2b187a3a2e5999be1-systemd-logind.service-jZj0py
drwx------ 3 root root 60 Apr 30 07:51 systemd-private-1507c5d4b3d243f2b187a3a2e5999be1-systemd-resolved.service-uTCLZm
drwx------ 3 root root 60 Apr 30 07:51 systemd-private-1507c5d4b3d243f2b187a3a2e5999be1-systemd-timesyncd.service-eZhocZ
[root@alarmpi data]#

#* 08/05/2019 14:14:02 Starting 123Solar debug (19530)

cp: cannot create regular file '/srv/http/123solar/data/errors/de20190508-14:14:50.err': No such file or directory
PHP Warning: file_put_contents(/srv/http/123solar/data/errors/out20190508-14:14:50.txt): failed to open stream: No such file or directory in /srv/http/123solar/scripts/protocols/aurora.php on line 90

Seems to me, it is trying to write the file /srv/http/123solar/data/errors/out20190508-14:14:50.txt

ls -all /srv/http/123solar/data/errors/
ls: cannot access '/srv/http/123solar/data/errors/': No such file or directory

jeanmarc
Posts: 1812
Joined: Thu Aug 29, 2013 7:16 am

Re: incorrect date on web page

Post by jeanmarc » Thu May 09, 2019 6:33 am

my bad.. that's in aurora.php

Code: Select all

        exec('cp /tmp/de.err ' . $INVTDIR . '/errors/de' . $time . '.err');
        file_put_contents($INVTDIR . '/errors/out' . $time . '.txt', $CMD_RETURN);

jerrymex
Posts: 10
Joined: Fri May 03, 2019 11:56 pm

Re: incorrect date on web page

Post by jerrymex » Thu May 09, 2019 3:10 pm

nano /srv/http/123solar/scripts/protocols/aurora.php
changed the lines as suggested
start nginx php-fpm
start 123solar

Created dir:
/srv/http/123solar/data/errors/
results in:
-rw-r--r-- 1 http http 210 May 9 08:28 out20190509-08:28:45.txt
-rw-r--r-- 1 http http 0 May 9 08:29 out20190509-08:29:17.txt
-rw-r--r-- 1 http http 210 May 9 08:29 out20190509-08:29:30.txt
-rw-r--r-- 1 http http 0 May 9 08:29 out20190509-08:29:34.txt
-rw-r--r-- 1 http http 0 May 9 08:31 out20190509-08:31:00.txt
-rw-r--r-- 1 http http 17 May 9 08:32 out20190509-08:32:20.txt
-rw-r--r-- 1 http http 17 May 9 08:32 out20190509-08:32:22.txt
-rw-r--r-- 1 http http 210 May 9 08:33 out20190509-08:33:33.txt
-rw-r--r-- 1 http http 210 May 9 08:34 out20190509-08:34:18.txt
-rw-r--r-- 1 http http 0 May 9 08:34 out20190509-08:34:59.txt
-rw-r--r-- 1 http http 0 May 9 08:35 out20190509-08:35:03.txt
-rw-r--r-- 1 http http 0 May 9 08:35 out20190509-08:35:22.txt
-rw-r--r-- 1 http http 0 May 9 08:35 out20190509-08:35:39.txt
-rw-r--r-- 1 http http 0 May 9 08:35 out20190509-08:35:47.txt
-rw-r--r-- 1 http http 0 May 9 08:38 out20190509-08:38:04.txt
-rw-r--r-- 1 http http 210 May 9 08:39 out20190509-08:39:56.txt
-rw-r--r-- 1 http http 210 May 9 08:41 out20190509-08:41:33.txt
-rw-r--r-- 1 http http 17 May 9 08:42 out20190509-08:42:31.txt
-rw-r--r-- 1 http http 210 May 9 08:43 out20190509-08:43:22.txt
-rw-r--r-- 1 http http 0 May 9 08:46 out20190509-08:46:43.txt
-rw-r--r-- 1 http http 210 May 9 08:48 out20190509-08:48:13.txt
-rw-r--r-- 1 http http 0 May 9 08:48 out20190509-08:48:38.txt
-rw-r--r-- 1 http http 210 May 9 08:49 out20190509-08:49:46.txt
-rw-r--r-- 1 http http 17 May 9 08:50 out20190509-08:50:23.txt

and cat:
20190509-08:49:43 221.207840 1.247874 276.039581 219.638016 1.240624 272.488220 215.687714 2.538277 505.919312 59.983685 92.232201 31.610266 30.194000

There does not appear to be any errors:
cat 123solar.err:
#* 09/05/2019 08:52:54 Starting 123Solar debug (13384)

Have I made a mistake in creating the errors directory?

Thanks

jeanmarc
Posts: 1812
Joined: Thu Aug 29, 2013 7:16 am

Re: incorrect date on web page

Post by jeanmarc » Thu May 09, 2019 3:46 pm

no that's protocols errors returns available in /data/invt1/errors/
you have de. files (output error) and out. files (output)

jerrymex
Posts: 10
Joined: Fri May 03, 2019 11:56 pm

Re: incorrect date on web page

Post by jerrymex » Thu May 09, 2019 4:10 pm

[root@alarmpi errors]# ls | wc -l
2476

I think this directory will continue to grow, some are zero byte files, some are 210 bytes, and some are 17 bytes.
The zero byte files are written at a very close frequency:
-rw-r--r-- 1 http http 0 May 9 08:34 out20190509-08:34:59.txt
-rw-r--r-- 1 http http 0 May 9 08:35 out20190509-08:35:03.txt
-rw-r--r-- 1 http http 0 May 9 08:35 out20190509-08:35:22.txt
-rw-r--r-- 1 http http 0 May 9 08:35 out20190509-08:35:39.txt
-rw-r--r-- 1 http http 0 May 9 08:35 out20190509-08:35:47.txt
-rw-r--r-- 1 http http 0 May 9 08:38 out20190509-08:38:04.txt

Another example, 210 byte file:
-rw-r--r-- 1 http http 210 May 9 08:48 out20190509-08:48:13.txt
-rw-r--r-- 1 http http 0 May 9 08:48 out20190509-08:48:38.txt
-rw-r--r-- 1 http http 210 May 9 08:49 out20190509-08:49:46.txt

This is nothing to worry about?

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests