[mythtv-users] web app gets 404 on backend built with cmake on Archlinux
James Abernathy
jfabernathy at gmail.com
Sun Feb 16 14:39:39 UTC 2025
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20250216/724d1ae1/attachment.htm>
More information about the mythtv-users
mailing list