Opened 14 years ago
Closed 14 years ago
#8679 closed defect (invalid)
mythfrontend deletes settings when db connection is "weak"
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | MythTV - General | Version: | 0.22 |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | yes |
Description
For the third time, mythfrontend deleted my settings when somehow the connection to the backend was unstable.
I don't know, why the connection was unstable, because my frontend boots via PXE from the backend. And restarting mythfrontend solved the connection problems. So, I guess it was no hardware problem.
I did some investigation and found out that mythfrontend deletes data from the tables settings, displayprofiles, displayprofilegroups and inuseprograms in such a case.
It's strange that mythfrontend thinks, that reading from the tables fails, but still it is able to delete data from the tables.
From mythfrontend.log:
2010-06-12 08:30:56.858 Using the OpenGL painter 2010-06-12 08:30:58.429 Loaded base theme from /usr/share/mythtv/themes/Terra/base.xml 2010-06-12 08:30:58.645 Loaded base theme from /usr/share/mythtv/themes/default-wide/base.xml 2010-06-12 08:30:58.705 Loaded base theme from /usr/share/mythtv/themes/default/base.xml 2010-06-12 08:30:58.747 Current MythTV Schema Version (DBSchemaVer): 1244 2010-06-12 08:30:58.836 Error preparing query: SELECT name FROM displayprofilegroups WHERE hostname = :HOST 2010-06-12 08:30:58.836 Driver error was [2/2006]: QMYSQL3: Unable to prepare statement Database error was: MySQL server has gone away
2010-06-12 08:30:58.837 DB Error (get_profiles): Query was: SELECT name FROM displayprofilegroups WHERE hostname = :HOST Bindings were: :HOST=frontend Driver error was [2/2006]: QMYSQL: Unable to execute query Database error was: MySQL server has gone away
2010-06-12 08:30:58.841 Error preparing query: DELETE FROM displayprofiles WHERE profilegroupid = :PROFID 2010-06-12 08:30:58.841 Driver error was [2/2006]: QMYSQL3: Unable to prepare statement Database error was: MySQL server has gone away
[...]
2010-06-12 08:30:59.070 DB Error (create_profile_group): Query was: INSERT INTO displayprofilegroups (name, hostname) VALUES (?,?) Bindings were: :HOST=frontend, :NAME=CPU-- Driver error was [2/1062]: QMYSQL3: Unable to execute statement Database error was: Duplicate entry 'CPU---frontend' for key 1
[...]
2010-06-12 08:31:11.451 MythContext: Connecting to backend server: localhost:6543 (try 1 of 1) 2010-06-12 08:31:11.468 Connection to master server timed out.
Either the server is down or the master server
settings
in mythtv-settings does not contain the proper
IP address
After this incident, I restored the affected tables from the last backup and everything was OK again.
I think mythfrontend should display a message ("There is a problem, what shall I do?") in such a case, instead of deleting data.
Attachments (1)
Change History (5)
comment:1 Changed 14 years ago by
Changed 14 years ago by
Attachment: | mythfrontend.log added |
---|
comment:2 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
In mythtv-setup, general section, where it tells you put supply an IP for the backend, you must give it an actual IP. 'localhost' will not work.
comment:3 Changed 14 years ago by
Resolution: | invalid |
---|---|
Status: | closed → new |
Of course, I did. The frontend boots and connects OK in 99% of the cases. Just every now and then, this problem occurs. The "localhost" in the log is a result of the lost connection to the database.
comment:4 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Ticket locked: | set |
Actually, no, the localhost in your log is because you have a setting with "localhost" instead of an IP address, as wagnerrp indicates.
Attaching the log text, because it looks messed up in the comment above. BTW, the log applies to the table displayprofilegroups, but the other 3 tables were also cleared in a similar way.