Abruptedly when I execute any command on my Centros 7 shell I receive errors hampering their executions. Errors are of the kind:
$ ls
-bash: /usr/bin/ls: Input/output error
$ df
-bash: df: command not found
$ top
-bash: /usr/bin/top: Input/output error
I tried rebotting the machine to no avail and no service like fsftp or http work. Please help me as soon as possible as that is the main server of my backoffice.
It was an issue on the provider, Crissic, one notified and acknowledged the issue it took a day to fix it.
Related
So i'm following the github article to test my SSH connection by copy pasting the command found in this article in my terminal but it gives me this message:
zsh: command not found: $
Also im on MacOS if that helps
article:
https://docs.github.com/en/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection
You should not include the $ in your copy-paste.
The $ is commonly used to indicate that the following code will be a terminal command. But $ is not part of the command itself.
I am trying to listen to log file changes and trigger emails in case certain errors happen, currently testing this on mac.
i have executed
brew install logcheck
this worked, i am also able to test by executing
logcheck-test -l backend/test.log -r /usr/local/etc/logcheck/violations.d/ticket
but when i try to execute the logcheck command itself, i get error as command not found
Any ideas, thanks.
I have a python script that reads last line of a text file (present in location /home/anas/projects) and prints it. Text file contains a single float value on each line. When i run this python script from terminal, it works fine.
The problem i am having is that i want to use this script with snmp. So i have used snmp extend and added
extend snmp-datarate /usr/bin/python2.7 /usr/local/bin/snmp-feedback.py
in /etc/snmp/snmpd.conf file. and when i run this command
snmpwalk -v2c -c public 127.0.0.1 NET-SNMP-EXTEND-MIB::nsExtendObjects
it gives me following error,
NET-SNMP-EXTEND-MIB::nsExtendOutLine."snmp-datarate".4 = STRING: OSError: [Errno 13] Permission denied: '/home/anas/projects'
Now i thought that it could eb due to use of python so i also tried shell script, named it snmp-agra-datarate.sh, which only have two lines of code
#!/bin/bash
echo $( tail -n 1 /home/anas/projects/6780-log.txt )
Running this script from terminal produces the expected output. I then extended snmp with
extend datarate /usr/local/bin/snmp-agra-datarate.sh
then when i try to run snmp walk again. i get similar error
NET-SNMP-EXTEND-MIB::nsExtendOutLine."datarate".2 = STRING: tail: cannot open '/home/anas/projects/6780-log.txt' for reading: Permission denied
Is there something i am missing in order to read external text file with python or shell for extended snmp agent?
-i am using ubuntu 16.04 LTS and net-snmp v5.8
-Both python and shell scripts have execute permissions. (i did chmod 755)
-text file also have all permissions
The error message
Permission denied: '/home/anas/projects'
is pointing to the permissions of that directory. If too restrictive,
then the snmpd cannot go in there.
To solve the problem, do a
ls -ld /home/anas/projects
and that will give you a clue.
I'm trying to install Netdata in my aws beanstalk instances. I created a config file in my .ebextensions folder
container_commands:
00install:
command: "bash <(curl -Ss https://my-netdata.io/kickstart.sh) --dont-wait"
ignoreErrors: true
When the command gets ran on deploy beanstalk logs this error.
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `bash <(curl -Ss https://my-netdata.io/kickstart.sh) --dont-wait'
I had no idea what <() meant so I looked it up and saw it was process substitution. From what I understood process substitution can be rewriting using plain pipes.
For example
more <( ls /usr/bin )
Could be
ls /usr/bin | more
In my command I'm also passing in flags so I was having issues gettin the piped version of the command working.
NOTE: The root problem is beanstalk telling me its confused about the parenthesis. My solution was just transforming the command to use regular pipes. However, if anyone knows just how I write this command on the beanstalk config to get it working that would be awesome.
-bash: /var/lib/rancid/.bash_profile: Permission denied bash command not found
I am trying to switch between the users ( krypton & rancid) in ubuntu 16.04 with
su - . A few days back it worked perfectly, but don't know what happened now. The above warning message is coming.
When I am working as krypton user ~$ is showing
But when I am trying to switch to rancid using su - rancid, the above error is coming and entering into the user with /$ at the beginning. I am not able to run some commands and it's interrupting me.
Please give me a solution. I am wasting all my time with this.
First, check the permission of your /var/lib/rancid/.bash_profile file, and all parent folder. You can ls -ld them each, and put output here.
Then, you may check what there is in your ~/.bashrc file.