Unable to subscribe/register server

Posted on

Hi Community,
I am using the RHEL9 Developer version. I tried to patch the server by typing dnf update from the command line but got an error "no route to host." I ran the below commands, and it unregistered and removed subscriptions; however, now I am trying to register it and am getting a Network error. I rebooted the server, removed the machine ID, and recreated it. I removed the system from the Redhat portal as well, but I can't register the machine. I stopped firewalld and changed dns to 8.8.8.8 but still didn't work. I can see http and https services are added in the firewalld. I can ping I googled but couldn't find a solution. I can ping Google but get an unreachable error when I ping subscription.rhsm.redhat.com. Can someone help me fix the issue? Thanks

subscription-manager remove --all
subscription-manager unregister
subscription-manager clean
subscription-manager register
[root@web-server-02 rhsm]# subscription-manager register --username=myusername
Registering to: subscription.rhsm.redhat.com:443/subscription
Password:
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.
============================================
[root@web-server-02 rhsm]# curl -v -u myusername --cacert /etc/rhsm/ca/redhat-uep.pem https://subscription.rhn.redhat.com/subscription/users/myusername/owners
Enter host password for user 'myusername':
*   Trying 209.132.178.16:443...
* connect to 209.132.178.16 port 443 failed: No route to host
* Failed to connect to subscription.rhn.redhat.com port 443: No route to host
* Closing connection 0
curl: (7) Failed to connect to subscription.rhn.redhat.com port 443: No route to host
==================================================
[root@web-server-02 rhsm]# curl -v -u myusername --cacert /etc/rhsm/ca/redhat-uep.pem https://subscription.rhn.redhat.com/subscription/users/myusername/owners
Enter host password for user 'myusername':
*   Trying 209.132.178.16:443...
* connect to 209.132.178.16 port 443 failed: No route to host
* Failed to connect to subscription.rhn.redhat.com port 443: No route to host
* Closing connection 0
curl: (7) Failed to connect to subscription.rhn.redhat.com port 443: No route to host
==================================================
[root@web-server-02 rhsm]# openssl s_client -connect subscription.rhsm.redhat.com:443 -CAfile /etc/rhsm/ca/redhat-uep.pem
404C50A42B7F0000:error:80000071:system library:BIO_connect:No route to host:crypto/bio/bio_sock2.c:114:calling connect()
404C50A42B7F0000:error:10000067:BIO routines:BIO_connect:connect error:crypto/bio/bio_sock2.c:116:
connect:errno=113
==================================================
[root@web-server-02 rhsm]# curl -v -u myusername --cacert /etc/rhsm/ca/redhat-uep.pem https://subscription.rhsm.redhat.com/subscription/users/myusername/owners
Enter host password for user 'myusername':
*   Trying 209.132.178.16:443...
* connect to 209.132.178.16 port 443 failed: No route to host
* Failed to connect to subscription.rhsm.redhat.com port 443: No route to host
* Closing connection 0
curl: (7) Failed to connect to subscription.rhsm.redhat.com port 443: No route to ho
==================================================
Log
[root@web-server-02 rhsm]# cat rhsm.log

2024-04-18 17:12:49,450 [ERROR] subscription-manager:16607:MainThread @cli.py:71 - Error during registration: [Errno 113] No route to host
2024-04-18 17:12:49,450 [ERROR] subscription-manager:16607:MainThread @cli.py:72 - [Errno 113] No route to host
Traceback (most recent call last):
  File "/usr/lib64/python3.9/site-packages/subscription_manager/cli_command/register.py", line 347, in _do_command
    owner_key = service.determine_owner_key(
  File "/usr/lib64/python3.9/site-packages/rhsmlib/services/register.py", line 238, in determine_owner_key
    owners = self.cp.getOwnerList(username)
  File "/usr/lib64/python3.9/site-packages/rhsm/connection.py", line 1804, in getOwnerList
    owners = self.conn.request_get(method, description=_("Fetching organizations"))
  File "/usr/lib64/python3.9/site-packages/rhsm/connection.py", line 1327, in request_get
    result: Dict[str, Any] = self._request(
  File "/usr/lib64/python3.9/site-packages/rhsm/connection.py", line 1130, in _request
    result, response = self._make_request(
  File "/usr/lib64/python3.9/site-packages/rhsm/connection.py", line 1066, in _make_request
    raise NoValidEntitlement(
  File "/usr/lib64/python3.9/site-packages/rhsm/connection.py", line 1021, in _make_request
    conn = self._create_connection(cert_file=cert_file, key_file=key_file)
  File "/usr/lib64/python3.9/site-packages/rhsm/connection.py", line 811, in _create_connection
    conn.connect()
  File "/usr/lib64/python3.9/http/client.py", line 1447, in connect
    super().connect()
  File "/usr/lib64/python3.9/http/client.py", line 946, in connect
    self.sock = self._create_connection(
  File "/usr/lib64/python3.9/socket.py", line 844, in create_connection
    raise err
  File "/usr/lib64/python3.9/socket.py", line 832, in create_connection
    sock.connect(sa)
OSError: [Errno 113] No route to host
=================================
[root@web-server-02 rhsm]# ping subscription.rhsm.redhat.com
PING subscription.rhsm.redhat.com (209.132.178.16) 56(84) bytes of data.
From web.homelab.local.0.168.192.in-addr.arpa (192.168.0.208) icmp_seq=10 Destination Host Unreachable
From web.homelab.local.0.168.192.in-addr.arpa (192.168.0.208) icmp_seq=11 Destination Host Unreachable
From web.homelab.local.0.168.192.in-addr.arpa (192.168.0.208) icmp_seq=12 Destination Host Unreachable
From web.homelab.local.0.168.192.in-addr.arpa (192.168.0.208) icmp_seq=13 Destination Host Unreachable
From web.homelab.local.0.168.192.in-addr.arpa (192.168.0.208) icmp_seq=14 Destination Host Unreachable
From web.homelab.local.0.168.192.in-addr.arpa (192.168.0.208) icmp_seq=15 Destination Host Unreachable
^C
--- subscription.rhsm.redhat.com ping statistics ---
17 packets transmitted, 0 received, +6 errors, 100% packet loss, time 16393ms
pipe 4
[root@web-server-02 rhsm]# ping google.com
PING google.com(phx19s05-in-x0e.1e100.net (2607:f8b0:402a:80a::200e)) 56 data bytes
64 bytes from phx19s05-in-x0e.1e100.net (2607:f8b0:402a:80a::200e): icmp_seq=1 ttl=118 time=36.2 ms
64 bytes from phx19s05-in-x0e.1e100.net (2607:f8b0:402a:80a::200e): icmp_seq=2 ttl=118 time=21.6 ms
64 bytes from phx19s05-in-x0e.1e100.net (2607:f8b0:402a:80a::200e): icmp_seq=3 ttl=118 time=22.9 ms
64 bytes from phx19s05-in-x0e.1e100.net (2607:f8b0:402a:80a::200e): icmp_seq=4 ttl=118 time=21.5 ms
64 bytes from phx19s05-in-x0e.1e100.net (2607:f8b0:402a:80a::200e): icmp_seq=5 ttl=118 time=22.1 ms
^C
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 21.490/24.864/36.206/5.692 ms

Responses