ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    px4 service issue

    VOXL SDK
    4
    9
    259
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      giladWDS
      last edited by

      I have an issue with the px4 service where the px4 service starts at stop status on the drone boot. In my short time debugging this I looked at the body of the service and I see it requires another service to end:

      [Unit]
      Description=px4
      After=sscrpcd.service
      Requires=sscrpcd.service
      
      [Service]
      ExecStartPre=/bin/sleep 2
      ExecStart=/usr/bin/voxl-px4
      Restart=on-failure
      
      [Install]
      WantedBy=multi-user.target
      

      but I can't find this service on the system nor can I find it online.
      Am I missing something?
      I would love some help with this.

      Eric KatzfeyE 1 Reply Last reply Reply Quote 0
      • Eric KatzfeyE
        Eric Katzfey ModalAI Team @giladWDS
        last edited by

        @giladWDS I'm not sure I understand what you mean by "starts at stop status". Can you explain the issue? And what service can't you find? sscrpcd.service?

        voxl2:/$ sudo find . -name sscrpcd.service
        ./lib/systemd/system/multi-user.target.wants/sscrpcd.service
        ./lib/systemd/system/sscrpcd.service
        find: './sys/kernel/slab': Input/output error
        ./sys/fs/cgroup/pids/system.slice/sscrpcd.service
        ./sys/fs/cgroup/devices/system.slice/sscrpcd.service
        ./sys/fs/cgroup/systemd/system.slice/sscrpcd.service
        ./sys/fs/cgroup/unified/system.slice/sscrpcd.service
        
        G 1 Reply Last reply Reply Quote 0
        • G
          giladWDS @Eric Katzfey
          last edited by

          @Eric-Katzfey
          never knew that there are services outside of /etc/systemd/system
          and systemctl status voxl-px4 gives disable. I will bring the full argument as soon as I have access to the machine

          Eric KatzfeyE 1 Reply Last reply Reply Quote 0
          • Eric KatzfeyE
            Eric Katzfey ModalAI Team @giladWDS
            last edited by

            @giladWDS To enable it just enter systemctl enable voxl-px4

            G 1 Reply Last reply Reply Quote 0
            • G
              giladWDS @Eric Katzfey
              last edited by

              @Eric-Katzfey
              I did. The issue is that the drone is supposed to be autonomous at the end. and I would like to avoid constantly checking whether the px4 service is alive or not.
              from my understanding the service is supposed to be alive on boot so it seems to be a bag that I would want to fix.

              Eric KatzfeyE 1 Reply Last reply Reply Quote 0
              • Eric KatzfeyE
                Eric Katzfey ModalAI Team @giladWDS
                last edited by

                @giladWDS Okay, so the issue is that the service starts but px4 is not actually running? Can you include the output of the command systemctl status -l voxl-px4? And also journalctl -b -u voxl-px4?

                ben grocholskyB 1 Reply Last reply Reply Quote 0
                • ben grocholskyB
                  ben grocholsky @Eric Katzfey
                  last edited by

                  @Eric-Katzfey I saw a similar symptom last Friday on a voxl2 that seemed to have a corrupt partition for /dev/sda8.
                  Flashing to 1.3.5 wrote /data to / without sda8 mounted.
                  voxl-px4 failed depending on sscrpcd.service which failed depending on data.mount

                  voxl2:/$ mount /dev/disk/by-partlabel/userdata /data
                  mount: /data: wrong fs type, bad option, bad superblock on /dev/sda8, missing codepage or helper program, or other error.

                  voxl2:/$ fsck.ext4 /dev/sda8
                  e2fsck 1.44.3 (10-July-2018)
                  ext2fs_open2: Bad magic number in super-block
                  fsck.ext4: Superblock invalid, trying backup blocks...
                  fsck.ext4: Bad magic number in super-block while trying to open /dev/sda8

                  voxl2:/$ fdisk -l |grep sda8
                  The backup GPT table is corrupt, but the primary appears OK, so that will be used.
                  /dev/sda8 41480 16818695 16777216 64G unknown

                  Reflashing with ./install.sh --wipe-persistent fixed sda8 and made everything work.

                  @giladWDS could be worth checking /dev/sda8 is being mounted as /data without any errors.

                  tomT 1 Reply Last reply Reply Quote 0
                  • tomT
                    tom admin @ben grocholsky
                    last edited by

                    @ben-grocholsky This is very interesting, not something I've seen before. Out of curiosity what OS on your host machine are you using for the flashing process?

                    ben grocholskyB 1 Reply Last reply Reply Quote 0
                    • ben grocholskyB
                      ben grocholsky @tom
                      last edited by

                      @tom that was from ubuntu 20.04. Looking back up the terminal history I see the install script stopped at:
                      [ERROR] missing /data/modalai/sku.txt
                      [ERROR] please run voxl-configure-sku to make a new one
                      and didn't run the next setup steps. I didn't realize the flashing failed until seeing voxl-px4 couldn't start. And digging into that found this thread.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Powered by NodeBB | Contributors