Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. (gelöst)USV

    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

    (gelöst)USV

    This topic has been deleted. Only users with topic management privileges can see it.
    • ostseereiter
      ostseereiter @crunchip last edited by

      @crunchip sagte in USV:

      sudo systemctl status nut-client

      Ja nun habe ich auf den Client das installiert und natürlich eingetragen in den beiden Dateien
      dann gestartet. und geschaut ob es läuft dabei kam das raus.

      pi@SVPi-hole:~ $ sudo systemctl restart nut-client
      Job for nut-monitor.service failed because the control process exited with error                                                                                                              code.
      See "systemctl status nut-monitor.service" and "journalctl -xe" for details.
      pi@SVPi-hole:~ $ sudo systemctl status nut-client
      ● nut-monitor.service - Network UPS Tools - power device monitor and shutdown co
         Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled; vendor pres
         Active: failed (Result: exit-code) since Fri 2021-05-21 09:30:38 CEST; 17s ag
        Process: 9283 ExecStart=/sbin/upsmon (code=exited, status=1/FAILURE)
      
      May 21 09:30:38 SVPi-hole systemd[1]: Starting Network UPS Tools - power device
      May 21 09:30:38 SVPi-hole upsmon[9283]: fopen /var/run/nut/upsmon.pid: No such f
      May 21 09:30:38 SVPi-hole upsmon[9283]: Using power down flag file /etc/killpowe
      May 21 09:30:38 SVPi-hole upsmon[9283]: Unable to use old-style MONITOR line wit
      May 21 09:30:38 SVPi-hole upsmon[9283]: Convert it and add a username to upsd.us
      May 21 09:30:38 SVPi-hole upsmon[9283]: Fatal error: unusable configuration
      May 21 09:30:38 SVPi-hole upsmon[9283]: Network UPS Tools upsmon 2.7.4
      May 21 09:30:38 SVPi-hole systemd[1]: nut-monitor.service: Control process exite
      May 21 09:30:38 SVPi-hole systemd[1]: nut-monitor.service: Failed with result 'e
      May 21 09:30:38 SVPi-hole systemd[1]: Failed to start Network UPS Tools - power
      lines 1-15/15 (END)...skipping...
      ● nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
         Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled; vendor preset: enabled)
         Active: failed (Result: exit-code) since Fri 2021-05-21 09:30:38 CEST; 17s ago
        Process: 9283 ExecStart=/sbin/upsmon (code=exited, status=1/FAILURE)
      
      May 21 09:30:38 SVPi-hole systemd[1]: Starting Network UPS Tools - power device monitor and shutdown controller...
      May 21 09:30:38 SVPi-hole upsmon[9283]: fopen /var/run/nut/upsmon.pid: No such file or directory
      May 21 09:30:38 SVPi-hole upsmon[9283]: Using power down flag file /etc/killpower
      May 21 09:30:38 SVPi-hole upsmon[9283]: Unable to use old-style MONITOR line without a username
      May 21 09:30:38 SVPi-hole upsmon[9283]: Convert it and add a username to upsd.users - see the documentation
      May 21 09:30:38 SVPi-hole upsmon[9283]: Fatal error: unusable configuration
      May 21 09:30:38 SVPi-hole upsmon[9283]: Network UPS Tools upsmon 2.7.4
      May 21 09:30:38 SVPi-hole systemd[1]: nut-monitor.service: Control process exited, code=exited, status=1/FAILURE
      May 21 09:30:38 SVPi-hole systemd[1]: nut-monitor.service: Failed with result 'exit-code'.
      May 21 09:30:38 SVPi-hole systemd[1]: Failed to start Network UPS Tools - power device monitor and shutdown controller.
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      ~
      lines 1-15/15 (END)
      
      
      crunchip Homoran 2 Replies Last reply Reply Quote 0
      • crunchip
        crunchip Forum Testing Most Active @ostseereiter last edited by crunchip

        @ostseereiter irgendwo hast du etwas falsch eingetragen und daher läuft dein service nicht

        prüfe doch mal da(Server), wo deine USV dran hängt, das muss erst mal korrekt laufen

        sudo systemctl status nut-server
        sudo systemctl status nut-client
        

        danach an deinem Client(SLave) die config überprüfen, ob alles richtig eingetragen ist, danach

        sudo systemctl restart nut-client
        sudo systemctl status nut-client
        

        was mir noch aufgefallen ist, deine 3 user,

        upsmaster]
                password = xxxxxxx
                actions = SET
                instcmds = ALL
                upsmon master
        
        [raspiuser]
        	password = xxxxx
        	upsmon slave
         
        [upskino]
                password  = xxxx
                upsmon slave
        

        reichen eigentlich 2, einmal master, einmal slave, diese musst du ja in der jeweiligen .conf hinterlegen

        ostseereiter 1 Reply Last reply Reply Quote 0
        • ostseereiter
          ostseereiter @crunchip last edited by

          @crunchip OK ich kontrolliere noch mal alles und dokumentiere das dann hier.

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

            @ostseereiter sagte in USV:

            Ja nun habe ich auf den Client das installiert und natürlich eingetragen in den beiden Dateien

            was installiert und was eingetragen?

            In den Clients muss natürlich was anderes in den config-Dateien stehen, als im Server

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

              @homoran ja ich dokumentiere noch mal alles schritt für Schritt melde mich dann wieder.

              1 Reply Last reply Reply Quote 0
              • ostseereiter
                ostseereiter last edited by

                So hier nochmal die einzelnen Schritte.

                In der sudo nano /etc/nut/ups.conf
                habe ich das eingetragen außer den pollinterval nicht.

                #
                # The general form is:
                #
                 [serverups]
                       driver = usbhid-ups
                         port = auto
                        desc = "Eeaton UPS"
                #
                # The section header ([upsname]) can be just about anything as long as
                # it is a single word inside brackets.  upsd uses this to uniquely
                # identify a UPS on this system.
                

                in der sudo nano /etc/nut/nut.conf das

                # IMPORTANT NOTE:
                #  This file is intended to be sourced by shell scripts.
                #  You MUST NOT use spaces around the equal sign!
                
                MODE=netserver
                

                nun kommt sudo nano /etc/nut/upsd.conf da habe ich das drin

                # you can specify if upsd requests or requires client's' certificates.
                # Possible values are :
                #  - 0 to not request to clients to provide any certificate
                #  - 1 to require to all clients a certificate
                #  - 2 to require to all clients a valid certificate
                #
                # See 'docs/security.txt' or the Security chapter of NUT user manual
                # for more information on the SSL support in NUT.
                
                LISTEN 127.0.0.1 3493
                LISTEN 192.168.178.109 3493
                

                nun die Benutzerkonten ich nehme gleich den 3 raus.sudo nano /etc/nut/upsd.users

                
                # MONITOR myups@localhost 1 upsmon pass master  (or slave)
                [upsmaster]
                 password = test
                 actions = SET
                 instcmds = ALL
                 upsmon master
                
                [raspiuser]
                 password = secret
                 upsmon slave
                

                in der sudo nano /etc/systemd/system/multi-user.target.wants/nut-server.service steht das:

                Wants=nut-driver.service
                Before=nut-monitor.service
                
                [Service]
                ExecStartPre=/bin/sleep 30
                ExecStart=/sbin/upsd
                Type=forking
                
                [Install]
                WantedBy=multi-user.target
                

                Jetzt das Monitoring sudo nano /etc/nut/upsmon.conf
                da habe ich diese Zeile hinzugefügt:

                
                MONITOR serverups@localhost 1 upsmaster test master
                

                Dann habe ich den dienst neugestartet mit sudo systemctl restart nut-server
                mit

                andy@debian:~$ sudo systemctl restart nut-server
                

                Dann kam dieses bei raus

                Warning: The unit file, source configuration file or drop-ins of nut-server.service changed on disk. Run 'systemctl daemon-reload' to reload units.
                Job for nut-server.service failed because the control process exited with error code.
                See "systemctl status nut-server.service" and "journalctl -xe" for details. 
                

                Nun sollte der Server eingerichtet sein

                Jetzt gehen wir zu den Client der Raspi
                dort habe ich erst mal installiert mit sudo apt install nut-client
                jetzt editiert mit sudo nano /etc/nut/nut.conf
                dort steht drin

                # - netserver: same as for the standalone configuration, but also need
                #   some more network access controls (firewall, tcp-wrappers) and possibly a
                #   specific LISTEN directive in upsd.conf.
                #   Since this MODE is opened to the network, a special care should be applied
                #   to security concerns.
                # - netclient: this mode only requires upsmon.
                #
                # IMPORTANT NOTE:
                #  This file is intended to be sourced by shell scripts.
                #  You MUST NOT use spaces around the equal sign!
                
                MODE=netclient
                

                jetzt diese Datei sudo nano /etc/nut/upsmon.conf

                When compiled with SSL, specify that a secured connection must be used
                # to communicate with upsd.
                # If you don't use 'CERTVERIFY 1', then this will at least make sure
                # that nobody can sniff your sessions without a large effort.  Setting
                # this will make upsmon drop connections if the remote upsd doesn't
                # support SSL, so don't use it unless all of them have it running.
                # When compiled with NSS support of SSL, can be overriden for host
                # specified with a CERTHOST directive.
                MONITOR serverups@192.168.178.109 1 raspiuser testslave
                

                nun den Clientserver neu starten mit sudo systemctl restart nut-client
                jetzt kommt diese Ausgabe.

                pi@SVPi-hole:~ $ sudo systemctl restart nut-client
                
                Broadcast message from nut@SVPi-hole (somewhere) (Fri May 21 11:03:50 2021):
                
                Communications with UPS serverups@192.168.178.109 lost
                
                
                Broadcast message from nut@SVPi-hole (somewhere) (Fri May 21 11:03:55 2021):
                
                UPS serverups@192.168.178.109 is unavailable
                

                und nach einer gewissen Zeit diese Ausgabe

                pi@SVPi-hole:~ $ ^C
                
                Broadcast message from nut@SVPi-hole (somewhere) (Fri May 21 11:09:00 2021):
                
                UPS serverups@192.168.178.109 is unavailable
                
                Homoran crunchip 3 Replies Last reply Reply Quote 0
                • Homoran
                  Homoran Global Moderator Administrators @ostseereiter last edited by

                  @ostseereiter sagte in USV:

                  In der sudo nano /etc/nut/ups.conf
                  habe ich das eingetragen

                  Beim Server oder bei den Clients?

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

                    @ostseereiter sagte in USV:

                    Nun sollte der Server eingerichtet sein

                    aber das davor hast du schon gelesen?

                    @ostseereiter sagte in USV:

                    Warning: The unit file, source configuration file or drop-ins of nut-server.service changed on disk. Run 'systemctl daemon-reload' to reload units. Job for nut-server.service failed because the control process exited with error code. See "systemctl status nut-server.service" and "journalctl -xe" for details.

                    und behoben?

                    wohl eher nicht!
                    denn der Controller schgeint weiter nicht erreichbar zu sein

                    @ostseereiter sagte in USV:

                    UPS serverups@192.168.178.109 is unavailable

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

                      @homoran
                      im Server

                      Thomas Braun 1 Reply Last reply Reply Quote 0
                      • Thomas Braun
                        Thomas Braun Most Active @ostseereiter last edited by

                        @ostseereiter
                        Ich lese da wieder pihole. Muss da ggf. auch noch was eingestellt werden?

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

                          @homoran sagte in USV:

                          Warning: The unit file, source configuration file or drop-ins of nut-server.service changed on disk. Run 'systemctl daemon-reload' to reload units. Job for nut-server.service failed because the control process exited with error code. See "systemctl status nut-server.service" and "journalctl -xe" for details.

                          und behoben?
                          wohl eher nicht!
                          denn der Controller schgeint weiter nicht erreichbar zu sein
                          @ostseereiter sagte in USV:

                          jetzt habe ich versucht das zu beheben.

                          andy@debian:~$ sudo systemctl daemon-reload
                          [sudo] Passwort für andy:
                          andy@debian:~$ sudo systemctl restart nut-server
                          Job for nut-server.service failed because the control process exited with error                                                                                                              code.
                          See "systemctl status nut-server.service" and "journalctl -xe" for details.
                          andy@debian:~$ ^C
                          andy@debian:~$ sudo systemctl status nut-server.service
                          ● nut-server.service - Network UPS Tools - power devices information server
                             Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor prese
                             Active: failed (Result: exit-code) since Fri 2021-05-21 12:11:20 CEST; 45s ag
                            Process: 1409 ExecStartPre=/bin/sleep 30 (code=exited, status=0/SUCCESS)
                            Process: 2130 ExecStart=/sbin/upsd (code=exited, status=1/FAILURE)
                          
                          Mai 21 12:10:50 debian systemd[1]: Starting Network UPS Tools - power devices in
                          Mai 21 12:11:20 debian upsd[2130]: Network UPS Tools upsd 2.7.4
                          Mai 21 12:11:20 debian upsd[2130]: Fatal error: A previous upsd instance is alre
                          Mai 21 12:11:20 debian upsd[2130]: Either stop the previous instance first, or u
                          Mai 21 12:11:20 debian systemd[1]: nut-server.service: Control process exited, c
                          Mai 21 12:11:20 debian systemd[1]: nut-server.service: Failed with result 'exit-
                          Mai 21 12:11:20 debian systemd[1]: Failed to start Network UPS Tools - power dev
                          lines 1-13/13 (END)...skipping...
                          ● nut-server.service - Network UPS Tools - power devices information server
                             Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor preset: enabled)
                             Active: failed (Result: exit-code) since Fri 2021-05-21 12:11:20 CEST; 45s ago
                            Process: 1409 ExecStartPre=/bin/sleep 30 (code=exited, status=0/SUCCESS)
                            Process: 2130 ExecStart=/sbin/upsd (code=exited, status=1/FAILURE)
                          
                          Mai 21 12:10:50 debian systemd[1]: Starting Network UPS Tools - power devices information server...
                          Mai 21 12:11:20 debian upsd[2130]: Network UPS Tools upsd 2.7.4
                          Mai 21 12:11:20 debian upsd[2130]: Fatal error: A previous upsd instance is already running!
                          Mai 21 12:11:20 debian upsd[2130]: Either stop the previous instance first, or use the 'reload' command.
                          Mai 21 12:11:20 debian systemd[1]: nut-server.service: Control process exited, code=exited, status=1/FAILURE
                          Mai 21 12:11:20 debian systemd[1]: nut-server.service: Failed with result 'exit-code'.
                          Mai 21 12:11:20 debian systemd[1]: Failed to start Network UPS Tools - power devices information server.
                          
                          lines 1-13/13 (END)
                          
                          ● nut-server.service - Network UPS Tools - power devices information server
                             Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor prese
                             Active: failed (Result: exit-code) since Fri 2021-05-21 12:11:20 CEST; 45s ag
                            Process: 1409 ExecStartPre=/bin/sleep 30 (code=exited, status=0/SUCCESS)
                            Process: 2130 ExecStart=/sbin/upsd (code=exited, status=1/FAILURE)
                          
                          Mai 21 12:10:50 debian systemd[1]: Starting Network UPS Tools - power devices in
                          Mai 21 12:11:20 debian upsd[2130]: Network UPS Tools upsd 2.7.4
                          Mai 21 12:11:20 debian upsd[2130]: Fatal error: A previous upsd instance is alre
                          Mai 21 12:11:20 debian upsd[2130]: Either stop the previous instance first, or u
                          Mai 21 12:11:20 debian systemd[1]: nut-server.service: Control process exited, c
                          Mai 21 12:11:20 debian systemd[1]: nut-server.service: Failed with result 'exit-
                          Mai 21 12:11:20 debian systemd[1]: Failed to start Network UPS Tools - power dev
                          
                          lines 1-13/13 (END)
                          ● nut-server.service - Network UPS Tools - power devices information server
                             Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor preset: enabled)
                             Active: failed (Result: exit-code) since Fri 2021-05-21 12:11:20 CEST; 45s ago
                            Process: 1409 ExecStartPre=/bin/sleep 30 (code=exited, status=0/SUCCESS)
                            Process: 2130 ExecStart=/sbin/upsd (code=exited, status=1/FAILURE)
                          
                          Mai 21 12:10:50 debian systemd[1]: Starting Network UPS Tools - power devices information server...
                          Mai 21 12:11:20 debian upsd[2130]: Network UPS Tools upsd 2.7.4
                          Mai 21 12:11:20 debian upsd[2130]: Fatal error: A previous upsd instance is already running!
                          Mai 21 12:11:20 debian upsd[2130]: Either stop the previous instance first, or use the 'reload' command.
                          Mai 21 12:11:20 debian systemd[1]: nut-server.service: Control process exited, code=exited, status=1/FAILURE
                          Mai 21 12:11:20 debian systemd[1]: nut-server.service: Failed with result 'exit-code'.
                          Mai 21 12:11:20 debian systemd[1]: Failed to start Network UPS Tools - power devices information server.
                          
                          Homoran BBTown 2 Replies Last reply Reply Quote 0
                          • Homoran
                            Homoran Global Moderator Administrators @ostseereiter last edited by

                            @ostseereiter sagte in USV:

                            jetzt habe ich versucht das zu beheben.

                            entscheidend ist vielmehr die Frage was du gemacht hast bevor/so dass es zu dieser Fehlermeldung kam:

                            @ostseereiter sagte in USV:

                            The unit file, source configuration file or drop-ins of nut-server.service changed on disk

                            was hast du da im System verstellt?

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

                              @homoran sagte in USV:

                              was hast du da im System verstellt?

                              eigentlich nichts

                              Thomas Braun 1 Reply Last reply Reply Quote 0
                              • Thomas Braun
                                Thomas Braun Most Active @ostseereiter last edited by

                                @ostseereiter

                                Fatal error: A previous upsd instance is already running!
                                

                                Da läuft schon ein daemon.

                                ostseereiter 1 Reply Last reply Reply Quote 0
                                • crunchip
                                  crunchip Forum Testing Most Active @ostseereiter last edited by

                                  @ostseereiter sagte in USV:

                                  [raspiuser]
                                  password = secret
                                  upsmon slave

                                  nano /etc/nut/upsmon.conf, der Eintrag ist ebenfalls falsch

                                  MONITOR serverups@192.168.178.109 1 raspiuser testslave
                                  

                                  @ostseereiter sagte in USV:

                                  Mai 21 12:11:20 debian upsd[2130]: Fatal error: A previous upsd instance is alre

                                  du bekommst deinen service nicht zum laufen, hatte ich damals auch diese Meldung, als ich beim ersten mal die config falsch eingestellt hatte. Selbst als die Config dann richtig war, kam diese Meldung.
                                  Lösung war bei mir letztendlich, das ich den (Nut- server und nut - client) nochmal de/installiert habe, anschliessend die config der Reihe nach eingestellt habe und lief dann.

                                  1 Reply Last reply Reply Quote 0
                                  • ostseereiter
                                    ostseereiter @Thomas Braun last edited by

                                    @thomas-braun

                                    ja und das heißt ? Ich bin total überfordert im moment.Nicht böse sein wegen meiner Dummheit

                                    ostseereiter 1 Reply Last reply Reply Quote 0
                                    • ostseereiter
                                      ostseereiter @ostseereiter last edited by

                                      @ostseereiter

                                      andy@debian:~$ sudo upsd
                                      Network UPS Tools upsd 2.7.4
                                      fopen /var/run/nut/upsd.pid: No such file or directory
                                      listening on 192.168.178.109 port 3493
                                      listening on 127.0.0.1 port 3493
                                      Can't connect to UPS [serverups] (usbhid-ups-serverups): No such file or directory
                                      andy@debian:~$
                                      
                                      
                                      
                                      crunchip 1 Reply Last reply Reply Quote 0
                                      • BBTown
                                        BBTown @ostseereiter last edited by

                                        @ostseereiter
                                        078c4498-db5c-44df-8831-9621dc49f035-image.png
                                        gehört dort nicht ein Leerzeichen rein?

                                        crunchip 1 Reply Last reply Reply Quote 0
                                        • crunchip
                                          crunchip Forum Testing Most Active @BBTown last edited by

                                          @bbtown deswegen schrieb ich, dieser Eintrag ist falsch, zum einen ein Leerzeichen und zum anderen muss das passwort übereinstimmen, zumal ich keine Ahnung hab ob er das secret bzw test wirklich so eingetragen hat.

                                          1 Reply Last reply Reply Quote 0
                                          • crunchip
                                            crunchip Forum Testing Most Active @ostseereiter last edited by crunchip

                                            @ostseereiter keine Ahnung wo du etwas veraemmelt hast, ich rate dir, wie bereits geschrieben, deinstalliere nochmal incl, config
                                            Und installiere dann neu, dann ist deine config wieder default und du kannst von neu nach Anleitung ansetzen, alles andere zieht sich nur ewig in die Länge

                                            sudo apt-get purge --auto-remove nut
                                            

                                            Danach nochmal nach Anleitung

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

                                            Support us

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

                                            889
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            9
                                            135
                                            11183
                                            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