SOLVED: Trying to install on Linux

Free Internet troubleshooting agent for Centos, Ubuntu and others. Outages.io automatically finds connectivity issues and gives you hard facts.

Moderators: Mike, Alex

dadaksa
Posts: 18
Joined: Tue Apr 28, 2020 5:25 pm

SOLVED: Trying to install on Linux

Post by dadaksa »

Hello,

I was trying to install the agent on linux.
I created the file with the credentials in the etc directory.
I created the otm directory in my /home and copied the script in the same directory and made it executable.
When executing it just loops trying to download and failing to create some files:

---------------------
dadak@dadak-Inspiron-15-7569:~/otm$ ./starter_linux_ocp.sh
Make sure to create /etc/agentid with credentials before starting this script
Make sure your starter file points to the correct directory where you are placed the binary into - Edit this starter file accordingly
You could add this to /etc/rc.local to start it or use some other method.
Receiving binary location
Getting the OTM Package
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file /otm/otminfo.log: No such file or directory
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (23) Failed writing body (0 != 17)
cat: /otm/otminfo.log: No such file or directory
cat: /otm/otminfo.log: No such file or directory
^Z
[1]+ Stopped ./starter_linux_ocp.sh
------------------------

Any idea what I am doing wrong?

The installation instructions talk about: Create a directory called /otm and copy the binary into this directory.
Which binary? the script? there is no button to download any binary (like in the Windows installation Video). I understand that it should be downloaded by the script.

User avatar
Alex
Posts: 72
Joined: Wed Feb 12, 2020 11:09 am

Re: Trying to install on Linux

Post by Alex »

Hi and thanks for trying Outages.io.

I downloaded the script and went through the process myself. You are right, there was a reference to binary and that has been updated now.
That could have lead to a little confusion. You'll notice the difference in the output I share below.

I think all you have is a small path problem. You mentioned putting the starter script in your /home directory somewhere.
If you look at your output, you'll see this; cat: /otm/otminfo.log: No such file or directory
I think you just need to edit your starter_linux_otm.sh script and make sure everything points to what ever directory you have the file in.
If you created /home/otm for example, make sure all references to /otm are in fact /home/otm. Then I think you'll be fine.

Here is what I did.

I created a new software agent from the Agents list.
I created the /etc/agentid file and put the shown credentials in it.

vi /etc/agentid
xxxxxxxx
xxxxxxxxxxxxxxxxxxxx

I saved this.

I created a directory called /otm and cd'd into it.
I copied the script code shown in the installation notes provided when I created the agent.
I then created the starter file
vi starter_linux_otm.sh
I pasted the contents of the code found in the installation notes.
I then started the file and everything worked as it should.

# ./starter_linux_ocp.sh
Make sure to create /etc/agentid with credentials before starting this script
Make sure your starter file points to the same directory that you have it in - Edit this starter file accordingly
In this case, this script is set to run the agent from a directory called /otm
You could add this to /etc/rc.local to start it or build a service for it. Please search Google for more.
Receiving binary location
Getting the OTM Package
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 150k 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Downloading OTM
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 150k 100 150k 0 0 299k 0 --:--:-- --:--:-- --:--:-- 300k
OTM show be downloaded and if so, we're starting it and exiting this script

# ps aux | grep otm
root 19796 0.0 0.0 766856 1888 pts/0 Sl 19:17 0:00 /otm/otm_linux
root 19858 0.0 0.0 112712 964 pts/0 S+ 19:17 0:00 grep --color=auto otm
I'm Alex, here to help. Please post your question and I'll try to answer

Are the issues in your local network, with your Internet provider or beyond?
Save countless hours by letting Outages.io help you find Internet connection problems.

User avatar
Alex
Posts: 72
Joined: Wed Feb 12, 2020 11:09 am

Re: Trying to install on Linux

Post by Alex »

BTW, if you create a new agent, you'll see that we've updated the script.
It now contains a variable at the top that you set called $start.
This is the path where you want to run your starter script from.
Once set, the script will use this and you do not have to edit any other part of the starter script.
I'm Alex, here to help. Please post your question and I'll try to answer

Are the issues in your local network, with your Internet provider or beyond?
Save countless hours by letting Outages.io help you find Internet connection problems.

dadaksa
Posts: 18
Joined: Tue Apr 28, 2020 5:25 pm

Re: Trying to install on Linux

Post by dadaksa »

Thanks! Let me try

dadaksa
Posts: 18
Joined: Tue Apr 28, 2020 5:25 pm

Re: Trying to install on Linux

Post by dadaksa »

Thanks for the very quick response and update!

I followed the instructions and used start="/home/dadak/otm"
It shows as active now but the there were two errors during the installation I don't know if all is fine:

dadak@dadak-Inspiron-15-7569:~$ cd otm
dadak@dadak-Inspiron-15-7569:~/otm$ ./starter_linux_ocp.sh
./starter_linux_ocp.sh: line 8: /deviceid: Permission denied
[line 8: echo "$devid" >$filesetc/deviceid]
Make sure to create /etc/agentid with credentials before starting this script
Make sure you have set the 'start' path where this file is
You could add this to /etc/rc.local to start it or build a service for it. Please search Google for more.
Receiving binary location
Getting the OTM Package
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 150k 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Downloading OTM
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 150k 100 150k 0 0 44716 0 0:00:03 0:00:03 --:--:-- 44703
OTM show be downloaded and if so, we're starting it and exiting this script
dadak@dadak-Inspiron-15-7569:~/otm$ socket(SOCK_RAW): Operation not permitted

dadaksa
Posts: 18
Joined: Tue Apr 28, 2020 5:25 pm

Re: Trying to install on Linux

Post by dadaksa »

And in case this is usefull:

dadak@dadak-Inspiron-15-7569:~/otm$ ps aux | grep otm
dadak 19991 0.0 0.0 401576 3584 pts/1 Sl Apr28 0:00 /home/dadak/otm/otm_linux
dadak 20841 0.0 0.0 15620 980 pts/1 S+ 00:08 0:00 grep --color=auto otm

Should it run as root? If so how should I stop the current session and restart it as root.

How to remove the first incomplete agent installation from the Manage Agents page?

User avatar
Alex
Posts: 72
Joined: Wed Feb 12, 2020 11:09 am

Re: Trying to install on Linux

Post by Alex »

Great, you've got it running.

>./starter_linux_ocp.sh: line 8: /deviceid: Permission denied

This is fine, it's just something in our own version that checks a second file for a hardware id. I'll see if we can remove that.

>OTM show be downloaded and if so, we're starting it and exiting this script
>dadak@dadak-Inspiron-15-7569:~/otm$ socket(SOCK_RAW): Operation not permitted

These errors are because the user that is running otm does not have full permissions needed.
You would have to run it as root or a user that has more permissions.

>Should it run as root? If so how should I stop the current session and restart it as root.

As you did here;
>dadak@dadak-Inspiron-15-7569:~/otm$ ps aux | grep otm
>dadak 19991 0.0 0.0 401576 3584 pts/1 Sl Apr28 0:00 /home/dadak/otm/otm_linux

The process number (PID) is shown at the start, in this case 19991. Just run 'kill PID' and that will stop it.

It would be best to turn this into a service that auto starts/stops/restarts which I'm sure folks in your operating system's forums or searching Google could help. It is beyond our scope of support.

Eventually, we'll have more people on staff helping in the forums and questions like these could be answered here.

>How to remove the first incomplete agent installation from the Manage Agents page?

Log into ocp.outages.io, pick the agent you want to administer if you have more than one.
Go to that agents dashboard, click on Manage.
There, you'll see a 'Delete' option. Click on this and you will be able to remove this agent from your account.

Glad you got this working. Let me know if you need any more help.

If you look in the forums, you'll find some explainer videos and posts that explain some of the features. We're working hard on updating and adding those> We used to use an FAQ which was challenging to maintain and slowly moving everything into these forums.
I'm Alex, here to help. Please post your question and I'll try to answer

Are the issues in your local network, with your Internet provider or beyond?
Save countless hours by letting Outages.io help you find Internet connection problems.

dadaksa
Posts: 18
Joined: Tue Apr 28, 2020 5:25 pm

Re: Trying to install on Linux

Post by dadaksa »

> Great, you've got it running.

Killed the process and restarted it with sudo. The first error message changed (but I understood that it's nothing to worry about) and the second error disappeared. Also in the control panel, the not receiving hops message, is gone now. The dashboard is not showing any details yet. The up and down times continued from where they started last night.

> ./starter_linux_ocp.sh: line 8: /deviceid: Permission denied

Is now:
./starter_linux_ocp.sh: line 8: $files: ambiguous redirect


> It would be best to turn this into a service that auto starts/stops/restarts which I'm sure folks in your operating system's forums or searching Google could help. It is beyond our scope of support.

I should be able to figure this out. I am a linux user for 20 years now, though mainly as a work system and only going under the hood when needed. Interesting though!

> How to remove the first incomplete agent installation from the Manage Agents page?

Easy with your explanation :-) Though I would not have thought of looking there. A delete button in the overview page (with the other actions) maybe more intuitive, though also easier to press by mistake.

> Glad you got this working. Let me know if you need any more help.

Thanks so much for the quick and detailed replies. Really appreciated!
All the best with the project.

I hope to use it to fight with my provider who keeps 'fixing' it but it keeps going on and off. Since last night it shows it was not working 20% of the time! Especially in the current situation where I need to host and attend many Zoom meetings, a reliable connection is needed more than before.

User avatar
Alex
Posts: 72
Joined: Wed Feb 12, 2020 11:09 am

Re: Trying to install on Linux

Post by Alex »

Nice, you got it going.

The line 8 error is interesting. I'm not sure why it would show an error rather than file not found or something like that. When I run it on Centos, I don't see the error and otm just starts. Maybe another OS interprets that a bit differently since it ends up being an empty variable. Maybe comment out that devid line.

As more people start using the forums, I'm sure people will share their scripts and tips on how they have accomplished things. We just fired these up recently and trying to ween support and other questions over to here.

>Easy with your explanation :-) Though I would not have thought of looking there. A delete button in the overview page (with the
>other actions) maybe more intuitive, though also easier to press by mistake.

Yes, we keep trying different things to get rid of extra menus and duplicate things. It just takes time and input like yours to come up with the best ways that seems to work for many.

>The dashboard is not showing any details yet. The up and down times continued from where they started last night.

This might help in terms of statuses and what you see. viewtopic.php?f=32&t=31

Depending on the connection, cable provider or wireless for example, when there are a bunch of Inactive but no outages, it usually implies that in those cases at least, those were not Internet outages but something else. For example, wireless or model signal problems, bad cable, something else that keeps preventing the agent (and probably other things on the same network) from reaching the Internet.

Keep us posted, we love hearing how people are using the service.
We especially love stories that show how Outages.io was actually used to find facts and prove the problems.
I'm Alex, here to help. Please post your question and I'll try to answer

Are the issues in your local network, with your Internet provider or beyond?
Save countless hours by letting Outages.io help you find Internet connection problems.

dadaksa
Posts: 18
Joined: Tue Apr 28, 2020 5:25 pm

Re: Trying to install on Linux

Post by dadaksa »

I just see that my below message was never sent....

The dashboard is now showing details. I just had to refresh the page.

adding a line to rc.info did not work. But I see there are many places to add startup things so I'll keep trying :-)

Sincerely,
Dada

Post Reply