Opened 8 years ago

Closed 7 years ago

Last modified 6 years ago

#12811 closed Bug Report - General (fixed)

Fresh mythbuntu 16 install, mythweb listings fatal error

Reported by: mark@… Owned by: Stuart Auchterlonie
Priority: major Milestone: 0.28.1
Component: Plugin - MythWeb Version: 0.28.0
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Installed mythtbuntu 16 on a new box. Configured mythtv and video sources. Ran mythfilldatabase.

When I went to: http://192.168.37.92/mythweb/tv/list I got an error:

Fatal Error

!NoTrans: SQL Error: Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'mythconverg.program.endtime' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by #1055!!

mark@mythtv:~$ mythbackend --version Please attach all output as a file in bug reports. MythTV Version : v0.28-2-g15cf421 MythTV Branch : fixes/0.28 Network Protocol : 88 Library API : 0.28.20160309-1 QT Version : 5.5.1 Options compiled in:

linux profile use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_vbox using_ceton using_hdpvr using_ivtv using_joystick_menu using_libcec using_libcrypto using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_sdl using_taglib using_v4l2 using_x11 using_xrandr using_xv using_profiletype using_bindings_perl using_bindings_python using_bindings_php using_freetype2 using_mythtranscode using_opengl using_vaapi using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2

Attachments (3)

mythtv.listings.crash.txt (9.7 KB) - added by mark@… 8 years ago.
MythWeb-SQL_mode_patch.diff (512 bytes) - added by sphery 8 years ago.
Set the SQL mode when connecting to the database
Perl_bindings-set_sql_mode.patch (545 bytes) - added by sphery 8 years ago.
Similar patch to set sql_mode for Perl bindings.

Download all attachments as: .zip

Change History (16)

Changed 8 years ago by mark@…

Attachment: mythtv.listings.crash.txt added

comment:1 Changed 8 years ago by mark@…

I was able to "fix" this/get it to work by following the information in update #25 of: http://ubuntuforums.org/showthread.php?t=2319897&page=3&p=13472130#post13472130

A solution to the SQL Fatal Error mentioned above is a tweak to the /etc/mysql/conf.d/mythtv.cnf file. Add "sql_mode=NO_ENGINE_SUBSTITUTION" (without the quotation marks) to the end of the /etc/mysql/conf.d/mythtv.cnf file. I believe the error was caused by an incompatibility between mysql 5.7 and databases from older versions of mysql.

comment:2 Changed 8 years ago by sphery

Resolution: Duplicate
Status: newclosed

comment:3 Changed 8 years ago by sphery

Resolution: Duplicate
Status: closednew

Leaving this one open for endtime in listings (which doesn't seem to be fixed, yet)

Changed 8 years ago by sphery

Attachment: MythWeb-SQL_mode_patch.diff added

Set the SQL mode when connecting to the database

comment:4 Changed 8 years ago by sphery

Can someone who's getting this issue please try the attached patch, MythWeb-SQL_mode_patch.diff​ and report whether it fixes the issue (should fix #12811, #12824, and #12834 as well as any other SQL mode issues). The patch simply specifies the required SQL mode (as we do in MythTV proper) rather than relying on the user to set their server default to the desired mode.

Changed 8 years ago by sphery

Similar patch to set sql_mode for Perl bindings.

comment:5 Changed 8 years ago by Stuart Auchterlonie

Milestone: unknown0.28.1
Priority: minormajor

comment:6 Changed 7 years ago by sphery

Resolution: Duplicate
Status: newclosed

Closing this as a dup of #12811 . Even though it's a different location in MythWeb/different database query/field, all of these are really duplicates in that they will be fixed the same way--by specifying a session sql_mode, as we do in MythTV's C++ code. There's a patch on #12811 and we just need it tested and confirmed working (without other changes to MySQL or workarounds) by someone who's using a sufficiently new MySQL so it can be included in MythWeb.

comment:7 Changed 7 years ago by sphery

Resolution: Duplicate
Status: closednew

Sorry, closed in the wrong tab.

comment:8 Changed 7 years ago by Peter Bennett

Ticket #12896 reports this happening in statistics page. I am able to see the error in that page, so I will try the fix and see if it resolves it.

comment:9 Changed 7 years ago by Stuart Auchterlonie

Good catch Peter,

I too can see it happening now. Let me know how you get on with the fix.

comment:10 Changed 7 years ago by Peter Bennett

I have installed the patch on my test master system as well as my production 0.28 system. It fixes the error on the mythweb statistics page. I went through all the other mythweb pages and did not see this error anywhere.

I see one error in mythweb, in Settings, Mythweb, Video Playback. I think this is unrelated:

Fatal error: Uncaught Error: Call to undefined function split() in /usr/local/share/mythtv/mythweb/modules/mythweb/tmpl/default/set_flvplayer.php:26 Stack trace: #0 /usr/local/share/mythtv/mythweb/modules/settings/handler.php(60): require_once() #1 /usr/local/share/mythtv/mythweb/mythweb.php(35): require_once('/usr/local/shar...') #2 {main} thrown in /usr/local/share/mythtv/mythweb/modules/mythweb/tmpl/default/set_flvplayer.php on line 26

I believe we should proceed with committing the patch.

comment:11 Changed 7 years ago by Michael T. Dean <mdean@…>

Resolution: fixed
Status: newclosed

In f02e5e264f61c1fcac3ead2e4cb86d9592e7d1ef/mythweb:

Set the SQL mode when connecting to the database.

Fixes #12811

Signed-off-by: Peter Bennett <pbennett@…>

comment:12 Changed 7 years ago by Michael T. Dean <mdean@…>

In 1b75720192fc4c76a03d2b81e40f4d44cb339cd0/mythweb:

Set the SQL mode when connecting to the database.

Fixes #12811

Signed-off-by: Peter Bennett <pbennett@…>
(cherry picked from commit f02e5e264f61c1fcac3ead2e4cb86d9592e7d1ef)

comment:13 Changed 6 years ago by yogi1966@…

This patch worked for me in a fresh install off mythbuntu 16.04 (https://code.mythtv.org/trac/attachment/ticket/12811/MythWeb-SQL_mode_patch.diff).

Nevertheless it was difficult to figure out which file has to be modified, although I found it using: find / -iname classes | grep "mythweb" It would be helpful to list the exact path to the file, the rest was easy.

Anyway thanks for the help.

Note: See TracTickets for help on using tickets.