Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Auf redis umstellen

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Auf redis umstellen

    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Renegade 0 last edited by

      Also hab jetzt mal migrieren wollen:

      pi@TestPI:~ $ iobroker stop
      pi@TestPI:~ $ iobroker setup custom
      Current configuration:
      - Objects database:
        - Type: file
        - Host/Unix Socket: 127.0.0.1
        - Port: 9001
      - States database:
        - Type: file
        - Host/Unix Socket: 127.0.0.1
        - Port: 9000
      - Data Directory: ../../iobroker-data/
      
      Type of objects DB [(f)ile, (r)edis, ...], default [file]: r
      
      When Objects and Files are stored in a Redis database please consider the following:
      1. All data will be stored in RAM, make sure to have enough free RAM available!
      2. Make sure to check Redis persistence options to make sure a Redis problem will not cause data loss!
      3. The Redis persistence files can get big, make sure not to use an SD card to store them.
      
      Host / Unix Socket of objects DB(redis), default[127.0.0.1]: r
      Port of objects DB(redis), default[6379]: 
      Type of states DB [(f)file, (r)edis, ...], default [redis]: 
      Host / Unix Socket of states DB (redis), default[r]: 
      Port of states DB (redis), default[6379]: 
      Host name of this machine [TestPI]: 
      Please choose if this is a Master/single host (enter "m") or a Slave host (enter "S") you are about to edit. For Slave hosts the data migration will be skipped. [S/m]: m
      
      Important: Using redis for the Objects database is only supported
      with js-controller 2.0 or higher!
      When your system consists of multiple hosts please make sure to have
      js-controller 2.0 or higher installed on ALL hosts *before* continuing!
      
      
      Important #2: If you already did the migration on an other host
      please *do not* migrate again! This can destroy your system!
      
      
      Important #3: The process will migrate all files that were officially
      uploaded into the ioBroker system. If you have manually copied files into
      iobroker-data/files/... into own directories then these files will NOT be
      migrated! Make sure all files are in adapter directories inside the files
      directory!
      
      
      Do you want to migrate objects and states from "file/file" to "redis/redis" [y/N]: y
      
      Migrating the objects database will overwrite all objects! Are you sure that this is not a slave host and you want to migrate the data? [y/N]: y
      
      Connecting to previous DB "file"...
      Creating backup ...
      This can take some time ... please be patient!
      host.TestPI 609 states saved
      host.TestPI 747 objects saved
      Backup created: /opt/iobroker/backups/2021_01_21-18_36_16_backupiobroker-migration.tar.gz
      updating conf/iobroker.json
      
      Connecting to new DB "redis" (can take up to 20s) ...
      No connection to objects r:6379[redis]
      
      New Database could not be connected. Please check your settings. No settings have been changed.
      restoring conf/iobroker.json
      No connection to states r:6379[redis]
      pi@TestPI:~ $ redis-cli ping
      PONG
      pi@TestPI:~ $ 
      
      F Homoran 2 Replies Last reply Reply Quote 0
      • F
        fastfoot @Renegade 0 last edited by

        @renegade-0 sagte in Auf redis umstellen:

        default[127.0.0.1]: r

        du hast die IP mit r überschrieben 🙂

        R 1 Reply Last reply Reply Quote 0
        • R
          Renegade 0 @fastfoot last edited by

          @fastfoot uups.^^
          ok nochmal von vorn 🙂

          1 Reply Last reply Reply Quote 0
          • Homoran
            Homoran Global Moderator Administrators @Renegade 0 last edited by Homoran

            @renegade-0 sagte in Auf redis umstellen:

            No connection to states r:6379[redis]

            was macht das r da?

            EDIT: @fastfoot war schneller

            R 1 Reply Last reply Reply Quote 0
            • R
              Renegade 0 @Homoran last edited by

              @homoran

              jaja schon gefixt. 🙂

              @apollon77 So alles nochmal nach Vorschrift gemacht. Läuft wie eine 1.

              nur mein DoorIO macht immer noch mucken, aber das geht in den passenden Thread.

              Danke dir vielmals 🙂

              Homoran F 2 Replies Last reply Reply Quote 0
              • Homoran
                Homoran Global Moderator Administrators @Renegade 0 last edited by Homoran

                @renegade-0 sagte in Auf redis umstellen:

                aber das geht in den passenden Thread.

                Auch für die anderen Threads bitte nochmal Zusammenfassen:
                Du hast jetzt controller 3.2.x und redis?

                Und auch die Objekte in redis, wenn ich das richtig gesehen habe?

                @renegade-0 sagte in Auf redis umstellen:

                Do you want to migrate objects and states from "file/file" to "redis/redis" [y/N]: y

                EDIT: im anderen Thread habe ich gerade gefunden:

                So nun mein ganzes System auf die Latest gezogen, redis draufgepackt und migriert. Alle Adapter aktualisiert.

                Hab das gar nicht mitbekommen, hast du jetzt wirklich ALLE Adapter auf latest?

                R 1 Reply Last reply Reply Quote 0
                • R
                  Renegade 0 @Homoran last edited by

                  @homoran
                  OK wird gemacht

                  1 Reply Last reply Reply Quote 0
                  • F
                    fastfoot @Renegade 0 last edited by

                    @renegade-0 sagte in Auf redis umstellen:

                    So alles nochmal nach Vorschrift gemacht. Läuft wie eine 1.

                    Sorgfalt zahlt sich aus 🙂

                    1 Reply Last reply Reply Quote 0
                    • Dr. Bakterius
                      Dr. Bakterius Most Active @Dr. Bakterius last edited by

                      Noch ein Versuch - gleiches Ergebnis.
                      sudo systemctl restart redis-server
                      ergibt:

                      Job for redis-server.service failed because the control process exited with error code.
                      See "systemctl status redis-server.service" and "journalctl -xe" for details.
                      

                      systemctl status redis-server.service
                      ergibt:

                      * redis-server.service - Advanced key-value store
                         Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
                         Active: failed (Result: exit-code) since Thu 2021-01-21 19:08:33 CET; 13s ago
                           Docs: http://redis.io/documentation,
                                 man:redis-server(1)
                        Process: 6559 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=226/NAMESPA
                      

                      Und sudo journalctl -xe
                      ergibt:

                      -- Defined-By: systemd
                      -- Support: https://www.debian.org/support
                      --
                      -- The process /usr/bin/redis-server could not be executed and failed.
                      --
                      -- The error number returned by this process is ERRNO.
                      Jan 21 19:08:33 iobroker systemd[1]: redis-server.service: Control process exited, code=exited, status
                      -- Subject: Unit process exited
                      -- Defined-By: systemd
                      -- Support: https://www.debian.org/support
                      --
                      -- An ExecStart= process belonging to unit redis-server.service has exited.
                      --
                      -- The process' exit code is 'exited' and its exit status is 226.
                      Jan 21 19:08:33 iobroker systemd[1]: redis-server.service: Failed with result 'exit-code'.
                      -- Subject: Unit failed
                      -- Defined-By: systemd
                      -- Support: https://www.debian.org/support
                      --
                      -- The unit redis-server.service has entered the 'failed' state with result 'exit-code'.
                      Jan 21 19:08:33 iobroker systemd[1]: Failed to start Advanced key-value store.
                      -- Subject: A start job for unit redis-server.service has failed
                      -- Defined-By: systemd
                      -- Support: https://www.debian.org/support
                      --
                      -- A start job for unit redis-server.service has finished with a failure.
                      --
                      -- The job identifier is 674 and the job result is failed.
                      Jan 21 19:08:33 iobroker systemd[1]: redis-server.service: Service RestartSec=100ms expired, schedulin
                      Jan 21 19:08:33 iobroker systemd[1]: redis-server.service: Scheduled restart job, restart counter is a
                      -- Subject: Automatic restarting of a unit has been scheduled
                      -- Defined-By: systemd
                      -- Support: https://www.debian.org/support
                      --
                      -- Automatic restarting of the unit redis-server.service has been scheduled, as the result for
                      -- the configured Restart= setting for the unit.
                      Jan 21 19:08:33 iobroker systemd[1]: Stopped Advanced key-value store.
                      -- Subject: A stop job for unit redis-server.service has finished
                      -- Defined-By: systemd
                      -- Support: https://www.debian.org/support
                      --
                      -- A stop job for unit redis-server.service has finished.
                      --
                      -- The job identifier is 715 and the job result is done.
                      Jan 21 19:08:33 iobroker systemd[1]: redis-server.service: Start request repeated too quickly.
                      Jan 21 19:08:33 iobroker systemd[1]: redis-server.service: Failed with result 'exit-code'.
                      -- Subject: Unit failed
                      -- Defined-By: systemd
                      -- Support: https://www.debian.org/support
                      --
                      -- The unit redis-server.service has entered the 'failed' state with result 'exit-code'.
                      Jan 21 19:08:33 iobroker systemd[1]: Failed to start Advanced key-value store.
                      -- Subject: A start job for unit redis-server.service has failed
                      -- Defined-By: systemd
                      -- Support: https://www.debian.org/support
                      --
                      -- A start job for unit redis-server.service has finished with a failure.
                      --
                      -- The job identifier is 715 and the job result is failed.
                      

                      Der Ordner \var\log\redis ist leer.

                      Jemand noch eine Idee?

                      Dr. Bakterius 1 Reply Last reply Reply Quote 0
                      • Dr. Bakterius
                        Dr. Bakterius Most Active @Dr. Bakterius last edited by

                        Mit /usr/bin/redis-server /etc/redis/redis.conf kann man ja die Config prüfen. Das ergibt:

                        *** FATAL CONFIG FILE ERROR ***
                        Reading the configuration file, at line 171
                        >>> 'logfile /var/log/redis/redis-server.log'
                        Can't open the log file: Permission denied
                        

                        Also folgendes gemacht:
                        Eine leere redis-server.log erstellt und dann
                        sudo chown -R redis:redis /var/log/redis
                        sudo chmod -R u+rwX,g+rwX,u+rx /var/log/redis
                        sudo chmod +r /etc/redis/redis.conf

                        Allerdings ohne Erfolg.

                        Thomas Braun F 2 Replies Last reply Reply Quote 0
                        • Thomas Braun
                          Thomas Braun Most Active @Dr. Bakterius last edited by

                          @dr-bakterius Da würde ich ja auch zunächst Mal schauen wem das Log mit welchen Rechten gehört. Dann kannst du halt da was ändern. Ich vermute ja immer noch eine fehlende Gruppenzugehörigkeit.

                          F Dr. Bakterius 2 Replies Last reply Reply Quote 0
                          • F
                            fastfoot @Dr. Bakterius last edited by

                            @dr-bakterius sagte in Auf redis umstellen:

                            Allerdings ohne Erfolg.

                            probiere mal (ohne Gewähr)

                            sudo systemctl edit redis-server
                            
                            [Service]
                            ProtectHome=no
                            
                            
                            Save and exit the editor 
                            
                            1 Reply Last reply Reply Quote 0
                            • F
                              fastfoot @Thomas Braun last edited by

                              @thomas-braun sagte in Auf redis umstellen:

                              @dr-bakterius Da würde ich ja auch zunächst Mal schauen wem das Log mit welchen Rechten gehört. Dann kannst du halt da was ändern. Ich vermute ja immer noch eine fehlende Gruppenzugehörigkeit.

                              er ist nicht iobroker, das würde sich erst beim Zugriff bemerkbar machen und ist dann evtl nochmal Thema. für jetzt startet der server erst gar nicht

                              1 Reply Last reply Reply Quote 0
                              • Dr. Bakterius
                                Dr. Bakterius Most Active @Thomas Braun last edited by Dr. Bakterius

                                @thomas-braun sagte in Auf redis umstellen:

                                Da würde ich ja auch zunächst Mal schauen wem das Log mit welchen Rechten gehört.

                                Es wird ja erst gar keine Log-Datei erstellt. Den Ordner habe ich mal als Test '777' zugewiesen - brachte aber auch nichts.

                                @fastfoot sagte in Auf redis umstellen:

                                probiere mal (ohne Gewähr)

                                Danke, aber leider kein Erfolg.

                                F 1 Reply Last reply Reply Quote 0
                                • F
                                  fastfoot @Dr. Bakterius last edited by

                                  @dr-bakterius sagte in Auf redis umstellen:

                                  Es wird ja erst gar keine Log-Datei erstellt.

                                  das Logfile wird in der redis.conf konfiguriert. Standardmässig ist das der Standard Output, also kein File. Wenn als daemon gestartet gehen die Ausgaben ohne eine Angabe nach /dev/null

                                  Dr. Bakterius 1 Reply Last reply Reply Quote 0
                                  • Dr. Bakterius
                                    Dr. Bakterius Most Active @fastfoot last edited by

                                    @fastfoot sagte in Auf redis umstellen:

                                    tandardmässig ist das der Standard Output, also kein File.

                                    Also wird dieses File, auch wenn in der Config angegeben, nicht erstellt? Warum beschwert er sich dann, dass er darauf keinen Zugriff hat?

                                    Ich habe das File jetzt noch einmal erstellt und dem User 'redis' gegeben (wie auch der Ordner). Jetzt kommt keine Beschwerde wegen des Zugriffs. Aber funktionieren tut es trotzdem nicht.

                                    Was bedeutet: Failed to start Advanced key-value store. (wird mir jetzt beim Status ausgegeben)?

                                    F 1 Reply Last reply Reply Quote 0
                                    • F
                                      fastfoot @Dr. Bakterius last edited by fastfoot

                                      @dr-bakterius sagte in Auf redis umstellen:

                                      @fastfoot sagte in Auf redis umstellen:

                                      tandardmässig ist das der Standard Output, also kein File.

                                      Also wird dieses File, auch wenn in der Config angegeben, nicht erstellt? Warum beschwert er sich dann, dass er darauf keinen Zugriff hat?

                                      Ich habe das File jetzt noch einmal erstellt und dem User 'redis' gegeben (wie auch der Ordner). Jetzt kommt keine Beschwerde wegen des Zugriffs. Aber funktionieren tut es trotzdem nicht.

                                      Was bedeutet: Failed to start Advanced key-value store. (wird mir jetzt beim Status ausgegeben)?

                                      doch, wenn angegeben schon! Stell mal das LOG-level auf warning. Evtl. hat redis keine Berechtigung?

                                      Schau mal noch hier, 2te Antwort, da wird Advanced....... als Beschreibung angegeben, wie bei dir. Seine Lösung war die ReadOnlyDirectory auszukommentieren

                                      Dr. Bakterius 1 Reply Last reply Reply Quote 0
                                      • Dr. Bakterius
                                        Dr. Bakterius Most Active @fastfoot last edited by

                                        @fastfoot @Thomas-Braun @Homoran

                                        Vielen Dank für eure Unterstützung. Das Problem ist erledigt! Die Lösung habe ich hier im Forum an anderer Stelle gefunden. Es lag an einer Proxmox-Einstellung für den LXC von ioBroker. Da muss man unter 'Features' 'Nesting' aktivieren. Ja ich weiß, mit einer VM wäre das nicht passiert... 🙄

                                        Thomas Braun Master67 2 Replies Last reply Reply Quote 2
                                        • Thomas Braun
                                          Thomas Braun Most Active @Dr. Bakterius last edited by

                                          @dr-bakterius
                                          Hmmmmmm. Komisch. Gerade gestern hat hier noch irgendwer erzählt, containern könnte jeder und es gäbe da eigentlich nie Probleme, die man nicht bei einer nativen Installation auch hätte.

                                          Dr. Bakterius 1 Reply Last reply Reply Quote 0
                                          • F
                                            fastfoot last edited by

                                            @thomas-braun sagte in Auf redis umstellen:

                                            @dr-bakterius
                                            Hmmmmmm. Komisch. Gerade gestern hat hier noch irgendwer erzählt, containern könnte jeder und es gäbe da eigentlich nie Probleme, die man nicht bei einer nativen Installation auch hätte.

                                            Ich hatte von Docker geredet, da ich lxc nicht auf dem Schirm hatte, da läuft das sofort. Und speziell meinte ich das buanet image, welches alle für iobroker notwendigen Einstellungen mitbringt. Gilt auch für das redis image 🙂 Hier wurde die Standard redis distro in einem container installiert. Und ja, meine Aussage war etwas allgemein, sonst bräuchte es ja keine Docker-, lxc- und auch Linuxspezialisten. Fallstricke gibt es immer...

                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            460
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            11
                                            100
                                            12820
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo