Moving SQL servers causing errors

89 views
Skip to first unread message

campbe...@gmail.com

unread,
Dec 6, 2022, 9:04:32 AM12/6/22
to weewx-user
I am trying to move weewx from one MySQL server to another.  I have taken a backup of the database from the currently live and working db and imported it into the new server.  I have changed the IP address in weewx.conf and restarted the service.

Within a few minutes I get the following;

Dec  6 13:45:23 PI weewx[13228]: ****  Traceback (most recent call last):
Dec  6 13:45:23 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
Dec  6 13:45:23 PI weewx[13228]: ****      fd.write(str(compiled_template))
Dec  6 13:45:23 PI weewx[13228]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Dec  6 13:45:23 PI weewx[13228]: ****      rc = getattr(self, mainMethName)()
Dec  6 13:45:23 PI weewx[13228]: ****    File "_etc_weewx_skins_Seasons_NOAA_NOAA_YYYY_txt_tmpl.py", line 720, in respond
Dec  6 13:45:23 PI weewx[13228]: ****    File "_etc_weewx_skins_Seasons_NOAA_NOAA_YYYY_txt_tmpl.py", line 287, in __errorCatcher24
Dec  6 13:45:23 PI weewx[13228]: ****    File "<string>", line 1, in <module>
Dec  6 13:45:23 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/tags.py", line 299, in max_ge
Dec  6 13:45:23 PI weewx[13228]: ****      return self._do_query('max_ge', val=val)
Dec  6 13:45:23 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/tags.py", line 343, in _do_query
Dec  6 13:45:23 PI weewx[13228]: ****      val=val, **self.option_dict)
Dec  6 13:45:23 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/wxmanager.py", line 60, in getAggregate
Dec  6 13:45:23 PI weewx[13228]: ****      return weewx.manager.DaySummaryManager.getAggregate(self, timespan, obs_type, aggregateType, **option_dict)
Dec  6 13:45:23 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/manager.py", line 1279, in getAggregate
Dec  6 13:45:23 PI weewx[13228]: ****      raise AttributeError("Unknown daily summary type %s" % (obs_type,))
Dec  6 13:45:23 PI weewx[13228]: ****  AttributeError: Unknown daily summary type outTemp
Dec  6 13:45:34 PI weewx[13228]: ****  Traceback (most recent call last):
Dec  6 13:45:34 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
Dec  6 13:45:34 PI weewx[13228]: ****      fd.write(str(compiled_template))
Dec  6 13:45:34 PI weewx[13228]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Dec  6 13:45:34 PI weewx[13228]: ****      rc = getattr(self, mainMethName)()
Dec  6 13:45:34 PI weewx[13228]: ****    File "_etc_weewx_skins_Seasons_index_html_tmpl.py", line 216, in respond
Dec  6 13:45:34 PI weewx[13228]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1615, in _handleCheetahInclude
Dec  6 13:45:34 PI weewx[13228]: ****      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Dec  6 13:45:34 PI weewx[13228]: ****    File "_etc_weewx_skins_Seasons_hilo_inc.py", line 127, in respond
Dec  6 13:45:34 PI weewx[13228]: ****  NotFound: cannot find 'maxtime' while searching for 'outTemp.maxtime'
Dec  6 13:45:47 PI weewx[13228]: ****  Traceback (most recent call last):
Dec  6 13:45:47 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
Dec  6 13:45:47 PI weewx[13228]: ****      fd.write(str(compiled_template))
Dec  6 13:45:47 PI weewx[13228]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Dec  6 13:45:47 PI weewx[13228]: ****      rc = getattr(self, mainMethName)()
Dec  6 13:45:47 PI weewx[13228]: ****    File "_etc_weewx_skins_Seasons_rss_xml_tmpl.py", line 225, in respond
Dec  6 13:45:47 PI weewx[13228]: ****  NotFound: cannot find 'min' while searching for 'day.outTemp.min'
Dec  6 13:45:47 PI weewx[13228]: cheetahgenerator: Generated 5 files for report StandardReport in 27.54 seconds
Dec  6 13:45:58 PI weewx[13228]: imagegenerator: Generated 14 images for StandardReport in 10.65 seconds
Dec  6 13:45:58 PI weewx[13228]: copygenerator: copied 5 files to /var/www/html/weewx
Dec  6 13:46:00 PI weewx[13228]: ftpgenerator: ftp'd 0 files in 1.62 seconds
Dec  6 13:50:16 PI weewx[13228]: manager: Added record 2022-12-06 13:50:00 GMT (1670334600) to database 'weewx'
Dec  6 13:50:17 PI weewx[13228]: manager: Added record 2022-12-06 13:50:00 GMT (1670334600) to daily summary in 'weewx'
Dec  6 13:50:18 PI weewx[13228]: restx: MQTT: Published record 2022-12-06 13:50:00 GMT (1670334600)
Dec  6 13:50:19 PI weewx[13228]: ****  Traceback (most recent call last):
Dec  6 13:50:19 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
Dec  6 13:50:19 PI weewx[13228]: ****      fd.write(str(compiled_template))
Dec  6 13:50:19 PI weewx[13228]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Dec  6 13:50:19 PI weewx[13228]: ****      rc = getattr(self, mainMethName)()
Dec  6 13:50:19 PI weewx[13228]: ****    File "_etc_weewx_skins_Seasons_NOAA_NOAA_YYYY_txt_tmpl.py", line 720, in respond
Dec  6 13:50:19 PI weewx[13228]: ****    File "_etc_weewx_skins_Seasons_NOAA_NOAA_YYYY_txt_tmpl.py", line 287, in __errorCatcher24
Dec  6 13:50:19 PI weewx[13228]: ****    File "<string>", line 1, in <module>
Dec  6 13:50:19 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/tags.py", line 299, in max_ge
Dec  6 13:50:19 PI weewx[13228]: ****      return self._do_query('max_ge', val=val)
Dec  6 13:50:19 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/tags.py", line 343, in _do_query
Dec  6 13:50:19 PI weewx[13228]: ****      val=val, **self.option_dict)
Dec  6 13:50:19 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/wxmanager.py", line 60, in getAggregate
Dec  6 13:50:19 PI weewx[13228]: ****      return weewx.manager.DaySummaryManager.getAggregate(self, timespan, obs_type, aggregateType, **option_dict)
Dec  6 13:50:19 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/manager.py", line 1279, in getAggregate
Dec  6 13:50:19 PI weewx[13228]: ****      raise AttributeError("Unknown daily summary type %s" % (obs_type,))
Dec  6 13:50:19 PI weewx[13228]: ****  AttributeError: Unknown daily summary type outTemp
Dec  6 13:50:20 PI weewx[13228]: ****  Traceback (most recent call last):
Dec  6 13:50:20 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
Dec  6 13:50:20 PI weewx[13228]: ****      fd.write(str(compiled_template))
Dec  6 13:50:20 PI weewx[13228]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Dec  6 13:50:20 PI weewx[13228]: ****      rc = getattr(self, mainMethName)()
Dec  6 13:50:20 PI weewx[13228]: ****    File "_etc_weewx_skins_Seasons_index_html_tmpl.py", line 216, in respond
Dec  6 13:50:20 PI weewx[13228]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1615, in _handleCheetahInclude
Dec  6 13:50:20 PI weewx[13228]: ****      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Dec  6 13:50:20 PI weewx[13228]: ****    File "_etc_weewx_skins_Seasons_hilo_inc.py", line 127, in respond
Dec  6 13:50:20 PI weewx[13228]: ****  NotFound: cannot find 'maxtime' while searching for 'outTemp.maxtime'
Dec  6 13:50:22 PI weewx[13228]: ****  Traceback (most recent call last):
Dec  6 13:50:22 PI weewx[13228]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
Dec  6 13:50:22 PI weewx[13228]: ****      fd.write(str(compiled_template))
Dec  6 13:50:22 PI weewx[13228]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Dec  6 13:50:22 PI weewx[13228]: ****      rc = getattr(self, mainMethName)()
Dec  6 13:50:22 PI weewx[13228]: ****    File "_etc_weewx_skins_Seasons_rss_xml_tmpl.py", line 225, in respond
Dec  6 13:50:22 PI weewx[13228]: ****  NotFound: cannot find 'min' while searching for 'day.outTemp.min'
Dec  6 13:50:22 PI weewx[13228]: cheetahgenerator: Generated 5 files for report StandardReport in 4.26 seconds
Dec  6 13:50:33 PI weewx[13228]: imagegenerator: Generated 14 images for StandardReport in 10.11 seconds
Dec  6 13:50:33 PI weewx[13228]: copygenerator: copied 0 files to /var/www/html/weewx
Dec  6 13:50:34 PI weewx[13228]: ftpgenerator: ftp'd 0 files in 1.43 seconds
Dec  6 13:52:35 PI weewx[13228]: engine: Main loop exiting. Shutting engine down.
Dec  6 13:52:35 PI weewx[13228]: engine: Shutting down StdReport thread

If I change the config file back to the old server it works fine.  I've checked usernames, passwords, i can see the user connecting to the server but no queries.

Tom Keffer

unread,
Dec 6, 2022, 10:18:19 AM12/6/22
to weewx...@googlegroups.com
Two possibilities come to mind.

1. Perhaps your new server uses a different case sensitivity from the old one? See https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html

2. Also, check the schema in use to make sure all the tables are there. In particular, there should be tables with names like "archive_day_outTemp".


--
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/88e617b5-6ba4-48f5-a450-3ce55e8133efn%40googlegroups.com.

campbe...@gmail.com

unread,
Dec 6, 2022, 11:49:07 AM12/6/22
to weewx-user
Case sensitivity is exactly the issue! - Server is moving from MySQL hosted on Linux to MySQL on Windows. 

Is there a way to re-jig weewx or is this only going to work moving to another Linux server

vince

unread,
Dec 6, 2022, 1:14:39 PM12/6/22
to weewx-user
Read the link Tom provided again and look at the last bullet item for what to do on your database setup.   You're going to have to find your 'my.cnf' file for where it puts things under Windows, but there are lots of google links for how to do that.

campbe...@gmail.com

unread,
Dec 7, 2022, 3:53:16 AM12/7/22
to weewx-user
Yes I seen this but in order to change from a 1 to a 2 you have to completely reinstall MySQL.  This can't be done after install.  Proven this just now by changing it and the services won't restart.  I can't do this as it has multiple other databases linked to it.


Is there a way to re-initialise Weewx to use lowercase table names or is this hard coded?

Tom Keffer

unread,
Dec 7, 2022, 7:05:11 AM12/7/22
to weewx...@googlegroups.com
Unfortunately, that would be a sweeping change. 

--
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.
Reply all
Reply to author
Forward
0 new messages