• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    monocle-gateway: No such file or directory

    Support
    3
    13
    441
    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.
    • T
      tringler last edited by tringler

      Hello,

      I tried to install monocle into an alpine linux by:

      # ---------------------------------------
      # Create Monocle Gateway configuration 
      # directory
      # ---------------------------------------
      RUN mkdir -p /etc/monocle
      RUN mkdir -p /share/monocle
      RUN mkdir -p /tmp/monocle
      RUN ls -s /etc/monocle /share/monocle
      
      
      # ---------------------------------------
      # Install Monocle Gateway dependencies
      # and other useful utilties
      # ---------------------------------------
      RUN apk update &&      \
          apk add --no-cache \
          wget               \
          curl               \
          libstdc++          \
          nano               \
          net-tools          \
          openssl            \
          ca-certificates
      
      # ---------------------------------------
      # Download versioned Monocle Gateway
      # build archive file
      # - - - - - - - - - - - - - - - - - - - -
      # Extract Moncole Gateway related 
      # executables to the appropriate 
      # runtime directories 
      # - - - - - - - - - - - - - - - - - - - -
      # Remove the downloaded Monocle Gateway 
      # archive files
      # ---------------------------------------
      RUN wget -c https://files.monoclecam.com/monocle-gateway/linux/monocle-gateway-linux-armv7-v0.0.4.tar.gz -O /tmp/monocle/monocle-gateway.tar.gz && \
          cd /usr/local/bin/ && \
          tar xvzf /tmp/monocle/monocle-gateway.tar.gz monocle-gateway && \ 
          tar xvzf /tmp/monocle/monocle-gateway.tar.gz monocle-proxy  && \
          rm -Rf /tmp/monocle/
      
      # ---------------------------------------
      # Expose required TCP ports 
      # (port 443 is required by Amazon for 
      # secure connectivity)
      # ---------------------------------------
      EXPOSE 443/tcp
      
      # ---------------------------------------
      # Expose required UDP ports 
      # (used for the @proxy method to allow 
      # IP cameras to transmit streams via UDP)
      # ---------------------------------------
      EXPOSE 62000-62100/udp
      
      COPY run.sh /run.sh
      RUN chmod +x /run.sh
      ENTRYPOINT ["/bin/bash", "-c", "/run.sh"]
      

      If I try to run by

      #!/bin/bash
      /usr/local/bin/monocle-gateway --tail
      

      I get monocle-gateway: No such file or directory - Where is my mistake or can anyone confirm that?

      Thanks, Thomas

      Monocle 1 Reply Last reply Reply Quote 0
      • Monocle
        Monocle @tringler last edited by

        @tringler

        We have a Docker image pre-built (based on Alpine) it you want to use it.

        • https://monoclecam.com/monocle-gateway/install/docker
        • https://hub.docker.com/r/monoclecam/monocle-gateway

        And here is our Dockerfile:
        https://github.com/MonocleCam/monocle-gateway-docker/blob/master/Dockerfile


        Just doing a cursory comparison, I think the TAR.GZ you are downloading is not compiled for Alpine but rather Debian/Ubuntu distros.
        “monocle-gateway-linux-armv7-v0.0.4.tar.gz”

        Our Docker file is pulling this archive instead: “monocle-gateway-alpine-x64-0.0.4.tar.gz” – (for x64 rather than ARM. however)

        Thanks, Robert

        Monocle: https://monoclecam.com
        Getting Started | Troubleshooting Guide | FAQ | Contact Support

        1 Reply Last reply Reply Quote 1
        • Monocle
          Monocle last edited by

          It looks like we are currently only building “x64” binaries for Alpine distros.

          • https://files.monoclecam.com/monocle-gateway/linux/

          -Robert

          Monocle: https://monoclecam.com
          Getting Started | Troubleshooting Guide | FAQ | Contact Support

          1 Reply Last reply Reply Quote 0
          • T
            tringler last edited by tringler

            Thanks! Understood. Would it be possible to compile it for other architectures as well for alpine or should I use the linux binaries with i.e. an ubuntu base image? It is even possible to compile it by my own?

            For my use case I need to build my own Docker images to use it as hass.io plugin - Repo:
            https://community.home-assistant.io/t/add-monocle-gateway-as-add-on/146075

            Use-case:
            https://developers.home-assistant.io/docs/en/hassio_addon_tutorial.html

            Regards, Thomas

            Monocle 1 Reply Last reply Reply Quote 0
            • Monocle
              Monocle @tringler last edited by

              @tringler

              The binaries are not currently open source and the build can be a bit complicated/convoluted. However, I’d be happy to try and help and get distributions compiled for whatever platforms/distributions are needed for hass.io.

              Looking at the arch property of config.json example on this page: https://developers.home-assistant.io/docs/en/hassio_addon_tutorial.html

              "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],

              So maybe we need Alpine images for at least “i386”, “armv7” and “aarch64”?
              “armhf” is pretty old at this point and I’m not sure if we can compile for that or would want to add support for it.

              The tricky part for any Docker instance is the networking. The Monocle Gateway must be able to listen on port 443 and must be able to access the IP cameras on the user’s private network.
              (see Networking Considerations: https://hub.docker.com/r/monoclecam/monocle-gateway)


              Before we move forward on all that work, lets make sure we can get it fully working as a hass.io plugin/add-on first. So, like you suggested, lets just start with an “Ubuntu” base image in the Docker image for the add-on. The “apk” commands will have to be replaced with “apt” for ubuntu. But the rest looks like it should work for an Ubuntu docker image.

              Thanks, Robert

              Monocle: https://monoclecam.com
              Getting Started | Troubleshooting Guide | FAQ | Contact Support

              1 Reply Last reply Reply Quote 0
              • T
                tringler last edited by

                Thanks for your support! I will try it with Ubuntu on armv7 architecture and host networking. If its working I can improve it by switching the base image to alpine and/or try it with bridge networking.

                Monocle 1 Reply Last reply Reply Quote 0
                • Monocle
                  Monocle @tringler last edited by

                  @tringler

                  Let me know how it goes. I’ve started the process to get the underlying binaries compiling for Alpine for the various ARM builds. Still a work in progress …

                  Thanks, Robert

                  Monocle: https://monoclecam.com
                  Getting Started | Troubleshooting Guide | FAQ | Contact Support

                  sdesalve 1 Reply Last reply Reply Quote 0
                  • sdesalve
                    sdesalve @Monocle last edited by

                    @Monocle

                    Hi Robert,

                    have you compiled Alpine binaries for the various ARM builds?

                    I’m also interested in Hassio addon developement…

                    Bye
                    SDeSalve

                    Monocle 1 Reply Last reply Reply Quote 0
                    • Monocle
                      Monocle @sdesalve last edited by

                      @sdesalve

                      I did start this process but I’m not in my office right now and don’t remember exactly how far I got. Let me check on it Monday and see where I left off.

                      Thanks, Robert

                      Monocle: https://monoclecam.com
                      Getting Started | Troubleshooting Guide | FAQ | Contact Support

                      sdesalve 2 Replies Last reply Reply Quote 1
                      • sdesalve
                        sdesalve @Monocle last edited by

                        @Monocle thanks

                        1 Reply Last reply Reply Quote 0
                        • sdesalve
                          sdesalve @Monocle last edited by

                          Hi Robert

                          have you compiled Alpine binaries for the various ARM builds?

                          Sorry for my solicitation
                          SDeSalve

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

                            I’ve developed my Monocle Cam Gateway addon…

                            https://github.com/sdesalve/hassio-addons/tree/master/dss_monocle-gateway

                            It will run on x64 Hassio installations

                            Monocle 1 Reply Last reply Reply Quote 0
                            • Monocle
                              Monocle @sdesalve last edited by

                              @sdesalve

                              That’s great! Sorry for missing your last posts — My attention has been taken away from this project due to personal/family reasons … what can I say, its 2020 and this year has been a disaster. However, I plan to resume work on this project at the beginning of the year and hopefully I can revisit the Alpine binaries compilation.

                              Thanks, Robert

                              Monocle: https://monoclecam.com
                              Getting Started | Troubleshooting Guide | FAQ | Contact Support

                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post
                              Privacy Policy  |  Terms & Conditions

                              © 2018 shadeBlue, LLC.