Zabbix Agent 6.0 - server

I have a problem with Zabbix 6.0 LTS! Where i install zabbix agent 6.0 in this server! I have a error invalid argument:
In Zabbix Server 6.0 LTS its okay,but in zabbix agent 6.0 server i have a this error:
check 'vfs.file.contents["/sys/class/net/eth0/speed"]' is not supported: Cannot read from file: read /sys/class/net/eth0/speed: invalid argument
I dont have any idea also i try cat more commands for /sys/class/net/eth0/speed in file speed the error also invalid argument
P.S: File Exist! -r--r--r-- 1 root root 4.0K Feb 1 16:25 /sys/class/net/eth0/speed

Related

postgresql archive permission denied

We have installed postgres v12 on ubuntu 20.04 (with apt install -y postgresql postgresql-contrib) and wish to enable archiving to /data/db/postgres/archive by setting the following in postgresql.conf:
max_wal_senders=2
wal_keep_segments=256
wal_sender_timeout=60s
archive_mode=on
archive_command=cp %p /data/db/postgres/archive/%f
However the postgres service fails to write there:
2022-11-15 15:02:26.212 CET [392860] FATAL: archive command failed with exit code 126
2022-11-15 15:02:26.212 CET [392860] DETAIL: The failed archive command was: archive_command=cp pg_wal/000000010000000000000002 /data/db/postgres/archive/000000010000000000000002
2022-11-15 15:02:26.213 CET [392605] LOG: archiver process (PID 392860) exited with exit code 1
sh: 1: pg_wal/000000010000000000000002: Permission denied
This directory /data/db/postgres/archive/ is owned by the postgres user and when we su postgres we are able to create and delete files without a problem.
Why can the postgresql service (running as postgres) not write to a directory it owns?
Here are the permissions on all the parents of the archive directory:
drwxr-xr-x 2 postgres root 6 Nov 15 14:59 /data/db/postgres/archive
drwxr-xr-x 3 root root 21 Nov 15 14:29 /data/db/postgres
drwxr-xr-x 3 root root 22 Nov 15 14:29 /data/db
drwxr-xr-x 5 root root 44 Nov 15 14:29 /data
2022-11-15 15:02:26.212 CET [392860] DETAIL: The failed archive command was: archive_command=cp pg_wal/000000010000000000000002 /data/db/postgres/archive/000000010000000000000002
So, your archive_command is apparently set to the peculiar string archive_command=cp %p /data/db/postgres/archive/%f.
After the %variables are substituted, the result is passed to the shell. The shell does what it was told, which is to set the (unused) environment variable 'archive_command' to be 'cp', and then tries to execute the file pg_wal/000000010000000000000002, which is not allowed to because it doesn't have the execute bit set.
I don't know how you managed to get such a deformed archive_command, but it didn't come from anything you showed us.

While running Pact- Karma-Mocha framework, getting error - 'Can't find variable: Pact'

I am trying to get sample PACT JS framework (any variant) running for Contract testing. Initial plan is just to get the sample(s) provided get running & then later on make changes into End point and customise for our own purpose.
PACT Foundation link: https://github.com/pact-foundation/pact-js/tree/master/karma/mocha
Environment:
Win 7
Node: v8.11.4
dependencies installed:
"#pact-foundation/karma-pact": {
"version": "2.1.8",
"#pact-foundation/pact-node": {
"version": "6.19.11",
I am getting following error while trying to get it running.
Command: karma start karma.conf.js
C:\VarProjects\VanillaMocha>karma start test/karma.conf.js
10 09 2018 09:53:34.544:ERROR [config]: File C:\VarProjects\VanillaMocha\test\karma.conf.js does not exist!
C:\VarProjects\VanillaMocha>karma start karma.conf.js
[2018-09-10T08:53:42.384Z] INFO: pact-node#6.19.11/16892 on W5167037:
Creating Pact Server with options:
port = 1234,
consumer = KarmaMochaConsumer,
provider = KarmaMochaProvider,
logLevel = DEBUG,
log = C:\VarProjects\VanillaMocha\logs\pact.log,
dir = C:\VarProjects\VanillaMocha\pacts,
pactFileWriteMode = overwrite,
ssl = false,
cors = false,
host = localhost
[2018-09-10T08:53:42.401Z] INFO: pact-node#6.19.11/16892 on W5167037: Created 'standalone\win32-1.54.4\bin\pact-mock-service.bat service --port '1234' --consumer 'KarmaMochaConsumer
' --provider 'KarmaMochaProvider' --log-level 'DEBUG' --log 'C:\VarProjects\VanillaMocha\logs\pact.log' --pact_dir 'C:\VarProjects\VanillaMocha\pacts' --pact-file-write-mode 'overwri
te' --host 'localhost'' process with PID: 18912
10 09 2018 09:53:44.980:INFO [pact]: Pact Mock Server running on port: 1234
10 09 2018 09:53:45.054:WARN [watcher]: Pattern "C:/dist-web/pact-web.js" does not match any file.
10 09 2018 09:53:45.092:INFO [karma]: Karma v3.0.0 server started at http://0.0.0.0:9876/
10 09 2018 09:53:45.093:INFO [launcher]: Launching browser PhantomJS_without_security with unlimited concurrency
10 09 2018 09:53:45.101:INFO [launcher]: Starting browser PhantomJS
10 09 2018 09:53:46.811:INFO [PhantomJS 2.1.1 (Windows 7 0.0.0)]: Connected on socket qMhVUJZzdDCD_YuKAAAA with id 47921548
PhantomJS 2.1.1 (Windows 7 0.0.0) Client "before all" hook FAILED
Can't find variable: Pact
client-spec.js:10:32
PhantomJS 2.1.1 (Windows 7 0.0.0) Client "after all" hook FAILED
undefined is not an object (evaluating 'provider.finalize')
client-spec.js:21:28
PhantomJS 2.1.1 (Windows 7 0.0.0): Executed 2 of 4 (2 FAILED) ERROR (0.013 secs / 0.001 secs)
[2018-09-10T08:53:46.985Z] INFO: pact-node#6.19.11/16892 on W5167037: Removing all Pact servers.
[2018-09-10T08:53:46.986Z] INFO: pact-node#6.19.11/16892 on W5167037: Removing Pact with PID: 18912
C:\VarProjects\VanillaMocha>KARMA start
[2018-09-10T08:54:14.809Z] INFO: pact-node#6.19.11/7492 on W5167037:
Creating Pact Server with options:
port = 1234,
consumer = KarmaMochaConsumer,
provider = KarmaMochaProvider,
logLevel = DEBUG,
log = C:\VarProjects\VanillaMocha\logs\pact.log,
dir = C:\VarProjects\VanillaMocha\pacts,
pactFileWriteMode = overwrite,
ssl = false,
cors = false,
host = localhost
[2018-09-10T08:54:14.823Z] INFO: pact-node#6.19.11/7492 on W5167037: Created 'standalone\win32-1.54.4\bin\pact-mock-service.bat service --port '1234' --consumer 'KarmaMochaConsumer'
--provider 'KarmaMochaProvider' --log-level 'DEBUG' --log 'C:\VarProjects\VanillaMocha\logs\pact.log' --pact_dir 'C:\VarProjects\VanillaMocha\pacts' --pact-file-write-mode 'overwrit
e' --host 'localhost'' process with PID: 2920
10 09 2018 09:54:17.376:INFO [pact]: Pact Mock Server running on port: 1234
10 09 2018 09:54:17.447:WARN [watcher]: Pattern "C:/dist-web/pact-web.js" does not match any file.
10 09 2018 09:54:17.483:INFO [karma]: Karma v3.0.0 server started at http://0.0.0.0:9876/
10 09 2018 09:54:17.484:INFO [launcher]: Launching browser PhantomJS_without_security with unlimited concurrency
10 09 2018 09:54:17.489:INFO [launcher]: Starting browser PhantomJS
10 09 2018 09:54:19.243:INFO [PhantomJS 2.1.1 (Windows 7 0.0.0)]: Connected on socket rn-kwBRGhJbyUwvZAAAA with id 54614606
PhantomJS 2.1.1 (Windows 7 0.0.0) Client "before all" hook FAILED
Can't find variable: Pact
client-spec.js:10:32
PhantomJS 2.1.1 (Windows 7 0.0.0) Client "after all" hook FAILED
undefined is not an object (evaluating 'provider.finalize')
client-spec.js:21:28
PhantomJS 2.1.1 (Windows 7 0.0.0): Executed 2 of 4 (2 FAILED) ERROR (0.012 secs / 0 secs)
Kindly advise, Thanks a lot
The code is failing because it's missing pact-web. You can see this in the error message you included:
Pattern "C:/dist-web/pact-web.js" does not match any file.
This is happening because you're using the example karma.conf.js outside the example repository without modification.
Quoting the relevant part of karma.conf.js:
// if you are using this example to setup your own project
// load pact from the node_modules directory
'../../dist-web/pact-web.js',
// Example Using NPM package
// 'node_modules/#pact-foundation/pact-web/pact-web.js',
Looking at your directory structure, commenting this line:
'../../dist-web/pact-web.js',
and uncommenting this line:
// 'node_modules/#pact-foundation/pact-web/pact-web.js',
should solve your problem.
Note that you also need to ensure that #pact-foundation/pact-web is a dev-dependency:
npm install --save-dev '#pact-foundation/pact-web'

Apache not working on MAMP 3.5 after macOS Sierra upgrade

This is the error it's loggin:
[Sun Sep 25 15:04:12 2016] [alert] (EAI 8)nodename nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "Jonathans-MacBook-Pro.local"
Configuration Failed
You will need to add this to your /etc/hosts file:
127.0.0.1 Jonathans-MacBook-Pro.local
Just stop macOS Apache
sudo apachectl stop

Fatal error frontend otrs 4 while loading index.pl

I already installed OTRS 4.0.5 in rhel6 after restart apache, mysql and otrs, while loading http://localhost/otrs/index.pl
The page is not loading and it gives:
Fatal error- Frontend -OTRS 4
The index page is not opening and I need some help figuring out why.
My error log is
[Tue Apr 28 15:23:56 2015] -e: DBI connect('database=otrs;host=127.0.0.1','otrs',...) failed: Can't connect to MySQL server on '127.0.0.1' (13) at /opt/otrs//Kernel/System/DB.pm line 184
ERROR: OTRS-CGI-72 Perl: 5.10.1 OS: linux Time: Tue Apr 28 15:23:56 2015
Message: Can't connect to MySQL server on '127.0.0.1' (13)
Can't write '/opt/otrs/var/tmp/CacheFileStorable/TemplateProvider/4/f/4fd2983f3605888b9d72424fb64ba2a1': Permission denied
Can't write '/opt/otrs/var/tmp/CacheFileStorable/TemplateProvider/3/9/39285138ef78930f9c3f9d967fbdd6bb': Permission denied
Can't write '/opt/otrs/var/tmp/CacheFileStorable/TemplateProvider/e/7/e73a715153f074752e829500e76f765b': Permission denied
mkdir /opt/otrs/var/tmp/CacheFileStorable/TemplateProvider/3/d: Permission denied at /opt/otrs//Kernel/System/Cache/FileStorable.pm line 88
Can't write '/opt/otrs/var/tmp/CacheFileStorable/TemplateProvider/e/6/e6f4f8c1130924d59deb478d08f08e5e': Permission denied
Thanks in advance!
You should disable SELinux or add the policy.
To disable SELinux edit /etc/selinux/config and replace and set SELINUX=disabled
Example policy for OTRS is described here:
http://forums.otterhub.org/viewtopic.php?t=20669#p86818
This is SELinux restricting access to the filesystem. You'll need to set an exception or disable SELinux entirely.

Upgraded MongoDB and now shell dies with 'Illegal instruction'

I was running MongoDB v2.0.4.
I installed v2.2.2 and restarted.
The mongod process is running fine. Client applications are connecting and functioning fine.
But the mongo shell bombs out.
$: ~ mongo localhost/da
MongoDB shell version: 2.2.2
connecting to: localhost/da
Illegal instruction
$: ~
My "install" process was to download & unpack the .tgz and simlink all the binaries in bin to /usr/local/bin.
Here's what I see in the log on start.
Thu Jan 3 16:14:54 Mongo DB : starting : pid = 7225 port = 27017 dbpath = /var/lib/mongodb/ master = 0 slave = 0 32-bit
** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
** see http://blog.mongodb.org/post/137788967/32-bit-limitations for more
Thu Jan 3 16:14:54 db version v1.2.2, pdfile version 4.5
Thu Jan 3 16:14:54 git version: nogitversion
Thu Jan 3 16:14:54 sys info: Linux vernadsky 2.6.24-27-server #1 SMP Fri Mar 12 01:45:06 UTC 2010 i686 BOOST_LIB_VERSION=1_40
Thu Jan 3 16:14:54 waiting for connections on port 27017
This is running on a 32bit machine w/ 4GB memory and dual core PIII 1.4GHz processor.
Thinking this could be the 'floating point exception' mentioned on the MongoDB downloads page I tried the legacy-static build. The result is the same.
UPDATE
I think the limitations of running on an older 32 bit system make running v2.2.2 too unstable. The 2GB limit is easily exceeded (as evidenced by 'Got signal: 4' errors) when doing a repair operation or checking journal files on start up.
I've decided to revert to v1.2.2 using the Ubuntu package manager.
References:
https://jira.mongodb.org/browse/SERVER-5639
https://groups.google.com/d/topic/mongodb-user/gaAlONRvVSU/discussion
I had the same problem on Debian Squeeze 6.0.10 , an old 32-bit/i386 machine and with the 10gen distribution of the official mongodb instructions. On the instalation some problems with --configure of mongo-org-server and dependencies Trying to execute mongod "Illegal instruction" and
I had to purge the packages and install the 1.4.4 version through a simple apt-get install mongodb.