Hello again! Turned out to be great pointer. The issue was in weird mix of UIDs in file ownerships in the mysql data dir. Fixed those and all good.
Thanks a lot for all the great work & help with WeeWx! Have a great spring! BR, Juha On Wed, May 18, 2022 at 5:48 PM Juha Utriainen <juha.utriai...@iki.fi> wrote: > > > Hello Tom and big thanks for your fast reply! > > Bit of a face palm moment: Most probably you pointed out my mistake. I indeed > have a trigger to calculate daily averages and heatsums as per Finnish > standard (tried to do that in reports but eventually gave up temporarily :/ ) > I was thinking that all mysql db stuff is on mounted fs. Checking the suffix > did not cross my simple mind. > > Anyways, once back at desk I'll surely check that. > > Thanks a lot for great pointer! > > BR, > Juha > > > > ke 18. toukok. 2022 klo 15.38 Tom Keffer <tkef...@gmail.com> kirjoitti: >> >> The suffix ".TRG" is a trigger file. Why a trigger file would be associated >> with WeeWX, I have no idea --- they are not used anywhere in WeeWX. >> >> Were you using some custom code that uses triggers? Perhaps when you >> restored things, you didn't restore the trigger files? I'm not an expert at >> this, but I believe they live in /var/lib/mysql-files. >> >> You should be able to see them using "SHOW TRIGGERS IN weewx;" >> >> On Wed, May 18, 2022 at 5:11 AM Juha U <juha.utriai...@gmail.com> wrote: >>> >>> >>> Hello! >>> >>> I had a long running WeeWx on Raspberry. Unfortunately it died in the >>> middle of running apt upgrade so finally resorted to reinstall OS and >>> WeeWx. Well, not so big deal I thought, had backups of configs & database >>> files on NAS. >>> >>> However, now WeeWx fails to start and I can't get my head around what's the >>> real issue behind this error: >>> >>> MySQLdb._exceptions.InternalError: (29, 'File \'./weewx/archive.TRG\' not >>> found (Errcode: 13 "Permission denied")') >>> >>> Tried with my previously working config as well as the one that install >>> script created modifying necessities into that. No difference. MySQL >>> credentials are fine, connection works using cmd line mysql client. >>> WEEWX_ROOT is /home/weewx and all owned by root. If I run sudo bin/weewxd, >>> I still get the same. >>> >>> Any thoughts? Longer crash report below. >>> >>> Thanks a lot for any insights on where to dig or what to try next! >>> >>> BR, Juha >>> >>> >>> ------------------------ >>> >>> Traceback (most recent call last): >>> File "/home/weewx/bin/weedb/mysql.py", line 54, in guarded_fn >>> return fn(*args, **kwargs) >>> File "/home/weewx/bin/weedb/mysql.py", line 210, in columnsOf >>> column_list = [row[1] for row in self.genSchemaOf(table)] >>> File "/home/weewx/bin/weedb/mysql.py", line 210, in <listcomp> >>> column_list = [row[1] for row in self.genSchemaOf(table)] >>> File "/home/weewx/bin/weedb/mysql.py", line 183, in genSchemaOf >>> cursor.execute("""SHOW COLUMNS IN %s;""" % table) >>> File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 209, in >>> execute >>> res = self._query(query) >>> File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 315, in >>> _query >>> db.query(q) >>> File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 226, >>> in query >>> _mysql.connection.query(self, query) >>> MySQLdb._exceptions.InternalError: (29, 'File \'./weewx/archive.TRG\' not >>> found (Errcode: 13 "Permission denied")') >>> >>> During handling of the above exception, another exception occurred: >>> >>> Traceback (most recent call last): >>> File "/home/weewx/bin/weewxd", line 248, in <module> >>> main() >>> File "/home/weewx/bin/weewxd", line 147, in main >>> engine = weewx.engine.StdEngine(config_dict) >>> File "/home/weewx/bin/weewx/engine.py", line 93, in __init__ >>> self.loadServices(config_dict) >>> File "/home/weewx/bin/weewx/engine.py", line 161, in loadServices >>> obj = weeutil.weeutil.get_object(svc)(self, config_dict) >>> File "/home/weewx/bin/weewx/wxservices.py", line 104, in __init__ >>> self.db_manager = >>> engine.db_binder.get_manager(data_binding=data_binding, >>> File "/home/weewx/bin/weewx/manager.py", line 597, in get_manager >>> self.manager_cache[data_binding] = open_manager(manager_dict, >>> initialize) >>> File "/home/weewx/bin/weewx/manager.py", line 745, in open_manager >>> return manager_cls.open_with_create(manager_dict['database_dict'], >>> File "/home/weewx/bin/weewx/manager.py", line 164, in open_with_create >>> dbmanager = cls(connection, table_name=table_name, schema=schema) >>> File "/home/weewx/bin/weewx/manager.py", line 884, in __init__ >>> super(DaySummaryManager, self).__init__(connection, table_name, schema) >>> File "/home/weewx/bin/weewx/manager.py", line 83, in __init__ >>> self.sqlkeys = self.connection.columnsOf(self.table_name) >>> File "/home/weewx/bin/weedb/mysql.py", line 63, in guarded_fn >>> raise klass(e) >>> weedb.DatabaseError: (29, 'File \'./weewx/archive.TRG\' not found (Errcode: >>> 13 "Permission denied")') >>> >>> -- >>> 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+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/weewx-user/abefdd2d-663a-4486-a10b-11f7023fb523n%40googlegroups.com. >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "weewx-user" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/weewx-user/GVrR7eWpFNI/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> weewx-user+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/CAPq0zEDsKzgeRcz8rUoyGx346uWkwksc%3DcyRj%3DdPCMn_DBD4Yw%40mail.gmail.com. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAN2QzGUGsXcWzHB%3Ds0-_0ceEET96yHjbLGFO6YBRWD7EBAsvvw%40mail.gmail.com.