Seeing default Apache2 "it works" page instead of skin and data

117 views
Skip to first unread message

Jimmy Kirk

unread,
Sep 19, 2020, 3:06:55 PM9/19/20
to weewx-user
This is a new install (today) on an existing Davis station. I am running weewx and apache2 on the same machine, which is a Raspberry Pi running Ubuntu 20.04. I installed using the "setup.py" method, so I expect to see my html data in public_html. If I run "bin/weewxd weewx.conf" I do see looping data so I know it is able to get data from the console. If I view the /public_data/index.html file I do see my data but it is unformatted without tables, skins, and graphs, also it is three days old like it was stored on the console. My /etc/apache2/conf.d file shows:

Alias /weewx /home/weewx/public_html
<Directory /home/weewx/public_html>
  Options FollowSymlinks
  AllowOverride None
</Directory>

which I thought would tell Apache2 where to publish the output data. Like I said, I just did this today so it wouldn't be too heartbreaking if I have to start over but I was hoping for an easy fix. Anybody have an idea what I might be overlooking? Using SQLite.

Thanks!
Jimmy K

p q

unread,
Sep 19, 2020, 3:32:12 PM9/19/20
to weewx...@googlegroups.com
Sounds like you might have two problems.
1) Getting the index.html to have the data you want
2) Getting Apache to display the index.html from the directory it's being put in

For the first one, you should check your weewx.conf and make sure it's using the skin you want. It's also possible that you're just not letting it run long enough to post results. In order to help with any of this, you should post the log file you get when you run weewx. There are probably helpful error messages.

The second problem is something that I can't really help with. I struggled with my own implementation and gave up. I ended up having my skin post the files into the directory that Apache expected rather than configure Apache to look in the place where the skin normally posts the files.


--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/d12d0530-7c22-4196-9a67-ac28917c567fn%40googlegroups.com.


--
Peter Quinn
(415)794-2264

Jimmy Kirk

unread,
Sep 19, 2020, 3:42:34 PM9/19/20
to weewx-user
attached is the logfile, should have included it earlier. Hope it helps...
syslog.txt

p q

unread,
Sep 19, 2020, 3:51:18 PM9/19/20
to weewx...@googlegroups.com
What's in /home/weewx/public_html ?

Looks like that's where weewx is publishing to (from what the log file says). 



--
Peter Quinn
(415)794-2264

Tom Keffer

unread,
Sep 19, 2020, 4:36:39 PM9/19/20
to weewx-user
Yes, it does help.

Somehow, you managed to get at least one record in your database with timestamp 2084-09-29 18:13:00 CDT, which is 60+ years in the future. You'll need to remove those records.

Here's a summary of how

1. Stop weewx

2. Make a backup

cd /home/weewx/archive
cp weewx.sdb weewx.sdb.backup

3. Use the utility sqlite3. You may have to install first:

sudo apt install sqlite3

4. Using it, see how many records are in the future: 

cd /home/weewx/archive
sqlite3 weewx.sdb
sqlite> select count(dateTime) from archive where dateTime - strftime('%s', 'now') > 0;

If there aren't too many of them, you might want to see their timestamps:

sqlite> select datetime(dateTime,'unixepoch','localtime') from archive where dateTime - strftime('%s', 'now') > 0;

5. Remove these records:

sqlite> delete from archive where dateTime - strftime('%s', 'now') > 0;
sqlite> .quit

6. Drop, then rebuild the daily summaries:

cd /home/weewx
./bin/wee_database --drop-daily --rebuild-daily weewx.conf

7. Restart weewxd.

-tk


Jimmy Kirk

unread,
Sep 19, 2020, 6:13:50 PM9/19/20
to weewx-user
Thanks Tom, I appreciate the response...

When I ran the sqlite query, it returned a count of zero. I went ahead and ran the other commands anyway, but essentially nothing changed. Did I enter the query correctly? <see attachment>

Also, would the db problem explain the lack of the page being rendered at all? Thanks!

SQLite20200919.png

Jimmy Kirk

unread,
Sep 19, 2020, 6:25:43 PM9/19/20
to weewx-user
Peter, in that folder are html files, all the normal png's for daytemp, dayrain, etc. The PNG files are blank graphs, and when I open index.html, I see data but with no formatting and no skin applied. See attachment and note the old date stamp.
index.html.png

Tom Keffer

unread,
Sep 19, 2020, 8:03:05 PM9/19/20
to weewx-user
My apologies. The 2084 timestamp is in your logger, not the database. That makes this a classic case of memory corruption in the Davis logger. See the section Corrupt station memory in the Wiki.

Jimmy Kirk

unread,
Sep 19, 2020, 8:46:43 PM9/19/20
to weewx-user
Ah yes, seen this many times... thanks!
Reply all
Reply to author
Forward
0 new messages