Betatest: LoxBerry 3.x auf Debian 12 (Bookworm)

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • Tico
    Lox Guru
    • 31.08.2016
    • 1035

    #16
    Hi Prof.Mobilux . Just to add some more interest...

    I've been attempting to install Node-Red on the Bookworm Loxberry. Node-Red is one of those 'core' applications that might be needed by some. It refuses to work unfortunately. I found a work-around but it doesn't give much direction on where to fault-find.

    The 'normal' installation of Node-Red is done by script (ie. my old installation on Loxberry 2.x) -

    Code:
    bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
    If the script is run at the prompt in DietPi, a message says to install Node-Red with the dietpi-software command.

    Attempting to install Node-Red via the dietpi-software is unsuccessful. It goes through the motions of installation and appears to have installed successfully (ie. no error messages). But it doesn't launch and node-red.service can't be found on the Pi.

    The work-around is to clean install DietPi, then install Node-Red with the dietpi-software tool, then run the Loxberry install script.

    Sorry, I don't have any more pointers to help
    Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.

    Kommentar

    • Prof.Mobilux
      Supermoderator
      • 25.08.2015
      • 4591

      #17
      Install it via dietpi-software. Does that work? If not I can't do anything. It's Debian, not Loxberry...
      🇺🇦 Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine


      LoxBerry - Beyond the Limits

      Kommentar


      • Tico
        Tico kommentierte
        Kommentar bearbeiten
        Yes, the successful work-around is to install it with dietpi software on a clean dietpi installation. Then follow-up with the Loxberry install script. Then Node-Red works fine running in parallel with Loxberry.

        Which is to say the Loxberry installation script somehow breaks the function of the dietpi software install (atleast for Node-Red). I can't install Node-Red after the Loxberry script has completed.

        If people wish to install Node-Red, just do it before the Loxberry install script.

      • Prof.Mobilux
        Prof.Mobilux kommentierte
        Kommentar bearbeiten
        Ah, understood. That should no happen... maybe the nodejs V20 isn't compatible. I will check...
    • Tico
      Lox Guru
      • 31.08.2016
      • 1035

      #18
      I can provide some observations. I don't really know whether they're relevant...

      On my previous Loxberry installation (2.x), the node-red.service file needed to be edited after installation.

      User=loxberry
      Group=root
      WorkingDirectory=/home


      In my working installation of Node-Red on Bookworm/Loxberry, I navigate to /etc/systemd/system/node-red.service. If I open node-red.service, it looks like this -

      Klicke auf die Grafik für eine vergrößerte Ansicht  Name: node-red.service.png Ansichten: 0 Größe: 13,2 KB ID: 412784


      When I tried installing Node-Red after Loxberry install, I navigated to the same location. The file node-red.service is there, but it is completely empty.

      My guess is -

      The successful install (pre-Loxberry script) by user root@DietPi is working to write the node-red.service file.

      The unsuccessful install (post Loxberry script) by user root@loxberry is related to not writing the node-red.service file.
      Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.

      Kommentar

      • Prof.Mobilux
        Supermoderator
        • 25.08.2015
        • 4591

        #19
        Mmhhh, strange. Our installation just installs apt packages and more or less configures Apache and some services. Don't know what we change regarding service files etc. and root is always allowed to do anything...

        On LoxBerry 3.0 with Bullseye I just use dietpi-software to install node-red in a plugin - and this works fine: https://github.com/mschlenstedt/LoxB...mon/daemon#L11
        🇺🇦 Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine


        LoxBerry - Beyond the Limits

        Kommentar

        • Prof.Mobilux
          Supermoderator
          • 25.08.2015
          • 4591

          #20
          So, I just installed NodeRed via dietpi-software and everything works fine. /etc/systemd/system/node-red.service is not empty and Node Red is running on Port 1880 after a reboot. I haven't made any changes manually, just installed via dietpi-software.

          But I gifured out that dietpi-software overwrite our own node Installation (V20) with Node V18. I will change this in the LoxBerry install script to the "standard way Diet pi installes Node" and will try from scratch on my Pi3.​
          🇺🇦 Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine


          LoxBerry - Beyond the Limits

          Kommentar


          • Tico
            Tico kommentierte
            Kommentar bearbeiten
            Thanks for looking into that. One other observation that comes to mind - I had the Loxberry Watchdog activated and it notified of a crash/reboot at one point on Node-Red install. Another installation attempt appeared to go through fine. I’m not home to check, but I’m sure Node v21.0 was installed by Node-Red.
            Zuletzt geändert von Tico; 30.11.2023, 10:18.
        • Tico
          Lox Guru
          • 31.08.2016
          • 1035

          #21
          Hi Prof.Mobilux. Confirming all appears to be working fine now. I did the Node-Red installation with Watchdog disabled and that appears to have been the issue. I did notice on a couple of installation attempts that the Watchdog would trigger at a certain point in the Node-Red install.

          The Loxberry installation script is noticeably faster now. I think about just over an hour on a RPi 3b. It was over 2 hours before. Thanks for the great support!
          Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.

          Kommentar

          • Prof.Mobilux
            Supermoderator
            • 25.08.2015
            • 4591

            #22
            There was a problem in the apt config which I installed for PHP7.4 - that's why so many package version were choosen wrong by apt. The config worked fine for VMs, but not on Raspberry. This is fixed now.

            Furthermore I install node via dietpi-software now - this should be the official way for Diet Pi.
            🇺🇦 Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine


            LoxBerry - Beyond the Limits

            Kommentar

            • Noschvie
              LoxBus Spammer
              • 24.09.2018
              • 408

              #23
              BTW: can Docker be used with LoxBerry in parallel? Thanks

              Kommentar

              • Tico
                Lox Guru
                • 31.08.2016
                • 1035

                #24
                Hi Prof.Mobilux. I can't get a script running on the new Bookworm/Loxberry. On a previous Loxberry installation, I triggered the script from a Virtual Output on the Miniserver -

                Command for On - /legacy/batterycalibration/script_start.php

                The script_start.php is as follows -
                Code:
                <?php
                echo exec('python3 hybrid2_start_calibration.py');
                ?>​

                The beginning of the hybrid2_start_calibration.py is as follows -
                Code:
                #!/usr/bin/python3.6
                
                import socket
                import subprocess
                import time
                import os
                import datetime
                import argparse
                import random
                import hashlib
                import subprocess
                import requests
                
                from importlib.util import spec_from_file_location, module_from_spec
                from urllib.request import Request
                from urllib.request import urlopen
                from urllib.error import HTTPError
                from urllib.error import URLError
                
                import socket
                import sys
                import getpass
                import json​
                .....

                I've attempted to run the hybrid2_start_calibration.py script directly from the command-line. I get the message -

                bash: python: command not found.


                I see that Python 3.11.2 is installed on the Loxberry. I'm guessing my script needs Python 3.6? I'm also not sure if the Path variable is set and how to do that.

                What is the appropriate way to install Python 3.6 (if required) without breaking anything?
                Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.

                Kommentar


                • Tico
                  Tico kommentierte
                  Kommentar bearbeiten
                  Thanks. I gave that a go but unfortunately no success. I also tried -
                  #!/usr/bin/env/python
                  and
                  #!/usr/bin/env/python3.6

                • olicat
                  olicat kommentierte
                  Kommentar bearbeiten
                  What is the output of
                  Code:
                  which python
                  and
                  Code:
                  which python3
                  ?

                • Tico
                  Tico kommentierte
                  Kommentar bearbeiten
                  Solved. I finally got a helpful error message at the command line that advised of a ModuleNotFoundError: No module named 'requests'.
                  As root, I installed with the command -

                  Code:
                  sudo apt-get install python3-requests
                  That was the missing ingredient. Thanks for the help.
              • Tico
                Lox Guru
                • 31.08.2016
                • 1035

                #25
                I've just got around to setting up the MQTT Server in Bookworm/Loxberry. At the MQTT Basics tab, 'Use and automatically configure local MQTT Server' is selected. 'Save and Apply' results in a red 'Error saving data'.

                MQTT Gateway running (PID1234) Mosquito running (PID5678) is green at the bottom of the screen.

                Adding a subscription and selecting 'Save and Apply' also results in a red 'Error saving'

                I've perused the log-files and there's nothing I can see that suggests errors or faults.

                edit: Should MQTT Server hostname be localhost and uneditable?
                Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.

                Kommentar

                • Prof.Mobilux
                  Supermoderator
                  • 25.08.2015
                  • 4591

                  #26
                  Works for me here. Please post output of:

                  Code:
                  ls -l ~/config/system
                  🇺🇦 Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine


                  LoxBerry - Beyond the Limits

                  Kommentar

                  • Tico
                    Lox Guru
                    • 31.08.2016
                    • 1035

                    #27
                    Klicke auf die Grafik für eine vergrößerte Ansicht

Name: MQTT issue.png
Ansichten: 238
Größe: 39,6 KB
ID: 413674
                    Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.

                    Kommentar

                    • Tico
                      Lox Guru
                      • 31.08.2016
                      • 1035

                      #28
                      I'm not sure whether it's relevant, but using 'Inspect' in Chrome shows the following error -

                      Klicke auf die Grafik für eine vergrößerte Ansicht

Name: Test.png
Ansichten: 231
Größe: 43,6 KB
ID: 413678
                      Zuletzt geändert von Tico; 08.12.2023, 01:53.
                      Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.

                      Kommentar

                      • Prof.Mobilux
                        Supermoderator
                        • 25.08.2015
                        • 4591

                        #29
                        Permissions are lookin good. Your posted screenshot is relevant - thanks. Can you please have a look into ~/log/system_tmpfs/apache2/php.log when you click on "Save". There must be an error. I fixed some errors here a few days ago and it worked for me. I wonder that you haven't got this fix during installation...
                        🇺🇦 Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine


                        LoxBerry - Beyond the Limits

                        Kommentar

                        • Tico
                          Lox Guru
                          • 31.08.2016
                          • 1035

                          #30
                          Here's the php.log -

                          [08-Dec-2023 14:59:26 Australia/Perth] PHP Fatal error: Uncaught Error: Class 'SQLite3' not found in /opt/loxberry/>
                          Stack trace:
                          #0 /opt/loxberry/libs/phplib/loxberry_log.php(89): intLog->log_db_init_database()
                          #1 /opt/loxberry/libs/phplib/loxberry_log.php(782): intLog->__construct()
                          #2 /opt/loxberry/webfrontend/htmlauth/system/ajax/ajax-generic.php(39): LBLog::newLog()
                          #3 {main}
                          thrown in /opt/loxberry/libs/phplib/loxberry_log.php on line 421
                          [08-Dec-2023 14:59:32 Australia/Perth] PHP Fatal error: Uncaught Error: Class 'SQLite3' not found in /opt/loxberry/>
                          Stack trace:
                          #0 /opt/loxberry/libs/phplib/loxberry_log.php(89): intLog->log_db_init_database()
                          #1 /opt/loxberry/libs/phplib/loxberry_log.php(782): intLog->__construct()
                          #2 /opt/loxberry/webfrontend/htmlauth/system/ajax/ajax-generic.php(39): LBLog::newLog()
                          #3 {main}
                          thrown in /opt/loxberry/libs/phplib/loxberry_log.php on line 421
                          [08-Dec-2023 14:59:32 Australia/Perth] PHP Fatal error: Uncaught Error: Class 'SQLite3' not found in /opt/loxberry/>
                          Stack trace:
                          #0 /opt/loxberry/libs/phplib/loxberry_log.php(89): intLog->log_db_init_database()
                          #1 /opt/loxberry/libs/phplib/loxberry_log.php(782): intLog->__construct()
                          #2 /opt/loxberry/webfrontend/htmlauth/system/ajax/ajax-generic.php(39): LBLog::newLog()
                          #3 {main}
                          thrown in /opt/loxberry/libs/phplib/loxberry_log.php on line 421
                          [08-Dec-2023 14:59:32 Australia/Perth] PHP Fatal error: Uncaught Error: Class 'SQLite3' not found in /opt/loxberry/>
                          Stack trace:
                          #0 /opt/loxberry/libs/phplib/loxberry_log.php(89): intLog->log_db_init_database()
                          #1 /opt/loxberry/libs/phplib/loxberry_log.php(782): intLog->__construct()
                          #2 /opt/loxberry/webfrontend/htmlauth/system/ajax/ajax-generic.php(39): LBLog::newLog()
                          #3 {main}
                          thrown in /opt/loxberry/libs/phplib/loxberry_log.php on line 421



                          I haven't re-built the Loxberry since about 1 week ago (ie. ran the script at the beginning of the thread). Going forward, what is the best way to incorporate the fixes you've done? Does the Loxberry need to be built from a clean install each time?
                          Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.

                          Kommentar

                          Lädt...