"Network error, unable to connect to server" when registering RHEL server using subscription-manager

Latest response

Good morning,

I am trying to register a RhelEnterprise Linux Server 7.6 x86-64 on a VM running under subscription manager (in order to update it to 7.9 using YUM). I have a license under RedHat and can login okay to www.Redhat.com okay using my login/pword but if I try and register directly from session on VM. I know that there a few threads with this issue kicking around already but having gone through them and following most of the feedback offered im still unable to resolve this.

subscription-manager register

Registering to: subscription.rhsm.redhat.com:443/subscription
username: username
password: password
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information. <<< Please see rhsm.log attached

The DNS is setup to reference the correct nameservers. I did try adding & but got same result above.

cat /etc/resolv.conf
nameserver 10.xxx.xx.xx
nameserver 10.xxx.xx.xx

dig www.redhat.com

; <<>> DiG 9.9.4-RedHat-9.9.4-72.el7 <<>> www.redhat.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43874 ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4000 ;; QUESTION SECTION: ;www.redhat.com. IN A

;; ANSWER SECTION: www.redhat.com. 2958 IN CNAME ds-www.redhat.com.edgekey.net. ds-www.redhat.com.edgekey.net. 5860 IN CNAME ds-www.redhat.com.edgekey.net.globalredir.akadns.net. ds-www.redhat.com.edgekey.net.globalredir.akadns.net. 2129 IN CNAME e3396.dscx.akamaiedge.net. e3396.dscx.akamaiedge.net. 20 IN A

;; Query time: 25 msec ;; SERVER: ;; WHEN: Wed Jun 09 16:06:05 IST 2021 ;; MSG SIZE rcvd: 201

cd /tmp && wget http://www.redhat.com/index.html --2021-06-09 16:08:13-- http://www.redhat.com/index.html Resolving www.redhat.com (www.redhat.com)..., 2a02:26f0:e8:4aa::d44, 2a02:26f0:e8:4ab::d44 Connecting to www.redhat.com (www.redhat.com)||:80... connected. HTTP request sent, awaiting response... 403 Forbidden 2021-06-09 16:08:13 ERROR 403: Forbidden.

Not sure what the error 403: Forbidden relates to but have no issue below connecting to same site through port 443 ?

telnet subscription.rhsm.redhat.com 443
Trying Connected to subscription.rhsm.redhat.com. Escape character is '^]'.

telnet www.redhat.com 443 telnet www.redhat.com 443
Trying Connected to www.redhat.com. Escape character is '^]'.

With regards to the workaround suggested under https://access.redhat.com/solutions/1323123
I followed all of the resolution suggested below but that hasnt helped either

Check that the host name given in the /etc/rhsm/rhsm.conf file is correct and can be resolved. ... hostname = subscription.rhsm.redhat.com

nslookup subscription.rhsm.redhat.com
Server: xx.xxx.xx.xx Address: xx.xxx.xx.xx#53

Non-authoritative answer: Name: subscription.rhsm.redhat.com Address: <<<< seems to be resolving back to IP ok

Verify and correct DNS server information in /etc/resolv.conf file. If host file is used for name resolution instead of DNS, make sure /etc/hosts, has an entry for satellite server. Verify baseurl is set to baseurl= https://cdn.redhat.com in /etc/rhsm/rhsm.conf file. > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< It is set to this

Also prior to attempting to register server i cleaned up subscription manager as per below

subscription-manager remove --all subscription-manager unregister subscription-manager clean yum clean all rm -rf /var/cache/yum/*



Hi Paul, welcome...

As an initial start, please try the recommendation from Christian Labisch (below). If that doesn't help considering the numerous various solutions and other possibilities - this may be more efficiently resolved with a ticket with Red Hat (recommend submitting an sosreport.

Christian Labisch often appropriately recommends this set of commands below, such as in a previous such in this 2018 discussion here:

sudo subscription-manager remove --all
sudo subscription-manager unregister
sudo subscription-manager clean

sudo subscription-manager register
sudo subscription-manager refresh
sudo subscription-manager attach --auto


Thanks  for the feedback. I'm not sure if you were able to read the last line I posted above (as it was very  garbled) but I did running the commands listed below already but only got as far as sudo subscription-manager register ....

#subscription-manager remove --all 
#subscription-manager unregister 
#subscription-manager clean 
#yum clean all 
#rm -rf /var/cache/yum/*
# sudo subscription-manager register.
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.

As you suggest I could always log a ticket with Red Hat but in the meantime if you have any additional suggestions then they would be gratefully received. 

Edited post above, removed the very old probably not relevant solution



Encasing your output above with three tildes above and below such as this will avoid jumbled large text and make the output easier to read:


output goes here




I see from your output from attempting to register - you were prompted for a userid/password. The log it mentioned /var/log/rhsm/rhsm.log - were there any clues in that log?

I generally don't hit reply inline with the individual replies, but go to the bottom of the discussion & hit reply -- over time it can make the discussion not optimal to read through.


Good morning,

Thanks for the feedback.

The log (attached to this call) contains multiple entries for the error below, but not clear whether they're being displayed as a result of not being registered...

"2021-06-07 05:17:40,216 [ERROR] rhsmcertd-worker:28222:MainThread @rhsmcertd_worker.py:75 - Either the consumer is not registered or the certificates are corrupted. Certificate update using daemon failed"

The log also contains a number of "[Errno 104] Connection reset by peer" but without being able to compare against a similar log on a system that is registered successfully (this is our only Red Hat Server) difficult to decipher.