Cannot access cdn.redhat.com from my Linux VM. please find the attached screenshot and provide me the solution - linux

[root#localhost ~]# yum install ksh
Updating Subscription Management repositories.
Last metadata expiration check: 22:24:52 ago on Tue 25 May 2021 01:12:00 AM EDT.
Dependencies resolved.
Package Architecture Version Repository Size
Installing:
ksh x86_64 20120801-254.el8 rhel-8-for-x86_64-appstream-rpms 926 k
Transaction Summary
Install 1 Package
Total download size: 926 k
Installed size: 3.2 M
Is this ok [y/N]: y
Downloading Packages:
[MIRROR] ksh-20120801-254.el8.x86_64.rpm: Curl error (7): Couldn't connect to server for https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/k/ksh-20120801-254.el8.x86_64.rpm [Failed to connect to cdn.redhat.com port 443: No route to host]
[MIRROR] ksh-20120801-254.el8.x86_64.rpm: Curl error (7): Couldn't connect to server for https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/k/ksh-20120801-254.el8.x86_64.rpm [Failed to connect to cdn.redhat.com port 443: No route to host]
[MIRROR] ksh-20120801-254.el8.x86_64.rpm: Curl error (7): Couldn't connect to server for https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/k/ksh-20120801-254.el8.x86_64.rpm [Failed to connect to cdn.redhat.com port 443: No route to host]
[MIRROR] ksh-20120801-254.el8.x86_64.rpm: Curl error (7): Couldn't connect to server for https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/k/ksh-20120801-254.el8.x86_64.rpm [Failed to connect to cdn.redhat.com port 443: No route to host]
[FAILED] ksh-20120801-254.el8.x86_64.rpm: No more mirrors to try - All mirrors were already tried without success
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: Error downloading packages:
Cannot download Packages/k/ksh-20120801-254.el8.x86_64.rpm: All mirrors were tried

Related

Unable to update jenkins using yum in rhel8

I have installed the jenkins as per their documentation. And then when i try to update jenkins its giving these wierd errors. The ports 443 and 80 are open. Can any assist on this issues.
Logs:
[root#server ~]# cat /etc/yum.repos.d/jenkins.repo
[jenkins]
name=Jenkins-stable
baseurl=http://pkg.jenkins.io/redhat-stable
gpgcheck=1
[root#server ~]# cat /etc/yum.conf
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
skip_if_unavailable=False
ip_resolve=4
[root#mcdefrapl008 ~]#
[root#server ~]# yum update
Jenkins-stable 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository 'jenkins':
- Curl error (56): Failure when receiving data from the peer for http://pkg.jenkins.io/redhat-stable/repodata/repomd.xml [Recv fa
ilure: Connection reset by peer]
Error: Failed to download metadata for repo 'jenkins': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors
were tried
[root#server ~]# curl http://pkg.jenkins.io/redhat-stable/repodata/repomd.xml -v
* Trying 151.101.2.133...
* TCP_NODELAY set
* Connected to pkg.jenkins.io (151.101.2.133) port 80 (#0)
> GET /redhat-stable/repodata/repomd.xml HTTP/1.1
> Host: pkg.jenkins.io
> User-Agent: curl/7.61.1
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
[root#mcdefrapl008 ~]#
Just to mention, when i open the url in the browser it is redirecting to https.
yum do not redirect to https automatically. So set in your repo https and try again.
[jenkins]
name=Jenkins-stable
baseurl=https://pkg.jenkins.io/redhat-stable
gpgcheck=1

How to install MongoDB Enterprise 4.4 on remote redhat server?

I followed the instructions listed here, https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-red-hat/, and tried to install on a remote server from my local machine. I ssh from my local machine into the server and performed the steps for installation.
I'm not sure if there are additional steps that need to be completed or whether you have to set Directory Paths that are not the default ones since you are using a server instead of local machine. My current error is when I run mongo from my terminal and I get this error
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect#src/mongo/shell/mongo.js:374:17
#(connect):2:6
exception: connect failed
exiting with code 1
[h699972#csc2cxp00020938 ~]$ mongo --host
sudo vim /etc/mongod.conf and setting bindIp: 0.0.0.0 did not work. Any help would be appreciated.

Connecting to cqlsh from remote fails, where as from localhost it connects?

Installed DSE on CentOS7 and saw no errors, I'm able to connect to cqlsh from the local machine and and I'm able to also do a telnet on the port.
However the problem is that when the same is done from a remote machine I get the below error
cqlsh XX.XXX.XX.XX 3389
Connection error: ('Unable to connect to any servers', {'10.223.61.49': ConnectionShutdown('Connection to 10.223.61.49 was closed',)})
To check the connectivity I did a telnet on this and see the below error
telnet XX.XXX.XX.XX 3389
Invalid or unsupported protocol version (13); supported versions are (3/v3, 4/v4, 5/v5-beta, 65/dse-v1)
I tried updating the Python version, also few tweaks to change the py script also didn't help

OpenVPN client is not working on Windows computer?

I try to run my OpenVPN client on my windows 10 machine in order to connect to a remote OpenVPN CentOS 7 server but it does not work. I get the error below:
Options error: --capath fails with 'C:\Users\Desktop\OpenVPN\ca.crt': No such process (errno=3)
Options error: --cert fails with 'C:\Users\Desktop\OpenVPN\Win10client.crt': No such process (errno=3)
Fri Mar 22 22:56:20 2019 WARNING: cannot stat file 'C:\Users\Desktop\OpenVPN\Win10client.key': No such process (errno=3)
Options error: --key fails with 'C:\Users\Desktop\OpenVPN\Win10client.key'
Fri Mar 22 22:56:20 2019 WARNING: cannot stat file 'C:\Users\Desktop\OpenVPN\myvpn.tlsauth': No such process (errno=3)
Options error: --tls-crypt fails with 'C:\Users\Desktop\OpenVPN\myvpn.tlsauth': No such process (errno=3)
This is the config that I have on my ovpn file:
client
tls-client
--capath C:\\Users\\Desktop\\OpenVPN\\ca.crt
--cert C:\\Users\\Desktop\\OpenVPN\\Win10client.crt
--key C:\\Users\\Desktop\\OpenVPN\\Win10client.key
--tls-crypt C:\\Users\\Desktop\\OpenVPN\\myvpn.tlsauth
remote-cert-eku "TLS Web Client Authentication"
proto udp
remote serveraddress 1194 udp
dev tun
topology subnet
pull
Assuming your config file is well done. Try to reinstall openvpn, and put your config file to the c:/program files/openvpn/config folder. Then you can start the openvpn Service. Therefore you dont need to use the Openvpn gui.

install TOR on a centOS 7 server

I have tried downloading TOR by following this article but I am getting 503 errors. So is there no other way to download TOR? Please can someone help me as I have to do a research project on it.
I am using a centOS server: CentOS Linux release 7.3.1611 (Core)
but am getting the follwing errors,
[sam#xx etc]$ sudo yum install tor
[sudo] password for sam:
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00
extras | 3.4 kB 00:00
http://deb.torproject.org/torproject.org/rpm/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable
Trying other mirror.
http://deb.torproject.org/torproject.org/rpm/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable
Trying other mirror.
http://deb.torproject.org/torproject.org/rpm/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable
Trying other mirror.
http://deb.torproject.org/torproject.org/rpm/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable
Trying other mirror.
http://deb.torproject.org/torproject.org/rpm/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable
Trying other mirror.
http://deb.torproject.org/torproject.org/rpm/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable
Trying other mirror.
http://deb.torproject.org/torproject.org/rpm/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable
Trying other mirror.
http://deb.torproject.org/torproject.org/rpm/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable
Trying other mirror.
http://deb.torproject.org/torproject.org/rpm/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable
Trying other mirror.
http://deb.torproject.org/torproject.org/rpm/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable
Trying other mirror.
Tor no longer recommends using their repo for CentoOS and to instead use epel repos. You'll just end up with a very old version out of their repos.
Instead do:
yum install epel-release
yum install tor
This will get you a current version of Tor managed by a repo. This is perfectly fine.
For CentOS, I have been self-compiling for a while. I have a hacky shell script I'm not yet willing to post here ;) but really it's just compiling Tor and OpenSSL. I'd still recommend using the epel-release since its more tested.
To try building Tor statically linked to OpenSSL yourself, grab a recent copy of OpenSSL (e.g. 1.1.1x), then grab the version of Tor you want to build (e.g. 0.4.1.6).
First you will need to install some prerequisites:
yum install -y \
gcc gcc-c++ \
zlib-devel \
perl-Module-Load-Conditional perl-Test-Harness \
libevent-devel \
libzstd-devel xz-devel \
libscrypt-devel libseccomp-devel
From OpenSSL source dir:
./config --prefix=/opt/openssl --openssldir=/opt/openssl \
-fPIC zlib-dynamic no-shared enable-ec_nistp_64_gcc_128
make
make test
make install
OpenSSL 1.1.1 note: Remove the no-shared option when building OpenSSL, otherwise Tor configuration will fail with an error that it can't find a linkable OpenSSL even though it is being built statically. Tor will still link a static OpenSSL but it seems to require the shared libraries to work. This appears to be fixed in 1.1.1c and later.
This installs OpenSSL to /opt/openssl so it doesn't interfere or replace the system's OpenSSL.
Then, build Tor:
./configure --prefix=/opt/tor-VERSION --sysconfdir=/etc --localstatedir=/var \
--enable-static-openssl --with-openssl-dir=/opt/openssl \
--with-tor-user=tor --with-tor-group=tor \
--enable-lzma --enable-zstd
make
make test
make install
unlink /usr/bin/tor && ln -s /opt/tor-VERSION/bin/tor /usr/bin/tor
The systemd service file I use is:
[Unit]
Description=Anonymizing overlay network for TCP
After=syslog.target network.target nss-lookup.target
[Service]
Type=forking
PidFile=/var/run/tor/tor.pid
NotifyAccess=all
ExecStartPre=/usr/bin/tor -f /etc/tor/torrc --verify-config
ExecStart=/usr/bin/tor -f /etc/tor/torrc --RunAsDaemon 1
ExecReload=/bin/kill -HUP ${MAINPID}
KillSignal=SIGINT
TimeoutStartSec=120
TimeoutStopSec=60
Restart=on-failure
LimitNOFILE=65536
# Hardening
PrivateTmp=yes
PrivateDevices=yes
ProtectHome=yes
ProtectSystem=full
ReadOnlyDirectories=/
ReadWriteDirectories=-/var/lib/tor
ReadWriteDirectories=-/var/log/tor
NoNewPrivileges=yes
CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE CAP_DAC_OVERRIDE CAP_CHOWN CAP_FOWNER
[Install]
WantedBy=multi-user.target

Resources