Report generating test failed - zabbix

I've been trying to make scheduled reports with zabbix 5.4 but i keen getting the following error when i try to test:
Cannot fetch data: chrome failed to start:
Sorry, home directories outside of /home are not currently supported.
See https://forum.snapcraft.io/t/11209 for details.
.
I don't know where my errors lay. i installed google chrome and i followed all the instruction and created /var/lib/zabbix/ also chown zabbix:zabbix /var/lib/zabbix/ chmod 755 /var/lib/zabbix
but nothing .please help me i you know my error

I forgot to create a Zabbix user with a directory, that's why I got this kind of error.
addgroup --system --quiet zabbix
adduser --quiet --system --disabled-login --ingroup zabbix --home /var/lib/zabbix --no-create-home zabbix

Related

Error in running the shutdown-script for instance of google compute engine: gsutil failed to copy file to google cloud storage

I use a shutdown-script to backup the files on an instance before it is shutdown.
In this shutdown-script, the gsutil tool is used to send files to a bucket at google cloud storage.
/snap/bin/gsutil -m rsync -d -r /home/ganjin/notebook gs://ganjin-computing/XXXXXXXXXXX/TEST-202104/notebook
It worked well for long days. But recently, there occurs some error as below.
If I run the code manually, it works well. It seems that there is something wrong with jobs management of systemd.
Could anyone give me some hint?
INFO shutdown-script: /snap/bin/gsutil -m rsync -d -r /home/ganjin/notebook gs://ganjin-computing/XXXXXXXXXXX/TEST-202104/notebook
Apr 25 03:00:41 instance-XXXXXXXXXXX systemd[1]: Requested transaction contradicts existing jobs: Transaction for snap.google-cloud-sdk.gsutil.d027e14e-3905-4c96-9e42-c1f5ee9c6b1d.scope/start is destructive (poweroff.target has 'start' job queued, but 'stop' is included in transaction).
Apr 25 03:00:41 instance-XXXXXXXXXXX shutdown-script: INFO shutdown-script: internal error, please report: running "google-cloud-sdk.gsutil" failed: cannot create transient scope: DBus error "org.freedesktop.systemd1.TransactionIsDestructive": [Transaction for snap.google-cloud-sdk.gsutil.d027e14e-3905-4c96-9e42-c1f5ee9c6b1d.scope/start is destructive (poweroff.target has 'start' job queued, but 'stop' is included in transaction).]
Update gsutil with -f option.
update gsutil -f
If the above command doesn’t work then try the command below:
sudo apt-get update && sudo apt-get --only-upgrade install google-cloud-sdk
Update guest environment and try to shutdown the instance. Use the link below as a reference to update the guest environment.
https://cloud.google.com/compute/docs/images/install-guest-environment#update-guest
If still facing issues do forceful shutdown:
sudo poweroff -f

Chown: filebeat.yml: operation not permitted

I started learning how to code two months ago, so everything is very new to me. Currently I'm trying to learn how to use logstash from the elastic website (learning how to move from mysql to elasticsearch using logstash). I've got some problems and I don't know how to solve this issue:
I tried to follow the instructions from the link:
https://www.elastic.co/guide/en/logstash/current/advanced-pipeline.html
and
https://www.elastic.co/guide/en/beats/libbeat/6.4/config-file-permissions.html
After I tried:
sudo ./filebeat -e -c filebeat.yml -d "publish"
I've got an error message saying:
"config file ("filebeat.yml") must be owned by the beat user (uid=0) or root"
So I tried
"chown 0 filebeat.yml" and "chown root filebeat.yml"
But it says : "chown: filebeat.yml: Operation not permitted"
How can I solve this problem?
I've also tried to use
"--strict.perms=false"
but it says "-bash: --strict.perms=false: command not found"
Can anyone please help me with this?
Try sudo -i enter your password root and run as it again
sudo ./filebeat -e --strict.perms=false
This starts filebeat with the flag "--strict.perms=false" set at start.

Composer Self-Update Error Exception "Permission Denied" when calling rename()

So, whenever i run composer self-update or composer selfupdate I get the following error:
[ErrorException]
rename(/Users/jrobinson/.composer/cache/composer-temp.phar,/usr/local/bin/composer): Permission denied
I'm not too sure what's going on. I THINK i may had screwed up my .bash_profile file up. I wasn't having this issue prior to installing MySQL on my machine, and updating the first line in my .bash_profile.
I have looked at other articles, and I have tried reinstalling using the getcomposer.org commands on their download page. None of these solutions have fixed my problem. So please don't mark this as a repeat question as none of the solutions on SO have helped me solve this issue.
Here is my .bash_profile file contents.
export PATH="~/.composer/vendor/bin:$PATH:/usr/local/mysql/bin"
export EDITOR='sub -w'
Here is the ls -la command run in the /usr/local/bin folder.
Goal
Be able to run the composer self-update command and the mysql command from my terminal at the end of all this.
It looks like Composer is installed in /usr/local/bin, so you probably did that as root. To update it, you also need to be a root - try with sudo:
sudo -H composer self-update

Permission denied errors when creating app with custom OpenShift cartridge

I'm using OpenShift Origin and developing a cartridge for the first time. When my bin/install and bin/control scripts are running I've noticed "Permission denied" errors when they try to access anything in the cartridge usr dir. In the node platform.log I see the offending command that OpenShift runs looks like this (where my bin/control start tries to run a script in usr):
/sbin/runuser -s /bin/sh 5351e627ee5a934f290001d2 -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c0,c1004' /bin/sh -c \"set -e; /var/lib/openshift/5351e627ee5a934f290001d2/mycart/bin/control start \""
Since the usr dir is a symlink I originally thought it was related to that, but now I think it's related to selinux (which I don't know much about). If I do a "ls -Z" on my app's cartridge dir the files are "system_u:object_r:openshift_var_lib_t:s0:c0,c1004" but the contents of the usr dir are "unconfined_u:object_r:default_t:s0", so it doesn't match what's in the above command.
I used the oo-admin-cartridge command to install the cartridge to my Origin VM.
Any ideas on how to fix this?
What I ended up doing was running "chcon -R -u system_u -t bin_t usr/" before installing the cartridge with oo-admin-cartridge. Built-in cartridges are not affected by this problem (checked nodejs), so I feel like it might be a oo-admin-cartridge bug. I would expect it to massage the selinux permissions instead of using whatever I provide.

fresh installed mysql and mysql-server but failed to start server

I am new to Linux and tried to install mysql in my local box
I googled a lot and follow the instruction but none of them works
some people recommand this" but it did not work for me and system give me warning about this is not a official version.
Basically what I did was:
yum install mysql mysql-version
succeed without error, version is 5.5.28
systemctl start mysqld.service
here it threw out error:
Job failed. See system logs and 'systemctl status' for details.
I am using Fedora 16 (3.1.0-7.fc16.i686)
Thank you in advance
Could you try running
yum groupinstall "MySQL Database"
then run
service mysqld start
and see the outcome. Assuming you are running as root or with root permissions.
Got the EXACT same problem. It seems there is an issue regarding the permissions of the /var/lib/mysql directory.
This nailed it for me:
chown -R mysql.mysql /var/lib/mysql
Source: http://www.vivaolinux.com.br/dica/Como-solucionar-ERROR-2002-Cant-connect-to-local-MySQL-server