[mythtv-users] web app gets 404 on backend built with cmake on Archlinux
James Abernathy
jfabernathy at gmail.com
Tue Feb 18 14:52:55 UTC 2025
On Sun, Feb 16, 2025 at 1:32 PM James Abernathy <jfabernathy at gmail.com>
wrote:
>
>
> On Sun, Feb 16, 2025 at 10:38 AM Roland Ernst <rcrernst at gmail.com> wrote:
>
>>
>>
>> On Sun, Feb 16, 2025 at 3:40 PM James Abernathy <jfabernathy at gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Sun, Feb 16, 2025 at 8:57 AM Peter Bennett <pb.mythtv at gmail.com>
>>> wrote:
>>>
>>>>
>>>> On 2/15/25 21:20, James Abernathy wrote:
>>>>
>>>>
>>>>
>>>> On Sat, Feb 15, 2025 at 8:33 PM Peter Bennett <pb.mythtv at gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>> On 2/15/25 18:12, James Abernathy wrote:
>>>>>
>>>>> After a successful build of mythv using cmake on Archlinux, I copied
>>>>> all the files from the "CMAKE_INSTALL_PREFIX=mythtv-qt5-build" location to
>>>>> /usr/local/ and then did 'sudo ldconfig'
>>>>>
>>>>> I set up the mythtv-backend.service so it's would find mythbackend in
>>>>> /usr/local/bin/
>>>>>
>>>>> When I reboot, it shows mythtv-backend running but when I send firefox
>>>>> to localhost:6544, I see this in the log and a 404 error in the browser.
>>>>>
>>>>> This had worked a few days ago on Debian. Maybe I'm missing something?
>>>>>
>>>>> Feb 15 18:03:27 nucboxg3 mythbackend[1972]: mythbackend[1972]: W
>>>>> HTTP0 mythhttpfile.cpp:50 (ProcessFile) HTTPFile: Failed to find
>>>>> '/home/jim/mythtv-qt5-build/share/mythtv/html/apps/backend/index.html'
>>>>>
>>>>> Jim A
>>>>>
>>>>>
>>>>> The value of -DMYTH_RUN_PREFIX= determines where it should run from. I
>>>>> suspect that you had -DMYTH_RUN_PREFIX set as some incorrect value.
>>>>>
>>>>> Also at run time you can use MYTHTVDIR=/usr/local to override an
>>>>> incorrect MYTH_RUN_PREFIX used when building.
>>>>>
>>>>> Peter
>>>>>
>>>>
>>>> There must be something else as well. See output below:
>>>>
>>>> [jim at nucboxg3 ~]$ echo $MYTHTVDIR
>>>> /usr/local
>>>>
>>>> [jim at nucboxg3 ~]$ sudo systemctl status mythtv-backend
>>>> ● mythtv-backend.service - MythTV Backend
>>>> Loaded: loaded (/etc/systemd/system/mythtv-backend.service;
>>>> enabled; preset: disabled)
>>>> Active: active (running) since Sat 2025-02-15 21:11:32 EST; 3min
>>>> 37s ago
>>>> Invocation: d890ede46af54a038a61a21fd2bc7d69
>>>> Docs: https://www.mythtv.org/wiki/Mythbackend
>>>> Main PID: 699 (mythbackend)
>>>> Tasks: 9 (limit: 18663)
>>>> Memory: 169.7M (peak: 172.3M)
>>>> CPU: 573ms
>>>> CGroup: /system.slice/mythtv-backend.service
>>>> └─699 /usr/local/bin/mythbackend --quiet --syslog local7
>>>>
>>>> Feb 15 21:11:34 nucboxg3 mythbackend[699]: mythbackend[699]: I
>>>> HTTPServer serverpool.cpp:421 (listen) Listening on TCP 0.0.0.0:6544
>>>> Feb 15 21:11:34 nucboxg3 mythbackend[699]: mythbackend[699]: I
>>>> HTTPServer serverpool.cpp:421 (listen) Listening on TCP [::]:6544
>>>> Feb 15 21:11:34 nucboxg3 mythbackend[699]: mythbackend[699]: I
>>>> HTTPServer serverpool.cpp:421 (listen) Listening on TCP 0.0.0.0:6744
>>>> Feb 15 21:11:34 nucboxg3 mythbackend[699]: mythbackend[699]: I
>>>> HTTPServer serverpool.cpp:421 (listen) Listening on TCP [::]:6744
>>>> Feb 15 21:11:35 nucboxg3 mythbackend[699]: mythbackend[699]: I
>>>> HTTPServer bonjourregister.cpp:116 (BonjourCallback) Bonjour: Service
>>>> registration complete: name 'mythbackend on nucboxg3' type '_http._tcp.'
>>>> domain: 'loca>
>>>> Feb 15 21:12:28 nucboxg3 mythbackend[699]: mythbackend[699]: I HTTP0
>>>> mythhttpmetaservice.cpp:126 (MythHTTPMetaService) Service '/services/'
>>>> introspection complete
>>>> Feb 15 21:12:28 nucboxg3 mythbackend[699]: mythbackend[699]: W HTTP0
>>>> mythhttpfile.cpp:50 (ProcessFile) HTTPFile: Failed to find
>>>> '/home/jim/mythtv-qt5-output/share/mythtv/html/apps/backend/index.html'
>>>> Feb 15 21:12:28 nucboxg3 mythbackend[699]: mythbackend[699]: W HTTP0
>>>> mythhttpfile.cpp:50 (ProcessFile) HTTPFile: Failed to find
>>>> '/home/jim/mythtv-qt5-output/share/mythtv/html/apps/backend/index.html'
>>>> Feb 15 21:12:28 nucboxg3 mythbackend[699]: mythbackend[699]: W HTTP0
>>>> mythhttpfile.cpp:50 (ProcessFile) HTTPFile: Failed to find
>>>> '/home/jim/mythtv-qt5-output/share/mythtv/html/favicon.ico'
>>>> Feb 15 21:12:28 nucboxg3 mythbackend[699]: mythbackend[699]: W HTTP0
>>>> mythhttpfile.cpp:50 (ProcessFile) HTTPFile: Failed to find
>>>> '/home/jim/mythtv-qt5-output/share/mythtv/html/apps/backend/index.html'
>>>> lines 1-22/22 (END)
>>>>
>>>> Even though it's looking the a different place, the files are there:
>>>>
>>>> cd mythtv-qt5-output/share/mythtv/html/apps/backend/
>>>> [jim at nucboxg3 backend]$ ls
>>>> 3rdpartylicenses.txt color.png favicon.ico hue.png index.html
>>>> main.js polyfills.js runtime.js styles.css
>>>> [jim at nucboxg3 backend]$
>>>>
>>>> Jim A
>>>>
>>>> Did you export MYTHTVDIR=/usr/local in the systemd service?
>>>>
>>>> Better to build with the correct MYTH_RUN_PREFIX so that you don't need
>>>> to specify MYTHTVDIR in the systemd service. I only use MYTHTVDIR for
>>>> testing and debugging or when running mythbackend from the command line.
>>>>
>>>> Peter
>>>>
>>> I'm not completely sure I understand the MYTH_RUN_PREFIX. If I'm
>>> building with -DCMAKE_INSTALL_PREFIX=~/my_mythtv_cmake_output but I intend
>>> to copy the content of the my_mythtv_cmake_output directory to /usr then I
>>> need to add -DMYTH_RUN_PREFIX=/usr??
>>>
>>> Jim A
>>>
>>>
>>
>> Yes, in this case you need both prefixes.
>>
>> Roland
>>
>>
>
> Okay, I'll test building with both prefixes on my next test. For now I
> was successful with using sudo and -DCMAKE_INSTALL_PREFIX=/usr
>
> Jim A
>
So I just tested on a fresh install of Archlinux Plasma via archinstall.
The dependencies were installed with the recently fixed ansible role for
Archlinux.
I cloned mythtv and checked out fixes/35 and ran:
cmake --preset qt5 -DCMAKE_INSTALL_PREFIX=~/mythtv-output
-DMYTH_RUN_PREFIX=/usr
cmake --build build-qt5
Then I copied all the files from ~/mythtv-output to /usr.
I ran my script that setups the mythtv user, mythtv-backend.service,
mythconverg database, and Storage Group directories with permissions.
After reboot the web app worked and found the database okay.
Only one issue, when trying to work the Input Connections page I could not
use the scan option of HDHomerun Channel Import. It got stuck on LOCK on
the first channel.
I switched to Full Scan and got past that. This has not been an issue on
Debian or Ubuntu systems.
hdhomerun_config discover
hdhomerun device 1043ECAB found at fe80::218:ddff:fe04:3eca%3
hdhomerun device 1043ECAB found at 192.168.68.93
hdhomerun device 1074C841 found at fe80::218:ddff:fe07:4c84%3
hdhomerun device 1074C841 found at 192.168.68.92
Jim A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20250218/b34e61e9/attachment.htm>
More information about the mythtv-users
mailing list