Unable to update jenkins using yum in rhel8 - linux

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

Related

curl (56) Recv failure: Connection reset by peer with a simple docker run

Yesterday this image was working fine.
But from today i have always the same error.
Here the command :
sudo docker run --name matter -d --publish 8065:8065 --add-host dockerhost:127.0.0.1 mattermost/mattermost-preview
When i curl :
curl: (56) Recv failure: Connexion ré-initialisée par le correspondant
English : curl (56) Recv failure: Connection reset by peer with a
simple docker run
Sometimes when i wait i can access to my localhost.
When i i do this :
sudo netstat -tulpn | grep LISTEN
I have this :
tcp6 0 0 :::8065 :::*
LISTEN 25772/docker-proxy
I don't understand this error :/
I am on Linux Ubuntu 18
The server takes a while to get ready to accept requests.
If you do
sudo docker logs matter
you can see the output of the server. Wait until you see a message like this
{"level":"info","ts":1624436113.1993275,"caller":"app/server.go:1226","msg":"Server
is listening on [::]:8065","address":"[::]:8065"}
before you start making requests.

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

[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

CURL (35) SSL connect error / NSS error -5961

OS: CentOS release 6.9 (Final)
CURL: curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Hello,
I have a host which I am trying to run a curl command from, for testing only
curl https://api.twitter.com/ -v
Returns the below
* About to connect() to api.twitter.com port 443 (#0)
* Trying 104.244.42.2... connected
* Connected to api.twitter.com (104.244.42.2) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* NSS error -5961
* Closing connection #0
* SSL connect error
curl: (35) SSL connect error
After some lengthy reading I have come to the conclusion this is possibly a SLL issue due to either my OS version or CURL version, or both!
First question would be is that right? Are there indeed known issues with this configuration?
Second, can I build from source a working combination? I am unable to update my OS due to legacy dependencies
Try with specific ssl/tls or cipher suits for example: curl --tlsv1.2 https://api.twitter.com/
Since you say this is for testing only, you could try -k to connect insecurely:
curl -k https://api.twitter.com/
Or, if you think it’s an outdated SSL cert bundle you could download a newer certificate and trust store from the internet and try that by using the --cert and --cacert options
Rebuild a fresh server running centos 7
Worked straight away no issues!

aerospike service start error /usr/bin/asd: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by /usr/bin/asd)

I am getting error when i am executing following command in ec2 machine
sudo /etc/init.d/aerospike start
I need aerospike engine in my ec2 machine for test purpose.
I used
wget -O aerospike.tgz 'http://aerospike.com/download/server/latest/artifact/ubuntu12 to get the file and installed it as the doc says.
I just happened to see this question. Have you resolved it? Did you get the proper version of GLibC installed?
If not, it looks like you are using the 3.5.3 community version, correct?
I tested in AWS on Ubuntu 14.4 M3 large, and it installed and started fine:
ubuntu#ip-172-31-23-5:~$ wget -O aerospike.tgz 'http://aerospike.com/download/server/latest/artifact/ubuntu12
> ^C
ubuntu#ip-172-31-23-5:~$ wget -O aerospike.tgz 'http://aerospike.com/download/server/latest/artifact/ubuntu12'
--2015-03-09 21:29:58-- http://aerospike.com/download/server/latest/artifact/ubuntu12
Resolving aerospike.com (aerospike.com)... 184.168.221.29
Connecting to aerospike.com (aerospike.com)|184.168.221.29|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: /download/server/latest/artifact/ubuntu12 [following]
--2015-03-09 21:29:59-- http://aerospike.com/download/server/latest/artifact/ubuntu12
Connecting to aerospike.com (aerospike.com)|184.168.221.29|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: /download/server/latest/artifact/ubuntu12 [following]
--2015-03-09 21:29:59-- http://aerospike.com/download/server/latest/artifact/ubuntu12
Connecting to aerospike.com (aerospike.com)|184.168.221.29|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.aerospike.com/download/server/latest/artifact/ubuntu12[following]
--2015-03-09 21:29:59-- http://www.aerospike.com/download/server/latest/artifact/ubuntu12
Resolving www.aerospike.com (www.aerospike.com)... 54.215.231.2, 54.183.249.41
Connecting to www.aerospike.com (www.aerospike.com)|54.215.231.2|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.aerospike.com/cgi/latest.php?/download/server/latest/artifact/ubuntu12 [following]
--2015-03-09 21:29:59-- http://www.aerospike.com/cgi/latest.php?/download/server/latest/artifact/ubuntu12
Reusing existing connection to www.aerospike.com:80.
HTTP request sent, awaiting response... 302 Found
Location: /download/server/3.5.3/artifact/ubuntu12 [following]
--2015-03-09 21:29:59-- http://www.aerospike.com/download/server/3.5.3/artifact/ubuntu12
Reusing existing connection to www.aerospike.com:80.
HTTP request sent, awaiting response... 302 Found
Location: http://www.aerospike.com/cgi/artifact.php?/download/server/3.5.3/artifact/ubuntu12 [following]
--2015-03-09 21:29:59-- http://www.aerospike.com/cgi/artifact.php?/download/server/3.5.3/artifact/ubuntu12
Reusing existing connection to www.aerospike.com:80.
HTTP request sent, awaiting response... 302 Found
Location: http://www.aerospike.com/artifacts/aerospike-server-community/3.5.3/aerospike-server-community-3.5.3... [following]
--2015-03-09 21:29:59-- http://www.aerospike.com/artifacts/aerospike-server-community/3.5.3/aerospike-server-community-3.5.3...
Reusing existing connection to www.aerospike.com:80.
HTTP request sent, awaiting response... 200 OK
Length: 10518026 (10M) [application/x-gzip]
Saving to: ‘aerospike.tgz’
100%[=========================================================================================================================================================================================>] 10,518,026 17.6MB/s in 0.6s
2015-03-09 21:30:00 (17.6 MB/s) - ‘aerospike.tgz’ saved [10518026/10518026]
ubuntu#ip-172-31-23-5:~$ ls -ltrh
total 11M
-rw-rw-r-- 1 ubuntu ubuntu 11M Mar 3 23:57 aerospike.tgz
ubuntu#ip-172-31-23-5:~$ tar xvf aerospike.tgz
aerospike-server-community-3.5.3-ubuntu12.04/
aerospike-server-community-3.5.3-ubuntu12.04/asinstall
aerospike-server-community-3.5.3-ubuntu12.04/aerospike-server-community-3.5.3.ubuntu12.04.x86_64.deb
aerospike-server-community-3.5.3-ubuntu12.04/aerospike-tools-3.5.2.ubuntu12.04.x86_64.deb
aerospike-server-community-3.5.3-ubuntu12.04/LICENSE
aerospike-server-community-3.5.3-ubuntu12.04/SHA256SUMS
ubuntu#ip-172-31-23-5:~$ cd aerospike-server-community-3.5.3-ubuntu12.04/
ubuntu#ip-172-31-23-5:~/aerospike-server-community-3.5.3-ubuntu12.04$ ls -ltrh
total 11M
-rw-rw-r-- 1 ubuntu ubuntu 8.1K Dec 5 20:24 LICENSE
-rwxrwxr-x 1 ubuntu ubuntu 1.1K Dec 5 20:24 asinstall
-rw-r--r-- 1 ubuntu ubuntu 3.7M Feb 23 23:38 aerospike-tools-3.5.2.ubuntu12.04.x86_64.deb
-rw-rw-r-- 1 ubuntu ubuntu 563 Feb 23 23:43 SHA256SUMS
-rw-r--r-- 1 ubuntu ubuntu 6.6M Feb 23 23:43 aerospike-server-community-3.5.3.ubuntu12.04.x86_64.deb
ubuntu#ip-172-31-23-5:~/aerospike-server-community-3.5.3-ubuntu12.04$ sudo ./asinstall
Installing tools
dpkg -i aerospike-tools-3.5.2.ubuntu12.04.x86_64.deb
Selecting previously unselected package aerospike-tools.
(Reading database ... 51108 files and directories currently installed.)
Preparing to unpack aerospike-tools-3.5.2.ubuntu12.04.x86_64.deb ...
Unpacking aerospike-tools (3.5.2) ...
Setting up aerospike-tools (3.5.2) ...
Installing /opt/aerospike
Writing /usr/local/lib/python2.7/dist-packages/aerospike.pth
Adding python path /opt/aerospike/lib/python
Installing server
dpkg -i aerospike-server-community-3.5.3.ubuntu12.04.x86_64.deb
Selecting previously unselected package aerospike-server-community.
(Reading database ... 51160 files and directories currently installed.)
Preparing to unpack aerospike-server-community-3.5.3.ubuntu12.04.x86_64.deb ...
Unpacking aerospike-server-community (3.5.3-1) ...
Setting up aerospike-server-community (3.5.3-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ubuntu#ip-172-31-23-5:~/aerospike-server-community-3.5.3-ubuntu12.04$ sudo /etc/init.d/aerospike start
* Start aerospike: asd kernel.shmall too low, setting to 4G pages = 16TB
kernel.shmall = 4294967296
kernel.shmmax too low, setting to 1GB
kernel.shmmax = 1073741824
[ OK ]
ubuntu#ip-172-31-23-5:~/aerospike-server-community-3.5.3-ubuntu12.04$ sudo /etc/init.d/aerospike status
* asd is running
ubuntu#ip-172-31-23-5:~/aerospike-server-community-3.5.3-ubuntu12.04$
Let us know if the issue persists.
Hope this helps,
-DM
You may be also to install latest glibc if its an older version.
sudo apt-get update
sudo apt-get install libc6

CURL returns "Unknown SSL protocol error"

I've looked at several similar questions here, but none of them have helped me. I want to connect to a web service that uses single-sign-on via an RSA SecurID keyfob. I start by trying to load any cookies provided by the initial GET request. Here's my command:
curl -A "Mozilla/5.0" -L -b cookies.txt -c cookies.txt -v -X GET \
https://sso.example.com/sso/login.htm
I get this in response:
* About to connect() to sso.example.com port 443 (#0)
* Trying 23.12.245.199... connected
* Connected to sso.example.com (23.12.245.199) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs/
* SSLv3, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to sso.example.com:443
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to sso.example.com:443
Here's what I'm using:
# curl --version
curl 7.19.7 (x86_64-suse-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8j zlib/1.2.7 libidn/1.10
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
# more /etc/*-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3
# uname -r
3.0.101-0.21-default
Any ideas?
This is OpenSSL in your client that has a problem to understand what the server is saying and it errors out because of that.
You can sometimes work around these kinds of issues by forcing curl to speak SSLv3 (-3), TLS1.0 (-1) or even SSLv2 (-2)
... it is also conceivable that your severely outdated versions of curl and OpenSSL simply have a bug or two that cause this and that you can fix this problem by upgrading to modern versions (and then also fix the numerous security problems your versions contain).

Resources