Puppet: err: Could not retrieve catalog; skipping run - passenger

I install puppet 2.6.18, test it and it was working okay.
Then I install Apache and Passenger on the Puppet server.
I run on a puppet agent:
puppet agent —test
And I got the error:
"warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run"
In the puppet server access_log I have:
"GET /production/catalog/puppet.agent.domain?facts=eNqVV2… &facts_format=b64_zlib_yaml HTTP/1.1" 404 343 "-" "-"
And in the error_log I have:
File does not exist: /usr/share/puppet/rack/puppetmasterd/public/production
I check the file /usr/share/puppet/rack/puppetmasterd/public - is empty.
I just create it as part of the installation.
What I'm missing?

The problem solved.
On the puppet server:
echo 0 > /selinux/enforce
stop and start httpd.
Thanks.

Related

Clickhouse not start on red-hat 7.8 with error "DNS error: EAI: Address family for hostname not supported"

I installed clickhouse 21.2.4.6 (from tgz file) on red hat 7.8 and by executing the command
"systemctl start clickhouse-server"
the clickhouse server does not start and in the error file there are several messages:
Application: DB :: Exception : Listen [::]: 8123 failed: Little :: Exception.
Code: 1000, e.code () = 0, e.displayText () = DNS error: EAI:
Address family for hostname not supported (version 21.2.4.6 (official build)).
The <listen_host> :: 1 </listen_host> tag is commented in the config.xml file and the server ip <listen_host> ip_server </listen_host> is configured.
Can you give me some information to solve this problem?
please find and check your clickhouse-server.service file in systemd related directories and check how exactly clickhouse-server binary run, check --config parameter
usually you just need edit /etc/clickhouse-server/config.xml
and replace <listen_host>::1</listen_host> to <listen_host>127.0.0.1</listen_host>

Error installing Elasticsearch 7 - Failed dependencies

On my dedicated server I currently have Elasticsearch 6 installed. I would like to upgrade to Elasticsearch 7. I'm using the "Download and install the RPM Manually" method. Here's the link that explains the steps:
https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html
Here are my terminal steps:
[root#server ~]# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.0.0-x86_64.rpm
--2019-04-18 17:19:20-- https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.0.0-x86_64.rpm
Resolving artifacts.elastic.co (artifacts.elastic.co)... 2a04:4e42:2e::734, 151.101.198.222
Connecting to artifacts.elastic.co (artifacts.elastic.co)|2a04:4e42:2e::734|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 346827255 (331M) [application/octet-stream]
Saving to: ‘elasticsearch-7.0.0-x86_64.rpm’
100%[=============================================================================================================================================>] 346,827,255 106MB/s in 3.3s
2019-04-18 17:19:43 (102 MB/s) - ‘elasticsearch-7.0.0-x86_64.rpm’ saved [346827255/346827255]
[root#server ~]# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.0.0-x86_64.rpm.sha512
--2019-04-18 17:20:01-- https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.0.0-x86_64.rpm.sha512
Resolving artifacts.elastic.co (artifacts.elastic.co)... 2a04:4e42:2e::734, 151.101.198.222
Connecting to artifacts.elastic.co (artifacts.elastic.co)|2a04:4e42:2e::734|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 160 [application/octet-stream]
Saving to: ‘elasticsearch-7.0.0-x86_64.rpm.sha512’
100%[=============================================================================================================================================>] 160 --.-K/s in 0s
2019-04-18 17:20:01 (22.7 MB/s) - ‘elasticsearch-7.0.0-x86_64.rpm.sha512’ saved [160/160]
[root#server ~]# shasum -a 512 -c elasticsearch-7.0.0-x86_64.rpm.sha512
elasticsearch-7.0.0-x86_64.rpm: OK
[root#server ~]# sudo rpm --install elasticsearch-7.0.0-x86_64.rpm
warning: elasticsearch-7.0.0-x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY
error: Failed dependencies:
elasticsearch < 7.0.0 is obsoleted by elasticsearch-0:7.0.0-1.x86_64
Here are my server specifications:
Centos: 7.6
Java:
openjdk version "1.8.0_201"
OpenJDK Runtime Environment (build 1.8.0_201-b09)
OpenJDK 64-Bit Server VM (build 25.201-b09, mixed mode)
Did you add the RPM repository previously? I'm not sure where else the obsoleted by elasticsearch-0:7.0.0-1.x86_64 would be coming from otherwise.
If so I'd clean the cache directory, fetch all available versions, and then install the desired one:
yum clean all
yum --showduplicate list elasticsearch
yum install elasticsearch-0:7.0.0-1.x86_64

XAMPP - Apache not starting on Mac OS

https://www.apachefriends.org/download.html
Previously I'm using xampp-osx-7.1.10-0-installer.dmg.
Now as my project required PHP 7.2.X above so I took the backup of all DB & project. & try to install xampp-osx-7.2.7-0-installer.dmg
After installation it keep gives me this error
Starting all servers...
Starting MySQL Database...
/Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh : mysql started at port 3306
Starting Apache Web Server...
Exit code: 8
Stdout:
apache config test fails, aborting
Stderr:
httpd: Syntax error on line 522 of /Applications/XAMPP/xamppfiles/etc/httpd.conf: Syntax error on line 13 of /Applications/XAMPP/xamppfiles/etc/extra/httpd-xampp.conf: Cannot load modules/mod_perl.so into server: dlopen(/Applications/XAMPP/xamppfiles/modules/mod_perl.so, 10): Symbol not found: _modperl_handler_anon_add\n Referenced from: /Applications/XAMPP/xamppfiles/modules/mod_perl.so\n Expected in: dynamic lookup\n
Can I upgrade PHP version only in XAMPP?
If I'm now try to install xampp-osx-7.1.10-0-installer.dmg again then it gives on localhost below error
<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/dashboard/');
exit;
?>
Something is wrong with the XAMPP installation :-(
So I'm not able to run XAMPP at all.
I had this issue that troubled me for a whole day and this was the solution.
Remove the XAMPP/xamppfiles/lib/ folder and run the XAMPP installer again. It's probably due to old lib files from previous version not being updated properly.
https://community.apachefriends.org/viewtopic.php?t=77199&p=261450
I had this issue and commented out line 13 of /Applications/XAMPP/xamppfiles/etc/extra/httpd-xampp.conf and it's working fine after a restart - obviously, this means that you aren't loading the Pearl module but may work as an interim until you can find out what's wrong with that

Failed to list puppet environments: Failed to query Puppet find environments API (400): The environment must be purely alphanumeric, not 'v2.0'

I am getting the following error:
ERROR -- : Failed to list puppet environments: Failed to query Puppet find environments API (400): The environment must be purely alphanumeric, not 'v2.0'
The reason for the error is described in:
http://projects.theforeman.org/projects/foreman/wiki/ERF12-2749
Resolution Suggested: Ensure you have foreman-proxy 1.5.2 or higher when using Puppet 3.6+ and directory environments ("environmentpath" setting).
Topology of my environment
--- Puppet Master with Foreman on IP1
Puppet 3.7.5, foreman-1.8.2-1.el6.noarch, ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
--- Puppet Master with Foreman Proxy on IP2 which connects to IP1
Puppet 3.7.5, foreman-proxy-1.7.5-1.el6.noarch and ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
Both puppet masters are configured to have directory environment path the same way. I am able to import classes from IP1 where foreman also resides. But not from IP2 where only foreman-proxy is installed.
I am able to see IP2 registered to IP1.
Trying to import puppet classes from IP2 from foreman sitting on IP1 is throwing the above error.
Command tried from IP1 to list puppet environments of IP2: (This is to replicate the error I am getting in foreman from CLI)
curl -vs \
--key /var/lib/puppet/ssl/private_keys/ip2.dns.com.pem \
--cacert /var/lib/puppet/ssl/certs/ca.pem \
--cert /var/lib/puppet/ssl/certs/ip2-dns.com.pem \
https://ip2-dns.com:8443/puppet/environments
Error reported in ip2 proxy logs:
[root#ip2 httpd]# tail -f /var/log/foreman-proxy/proxy.log
E, [2015-09-10T14:52:10.201506 #24275] ERROR -- : Failed to list puppet environments: Failed to query Puppet find environments API (400): The environment must be purely alphanumeric, not 'v2.0'
ip1 - - [10/Sep/2015 14:52:10] "GET /environments HTTP/1.1" 406 143 1.8941
E, [2015-09-10T14:53:33.477247 #24275] ERROR -- : Failed to list puppet environments: Failed to query Puppet find environments API (400): The environment must be purely alphanumeric, not 'v2.0'
ip1 - - [10/Sep/2015 14:53:33] "GET /environments HTTP/1.1" 406 143 0.5582
E, [2015-09-10T14:56:59.390056 #24275] ERROR -- : Failed to list puppet environments: Failed to query Puppet find environments API (400): The environment must be purely alphanumeric, not 'v2.0'
ip1 - - [10/Sep/2015 14:56:59] "GET /environments HTTP/1.1" 406 143 0.5364
E, [2015-09-10T14:57:11.816250 #24275] ERROR -- : Failed to list puppet environments: Failed to query Puppet find environments API (400): The environment must be purely alphanumeric, not 'v2.0'
ip1 - - [10/Sep/2015 14:57:11] "GET /environments HTTP/1.1" 406 143 0.5434
E, [2015-09-11T09:18:12.636880 #24275] ERROR -- : Failed to list puppet environments: Failed to query Puppet find environments API (400): The environment must be purely alphanumeric, not 'v2.0'
ip1 - - [11/Sep/2015 09:18:12] "GET /environments HTTP/1.1" 406 143 0.5595
Error While Importing classes in foreman:
Warning!
ERF12-2749 [ProxyAPI::ProxyException]: Unable to get environments from Puppet ([RestClient::NotAcceptable]: 406 Not Acceptable) for proxy https://ip2:8443/puppet
If you feel this is an error with Foreman itself, please open a new issue with Foreman ticketing system, You would probably need to attach the Full trace and relevant log entries.
ProxyAPI::ProxyException
ERF12-2749 [ProxyAPI::ProxyException]: Unable to get environments from Puppet ([RestClient::NotAcceptable]: 406 Not Acceptable) for proxy https://devci2-puppet.vzbi.com:8443/puppet
lib/proxy_api/puppet.rb:11:in `rescue in environments'
lib/proxy_api/puppet.rb:9:in `environments'
app/services/puppet_class_importer.rb:131:in `actual_environments'
app/services/puppet_class_importer.rb:23:in `changes'
app/controllers/concerns/foreman/controller/environments.rb:11:in `import_environments'
app/controllers/concerns/application_shared.rb:13:in `set_timezone'
app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
http://projects.theforeman.org/issues/11780
Seems the issue is the installation had both puppet package and puppet gem. Puppet package was of version 2.7.x and puppet gem was of version 3.7.x
I will have to get this corrected.

/usr/bin/perl install-module.pl DateTime

While installing bugzilla on RHEL, it checks for required modules:
./checksetup.pl --check-modules
It showed some unavailable modules.
While trying to install one of them, I encountered following error:
[root#localhost bugzilla-4.2.3]# /usr/bin/perl install-module.pl DateTime
Checking for CPAN (v1.81) ok: found v1.94
**Checking for YAML (any) not found**
Checking for ExtUtils-MakeMaker (v6.31) ok: found v6.55_02
CPAN: Storable loaded ok (v2.20)
CPAN: LWP::UserAgent loaded ok (v5.833)
CPAN: Time::HiRes loaded ok (v1.9721)
Warning: no success downloading '/root/.cpan/source/authors/01mailrc.txt.gz.tmp19575'.
Giving up on it. at `/usr/share/perl5/CPAN/Index.pm line 225`
Fetching with LWP:
http://www.perl.org/CPAN/authors/01mailrc.txt.gz
LWP failed with code[500] message[Can't connect to www.perl.org:80 (Bad hostname 'www.perl.org')]
Trying with "/usr/bin/curl -L -f -s -S --netrc-optional" to get "http://www.perl.org/CPAN/authors/01mailrc.txt.gz" :
curl: (6) Couldn't resolve host 'www.perl.org'
Function system("/usr/bin/curl -L -f -s -S --netrc-optional "http://www.perl.org/CPAN/authors/01mailrc.txt.gz" > /root/.cpan/source/authors/01mailrc.txt.tmp19575")returned status 6 (wstat 1536)
Warning: expected file [/root/.cpan/source/authors/01mailrc.txt.gz.tmp19575] doesn't exist
Trying with "/usr/bin/wget -O /root/.cpan/source/authors/01mailrc.txt.tmp19575" to get<some URL>
--2012-09-24 17:29:33-- <some URL>
Resolving www.perl.org... failed: Name or service not known.
wget: unable to resolve host address “www.perl.org”
Function system("/usr/bin/wget -O /root/.cpan/source/authors/01mailrc.txt.tmp19575 "some URL ")
returned status 4 (wstat 1024)
Warning: expected file [/root/.cpan/source/authors/01mailrc.txt.gz.tmp19575] doesn't exist
Warning: no success downloading '/root/.cpan/source/authors/01mailrc.txt.gz.tmp19575'.
Giving up on it. at /usr/share/perl5/CPAN/Index.pm line 225
Can anyone help me out?
thanks a ton!
It looks like it cannot resolve hostnames, can you ping www.google.co.uk from that machine?
If thats the problem you can temporary edit your DNS settings, I don't now how it works in Red Hat, but here is the Ubuntu way:
sudo nano /etc/resolv.conf
Add DNS server manual:
#Google nameserver 1:
nameserver 8.8.8.8
#Google nameserver 2:
nameserver 8.8.4.4
Save the file and restart the network interface:
sudo /etc/init.d/networking restart

Resources