Monitor your Internet service and provider

    Information and Support

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. cwa

    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

    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 9
    • Best 2
    • Controversial 0
    • Groups 0

    cwa

    @cwa

    2
    Reputation
    2
    Profile views
    9
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    cwa Unfollow Follow

    Best posts made by cwa

    • SOLVED: New script isn't working

      It prints an error over and over again, complaining about a url.

      Help!

      Thanks,

      Cwa

      posted in Linux
      C
      cwa
    • RE: SOLVED: New script isn't working

      @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

      posted in Linux
      C
      cwa

    Latest posts made by cwa

    • RE: SOLVED: New script isn't working

      @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

      posted in Linux
      C
      cwa
    • RE: SOLVED: New script isn't working

      @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

      posted in Linux
      C
      cwa
    • RE: SOLVED: New script isn't working

      @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

      posted in Linux
      C
      cwa
    • RE: SOLVED: New script isn't working

      @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

      posted in Linux
      C
      cwa
    • RE: SOLVED: New script isn't working

      @OutagesIO_Support

      I can confirm I followed those instructions exactly. If I made a mistake, it is be cause the brain is getting older sometimes makes foolish errors.
      I've been coding in bash for over 20 years, professionally, and that script looks very clean. I'm baffled.
      I'll stand by, no huge hurry on my end. In the meantime, thanks for the quick response, that was/is very impressive.

      cwa

      posted in Linux
      C
      cwa
    • RE: SOLVED: New script isn't working

      Oh yeah, a couple more things. I can browse to the URL shown in the script and can log in successfully with my credentials.

      Also, I can verify the script is reading my credentials from /etc/angentid correctly (I used "echo...." in the script).

      cwa

      posted in Linux
      C
      cwa
    • RE: SOLVED: New script isn't working

      @OutagesIO_Support
      Thanks for letting me know about the filtering! That was really frustrating but now I understand.

      I followed the instructions in this document: https://www.outagesio.com/monitor-your-internet-with-ubuntu-desktop-or-server/

      I entered 'comcast' as my ISP (whom I am not in love with).
      Entered my address, and then created an agent. I think I chose Ubuntu.
      I downloaded the script, and first used a new directory in my home dir. When that didn't work, I followed the article's instructions exactly and created /otm.
      I ran chmod 777 on it, and copied the script in with 755 permission. I didn't change anything in the script since I was using the folder it expected. I created /etc/agentid with the credentials, then ran the script.
      It first complained a log file was not present. I created the file "otminfo.log" manually, an ran the script again. It is stuck in a loop repeating this error message:
      "Receiving binary location
      Getting the OTM Package
      curl: (3) URL using bad/illegal format or missing URL
      Receiving binary location
      Getting the OTM Package
      curl: (3) URL using bad/illegal format or missing URL"

      Here's a screenshot, maybe it will help:
      terminal 2022-04-02 17-59-49.png

      And here's what the script is printing:
      terminal 2022-04-02 18-08-23.png

      Let me know what you discover!

      Thanks,

      cwa

      posted in Linux
      C
      cwa
    • RE: SOLVED: New script isn't working

      My original post had all of the information you are asking for, with several code snips, and 2 screen shots. Every time I tried to post, the post was denied. I kept simplifying the post until all that was left was a vanilla version .

      I'll try again, please stand by.

      cwa

      posted in Linux
      C
      cwa
    • SOLVED: New script isn't working

      It prints an error over and over again, complaining about a url.

      Help!

      Thanks,

      Cwa

      posted in Linux
      C
      cwa