Monitor your Internet service and provider

    Information and Support

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

    Information, Support and FAQ forums for OutagesIO

    Our FREE software monitors your Internet service and provider and can alert you to connection issues or downtime. For home, small business, IT companies and enterprise. Monitor Internet outages, track network connection reliability, and get proof you can use. For Windows 7, 8, 10, Centos 7, 8, Debian 7, Ubuntu, ARM (Raspberry, Tinker Board, etc).

    Learn more about www.outagesio.com by visiting our web site

    SOLVED: New script isn't working

    Linux
    linux release ubuntu
    3
    18
    89
    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.
    • SBK
      SBK @cwa last edited by

      @cwa

      I feel the issue is in the permissions of the /otm directory


      Try first this:

      • Make /otm and its content 777
      • Run the script again


      If nothing changes then:

      • Add the following line between lines 39 and 40:
      echo "BINARY_LOCATION"
      
      • to be sure the final result is this
          BINARY_LOCATION=$(curl -m 20 -s -u $USERNAME:$PASSWORD --connect-timeout 10 -X POST https://www.foxymon.com/receiver/receiver2.php -F function=receive_binary_location)
          echo "BINARY_LOCATION"
          echo "Getting the OTM Package"
      
      
      • share the URL that is returned by the echo statement


      Last but not least please share the content of the otminfo.log

      Ed (K.)
      OutagesIO Development Team

      C 1 Reply Last reply Reply Quote 0
      • C
        cwa @SBK last edited by

        @SBK ,

        I thought of the same strategy last night, and I assure you that /otm has 777 octal permissions; I checked a few times just for my own sanity, and here is a screen shot:
        octal permissions 2022-04-03 11-53-14.png
        As for capturing the output of the curl command, I did exactly as you suggested, and their is no output, and no error either. I thought perhaps some quoting my help so on lines 38 and 39 I inserted the set -e and set -x commands. set -x prints out all of the commands executed in the script along with values assigned to variables. set -e stops execution at the 1st error thrown. We can see exactly what is going on line-by-line as the script executes. Here is a copy of that part of the script with my edit:

        until [[ ${OTM_HTTP_STATUS} -eq 200 && ! -z ${OTM_REMOTE_LENGTH} ]]
        do
            sleep 5
            ##
            echo "Receiving binary location"
        set -e 
        set -x 
            BINARY_LOCATION=$(curl -m 20 -s -u $USERNAME:$PASSWORD --connect-timeout 10 -X POST https://www.foxymon.com/receiver/receiver2.php -F function=receive_binary_location)
            echo "Getting the OTM Package"
            curl -I -m 30 --connect-timeout 15 "$BINARY_LOCATION" -o $STARTING_FOLDER/otminfo.log
            OTM_HTTP_STATUS=$(cat $STARTING_FOLDER/otminfo.log | awk '/HTTP/ {print $2}')
            OTM_REMOTE_LENGTH=$( cat $STARTING_FOLDER/otminfo.log | awk '/content-length/ {print $2}' | sed -e 's/[\r\n]//g' )
        done
        

        And here is screen shot of the execution:
        execution2 2022-04-03 12-15-36.png

        And as you can see, I copied the curl command an ran it a few times directly on a command line... it just runs silently. The second curl command throws an error since the variable $BINARY_LOCATION is empty, and the script stops on that error.

        It turns out it is a network issue and I don't no how to deal with it. I hope you guys do. I did this:
        tracerroute 2022-04-03 12-21-34.png

        Packet transmission is always stopped by the same host eth.14.2.cr2.phx0.phoenixnap.com. Since no packets ever reach www.foxymon.com, the 1st curl command has no output since $BINARY_LOCATION is empty.

        Any ideas?

        cwa

        SBK 1 Reply Last reply Reply Quote 0
        • SBK
          SBK @cwa last edited by

          @cwa
          Just to confirm, you still are experiencing the same issue?

          Ed (K.)
          OutagesIO Development Team

          C 1 Reply Last reply Reply Quote 0
          • OutagesIO_Support
            OutagesIO_Support Moderator last edited by

            BTW, pings will fail once they get into the data center. We block ICMP at the firewall due to heavy scanning of our network.

            Regards,
            OutagesIO Support

            Search engines favor deep pockets and popularity, making it highly difficult to find niche services like OutagesIO.
            We work hard on OutagesIO and your review would improve our chances of being found.

            Would you please take a moment to leave a Google review for us. We thank you in advance.
            Google reviews for OutagesIO

            C 1 Reply Last reply Reply Quote 0
            • C
              cwa @SBK last edited by

              @SBK ,
              Yes, no change. I was hoping you guys would have found out what is going on. I'm a database admin, so I'm not very strong when it comes to troubleshooting network issues of this kind. If there are any other tests I can do let me know.

              ~ cwa

              SBK 1 Reply Last reply Reply Quote 0
              • C
                cwa @OutagesIO_Support last edited by

                @OutagesIO_Support ,
                I am willing to run any kinds of tests you guys suggest. I'd really like to use your service. I spent a ton of time searching for a service like this and yours seemed to be the best for my needs.

                ~ cwa

                1 Reply Last reply Reply Quote 1
                • OutagesIO_Support
                  OutagesIO_Support Moderator last edited by OutagesIO_Support

                  We're not going anywhere so it's important for us to fix anything that prevents anyone from using the service.

                  About the only problems we have left to find a solution to is a loss of access between the application and the database.

                  We're completely aware of that one and have been working on it for days trying to find the root cause. So far, nothing obvious, just lots of empty leads.

                  There are no other reasons that the site would be unreachable unless something on the Internet itself is causing our site to be broken somehow.

                  I don't know of any DNS hijack or anything along those lines since we didn't change DNS for the service, only for the DDNS function.

                  Maybe it's something that will just go away and start working suddenly. Really not sure what to say since we see everything up and running and have a ton of outside monitoring so we know about problems.

                  This is not an excuse since we know it's affecting more than one person but simply don't know what could be causing it.

                  How could you help? I don't know. I have to review the entire thread again and see if we can come up with some ideas.

                  Do you have another PC/Server you could try from, at another location perhaps?

                  Regards,
                  OutagesIO Support

                  Search engines favor deep pockets and popularity, making it highly difficult to find niche services like OutagesIO.
                  We work hard on OutagesIO and your review would improve our chances of being found.

                  Would you please take a moment to leave a Google review for us. We thank you in advance.
                  Google reviews for OutagesIO

                  1 Reply Last reply Reply Quote 0
                  • SBK
                    SBK @cwa last edited by

                    @cwa
                    Please try to execute this command on any console you have:

                    curl -m 20 -s -u ZBjlLzGSC5:MB9rPpfVAUjwZO12RmqsI7bLJcWTiQGED5HleaF3 --connect-timeout 10 -X POST https://www.foxymon.com/receiver/receiver2.php -F function=receive_binary_location
                    

                    and let me know if you get an answer with a URL or still nothing as an answer

                    Ed (K.)
                    OutagesIO Development Team

                    C 1 Reply Last reply Reply Quote 0
                    • OutagesIO_Support
                      OutagesIO_Support Moderator last edited by

                      I just tested and the above works for me. The download link is shown.

                      Regards,
                      OutagesIO Support

                      Search engines favor deep pockets and popularity, making it highly difficult to find niche services like OutagesIO.
                      We work hard on OutagesIO and your review would improve our chances of being found.

                      Would you please take a moment to leave a Google review for us. We thank you in advance.
                      Google reviews for OutagesIO

                      1 Reply Last reply Reply Quote 0
                      • C
                        cwa @SBK last edited by

                        @SBK
                        It runs successfully:

                        curl -m 20 -s -u ZBjlLzGSC5:MB9rPpfVAUjwZO12RmqsI7bLJcWTiQGED5HleaF3 --connect-timeout 10 -X POST https://www.foxymon.com/receiver/receiver2.php -F function=receive_binary_location
                        
                        https://downloads.outagesio.com/otm/otm_1.67.2104_linux
                        

                        I created a new agent and it worked with no issues, so I'm good to go now.

                        ~cwa

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