Connection to the snap store failed

Asked by Raghava V

Hi Support,

We have a Ubuntu 18.04 server running on cloud. Now, We are trying to upgrade the server to Ubuntu release 20.04 using
# sudo apt-get update
# sudo apt-get upgrade -y
# sudo apt-get dist-upgrade -y
# sudo apt-get autoremove
# sudo reboot

and

# sudo do-release-upgrade.

While running the mentioned commands, popping up an error saying "CONNECTION TO THE SNAP STORE FAILED".

NOTE: JFI, Tried as root user too.
                      Ports 443 and 80 opened

So please help us resolve this error and upgrade the server ASAP.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

For diagnostic purposes please provide the full output that you receive for the following commands

uname -a
lsb_release -crid
sudo apt update
sudo do-release-upgrade

Revision history for this message
Raghava V (raghavav) said :
#2

Hi Manfred,

Please find the attachments which give the required info about the commands
which you mentioned.

Thanks & Regards,
Raghava V

On Mon, Jan 16, 2023 at 1:01 PM Manfred Hampl <
<email address hidden>> wrote:

> Your question #704417 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/704417
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> For diagnostic purposes please provide the full output that you receive
> for the following commands
>
> uname -a
> lsb_release -crid
> sudo apt update
> sudo do-release-upgrade
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/704417
>
> You received this question notification because you asked the question.
>

--
*Thanks & Regards,*
*Raghava V*

--
*
*
*The contents of this email message and any attachments are intended
solely for the addressee(s) only and contains confidential and/or
privileged information and may be legally protected from disclosure. If you
are not the intended recipient of this message or their agent, or if this
message has been addressed to you in error, please immediately alert the
sender by reply email and then delete this message and any attachments
thereof. Mobisy is not liable for any loss or any damage arising in any way
from the use of this e-mail or its attachments.*

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Attachments do not work.
Please copy/paste the output as plain text into https://answers.launchpad.net/ubuntu/+question/704417

Revision history for this message
Raghava V (raghavav) said :
#4

I can give in a text format, Please find it.

# uname -a
Linux ip-172-30-0-112 5.4.0-1093-aws #102~18.04.2-Ubuntu SMP Wed Dec 7 00:31:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic

# sudo apt update

Hit:1 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease
Hit:5 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic InRelease
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 88.7 kB in 1s (83.5 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

# sudo do-release-upgrade

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Hit http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic InRelease
Hit http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 88.7 kB in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

Connection to the Snap Store failed

You have the package lxd installed but your system is unable to reach
the Snap Store. lxd is now provided via a snap and the release
upgrade will fail if snapd is not functional. Please make sure you're
connected to the Internet and update any firewall or proxy settings
as needed so that you can reach api.snapcraft.io. If you are an
enterprise with a firewall setup you may want to configure a Snap
Store proxy.

Restoring original system state

Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
=== Command detached from window (Mon Jan 16 13:21:45 2023) ===
=== Command terminated with exit status 1 (Mon Jan 16 13:21:55 2023) ===

Revision history for this message
Raghava V (raghavav) said :
#5

I can give it in a text format, Please find it.

# uname -a
Linux ip-172-30-0-112 5.4.0-1093-aws #102~18.04.2-Ubuntu SMP Wed Dec 7
00:31:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic

# sudo apt update

Hit:1 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-updates
InRelease
Hit:3 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-backports
InRelease
Hit:4 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease
Hit:5 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic InRelease
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 88.7 kB in 1s (83.5 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

# sudo do-release-upgrade

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Hit http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-backports
InRelease
Hit http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic InRelease
Hit http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 88.7 kB in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

Connection to the Snap Store failed

You have the package lxd installed but your system is unable to reach
the Snap Store. lxd is now provided via a snap and the release
upgrade will fail if snapd is not functional. Please make sure you're
connected to the Internet and update any firewall or proxy settings
as needed so that you can reach api.snapcraft.io. If you are an
enterprise with a firewall setup you may want to configure a Snap
Store proxy.

Restoring original system state

Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
=== Command detached from window (Mon Jan 16 13:21:45 2023) ===
=== Command terminated with exit status 1 (Mon Jan 16 13:21:55 2023) ===

On Mon, Jan 16, 2023 at 1:21 PM Manfred Hampl <
<email address hidden>> wrote:

> Your question #704417 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/704417
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> Attachments do not work.
> Please copy/paste the output as plain text into
> https://answers.launchpad.net/ubuntu/+question/704417
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/704417
>
> You received this question notification because you asked the question.
>

--
*Thanks & Regards,*
*Raghava V*

--
*
*
*The contents of this email message and any attachments are intended
solely for the addressee(s) only and contains confidential and/or
privileged information and may be legally protected from disclosure. If you
are not the intended recipient of this message or their agent, or if this
message has been addressed to you in error, please immediately alert the
sender by reply email and then delete this message and any attachments
thereof. Mobisy is not liable for any loss or any damage arising in any way
from the use of this e-mail or its attachments.*

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

There is no need for duplicate answering - please either do a mail reply without history or paste your answer into the answers.launchpad.net page, but not both.

What output do you receive for the commands

apt policy snapd lxd
ping -c 3 api.snapcraft.io
snap --version
snap list

Revision history for this message
Raghava V (raghavav) said :
#7

Hi Manfred,
Noted.

Please find the info,

# apt policy snapd lxd

snapd:
  Installed: 2.57.5+18.04ubuntu0.1
  Candidate: 2.57.5+18.04ubuntu0.1
  Version table:
 *** 2.57.5+18.04ubuntu0.1 500
        500 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.32.5+18.04 500
        500 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
lxd:
  Installed: 3.0.3-0ubuntu1~18.04.2
  Candidate: 3.0.3-0ubuntu1~18.04.2
  Version table:
 *** 3.0.3-0ubuntu1~18.04.2 500
        500 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.0.0-0ubuntu4 500
        500 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

#ping -c 3 api.snapcraft.io

PING api.snapcraft.io (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.026 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.039 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.036 ms

--- api.snapcraft.io ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2035ms
rtt min/avg/max/mdev = 0.026/0.033/0.039/0.008 ms

# snap --version

snap 2.57.5+18.04ubuntu0.1
snapd 2.57.5+18.04ubuntu0.1
series 16
ubuntu 18.04
kernel 5.4.0-1093-aws

# snap list

Name Version Rev Tracking Publisher Notes
amazon-ssm-agent 3.0.1124.0 4046 latest/stable/… aws✓ classic
bare 1.0 5 latest/stable canonical✓ base
core 16-2.52.1 11993 latest/stable canonical✓ core
core18 20210722 2128 latest/stable canonical✓ base
gedit 3.36.2+git14.c07b37c55 626 latest/stable canonical✓ -
gnome-3-28-1804 3.28.0-19-g98f9e67.98f9e67 161 latest/stable canonical✓ -
gtk-common-themes 0.1-59-g7bca6ae 1519 latest/stable canonical✓ -

Revision history for this message
Raghava V (raghavav) said :
#8

Hi Manfred,

Any breakthrough please ??

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

Your output:
#ping -c 3 api.snapcraft.io
PING api.snapcraft.io (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.026 ms

Why is api.snapcraft.io rerouted to localhost?
Its address should be something like 185.125.188.58 instead of 127.0.0.1.
Do you have a manual reassignment of the snapcraft servers in your /etc/hosts file?

I assume that the command
sudo snap refresh
will also fail in your current setup.
You probably are missing all recent updates to the snaps, e.g. current version for core18 is 20221212.

Revision history for this message
Raghava V (raghavav) said :
#10

185.125.188.58 instead of 127.0.0.1. >>>>>>Here the Ip could be Public Ip of the server??

   /etc/hosts file content modified as below now,

127.0.0.1 localhost

13.233.215.202 api.snapcraft.io

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

yes, Snap refresh also failing....

# sudo snap refresh >>>>output is below

error: cannot refresh: Post https://api.snapcraft.io/v2/snaps/refresh: proxyconnect tcp: dial tcp
       127.0.0.1:3128: connect: connection refused

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

I am no expert in networking, and my knowledge of name resolution is insufficient, so I do not know where that wrong translation of api.snapcraft.com to 127.0.0.1 comes from and how to best correct it.

If api.snapcraft.io was not defined in your /etc/hosts file, then this wrong translation setting must come from somewhere else.
If you manually enter the apt.snapcraft.io server into /etc/hosts file then you have to give its address (185.125.188.58) there, not the address of your server.

Eventually one of the commands

nslookup api.snapcraft.io
dig api.snapcraft.io

helps finding the root cause.

Revision history for this message
Raghava V (raghavav) said :
#12

Thanks for your time Manfred,

After the changes, You may get some idea....

/etc/hosts

185.125.188.58 api.snapcraft.io
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

# sudo nslookup api.snapcraft.io
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
Name: api.snapcraft.io
Address: 185.125.188.58

# sudo dig api.snapcraft.io

; <<>> DiG 9.11.3-1ubuntu1.18-Ubuntu <<>> api.snapcraft.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63926
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;api.snapcraft.io. IN A

;; ANSWER SECTION:
api.snapcraft.io. 0 IN A 185.125.188.58

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Tue Jan 17 09:13:34 IST 2023
;; MSG SIZE rcvd: 61

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

Now you have overruled the wrong settings (wherever they are defined) with an /etc/hosts entry, and I assume that the connection to the snap store will now work (and probably also the release upgrade). What is now the output of "sudo snap refresh"?

For identifying the root cause it would be necessary to see the output of the nslookup and dig commands without any /etc/hosts entry for the api.snapcraft.com server.

Revision history for this message
Raghava V (raghavav) said :
#14

Still, result is same.

# sudo snap refresh
error: cannot refresh: Post https://api.snapcraft.io/v2/snaps/refresh: proxyconnect tcp: dial tcp
       127.0.0.1:3128: connect: connection refused

Result - Without /etc/host file entry for api.snapcraft.com
# nslookup api.snapcraft.io

Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
Name: api.snapcraft.io
Address: 185.125.188.55
Name: api.snapcraft.io
Address: 185.125.188.59
Name: api.snapcraft.io
Address: 185.125.188.58
Name: api.snapcraft.io
Address: 185.125.188.54

# dig api.snapcraft.io

; <<>> DiG 9.11.3-1ubuntu1.18-Ubuntu <<>> api.snapcraft.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28684
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;api.snapcraft.io. IN A

;; ANSWER SECTION:
api.snapcraft.io. 17 IN A 185.125.188.54
api.snapcraft.io. 17 IN A 185.125.188.55
api.snapcraft.io. 17 IN A 185.125.188.58
api.snapcraft.io. 17 IN A 185.125.188.59

;; Query time: 1 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Tue Jan 17 13:09:22 IST 2023
;; MSG SIZE rcvd: 109

Revision history for this message
Manfred Hampl (m-hampl) said :
#15

Without the /etc/hosts entry, what is the output of

ping -c 3 api.snapcraft.io
sudo snap refresh

Revision history for this message
Raghava V (raghavav) said :
#16

Without the /etc/hosts entry....,

# ping -c 3 api.snapcraft.io
PING api.snapcraft.io (185.125.188.59) 56(84) bytes of data.
64 bytes from api.snapcraft.io (185.125.188.59): icmp_seq=1 ttl=40 time=123 ms
64 bytes from api.snapcraft.io (185.125.188.59): icmp_seq=2 ttl=40 time=121 ms
64 bytes from api.snapcraft.io (185.125.188.59): icmp_seq=3 ttl=40 time=121 ms

--- api.snapcraft.io ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 121.536/122.332/123.472/0.874 ms

# sudo snap refresh
error: cannot refresh: Post https://api.snapcraft.io/v2/snaps/refresh: proxyconnect tcp: dial tcp
       127.0.0.1:3128: connect: connection refused

Revision history for this message
Manfred Hampl (m-hampl) said :
#17

Now the error message indicates that there is some kind of proxy activated, which apparently does not correctly work for the snap store server.

What output do you receive for the command

curl --verbose https://api.snapcraft.io

Revision history for this message
Raghava V (raghavav) said :
#18

# curl --verbose https://api.snapcraft.io

* Rebuilt URL to: https://api.snapcraft.io/
* Trying 185.125.188.59...
* TCP_NODELAY set
* Connected to api.snapcraft.io (185.125.188.59) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Unknown (8):
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Client hello (1):
* TLSv1.3 (OUT), TLS Unknown, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=GB; L=London; O=Canonical Group Ltd; CN=api.snapcraft.io
* start date: Aug 25 00:00:00 2022 GMT
* expire date: Aug 25 23:59:59 2023 GMT
* subjectAltName: host "api.snapcraft.io" matched cert's "api.snapcraft.io"
* issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1
* SSL certificate verify ok.
* TLSv1.3 (OUT), TLS Unknown, Unknown (23):
> GET / HTTP/1.1
> Host: api.snapcraft.io
> User-Agent: curl/7.58.0
> Accept: */*
>
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS Unknown, Unknown (23):
< HTTP/1.1 200 OK
< server: gunicorn/20.0.4
< date: Tue, 17 Jan 2023 09:06:53 GMT
< content-type: text/html; charset=utf-8
< content-length: 64
< snap-store-version: 52
< x-view-name: snapdevicegw.webapi.root
< x-vcs-revision: bf69cb87
< x-request-id: 0DE9D7CAA7240A8325B201BB63C6652C38882BCF
<
snapcraft.io store API service - Copyright 2018-2022 Canonical.
* Connection #0 to host api.snapcraft.io left intact

Revision history for this message
Manfred Hampl (m-hampl) said :
#19

The connection to api.snapcraft.io with curl is correctly working.
I do not see a reason why "snap refresh" fails.

Can you reboot the server and try again?

Revision history for this message
Raghava V (raghavav) said :
#20

Server stopped and restarted,

But still the same issue is intact.

Revision history for this message
Manfred Hampl (m-hampl) said :
#21

Did you set a http proxy inside snap?
What is the output of

snap get -d system

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#22
Revision history for this message
Raghava V (raghavav) said :
#23

No, I didn't set http proxy insisde the snap..

# snap get -d system

{
 "cloud": {
  "availability-zone": "ap-south-1a",
  "name": "aws",
  "region": "ap-south-1"
 },
 "proxy": {
  "http": "http://127.0.0.1:3128",
  "https": "http://127.0.0.1:3128"
 },
 "refresh": {},
 "seed": {
  "loaded": true
 },
 "system": {
  "hostname": "ip-172-30-0-112",
  "network": {},
  "timezone": "UTC"
 }
}

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#24

Quote: "No, I didn't set http proxy inside the snap."

The output
 "proxy": {
  "http": "http://127.0.0.1:3128",
  "https": "http://127.0.0.1:3128"
tells the opposite.

I assume that's the culprit.

Try
sudo snap set system proxy.http="" proxy.https=""

and then test with
sudo snap refresh

Revision history for this message
Bernard Stafford (bernard010) said :
#25

Did you try:
killall snap-store
sudo snap refresh

-or-

killall snap-store
sudo snap refresh snap-store

Revision history for this message
Raghava V (raghavav) said :
#26

Tried Now, the result is as below

# killall snap-store
snap-store: no process found

# sudo snap refresh
error: cannot refresh: Post https://api.snapcraft.io/v2/snaps/refresh: proxyconnect tcp:
       dial tcp 127.0.0.1:3128: connect: connection refused

# killall snap-store
snap-store: no process found

# sudo snap refresh snap-store
error: cannot refresh "snap-store": Post https://api.snapcraft.io/v2/snaps/refresh:
       proxyconnect tcp: dial tcp 127.0.0.1:3128: connect: connection refused

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#27

What is the output of:

env | grep 3128

Thanks

Revision history for this message
Raghava V (raghavav) said :
#28

Hi Manfred,
######
I assume that's the culprit.

Try
sudo snap set system proxy.http="" proxy.https=""

#####

This helps me to run the upgrade...
Now " snap refresh" is running successfully and
do-release-upgrade is also running.

But at the end there is one more error as follows.

Get:48 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [516 B]
Fetched 27.2 MB in 6s (4475 kB/s)

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done

Calculating the changes

Calculating the changes

Could not calculate the upgrade

An unresolvable problem occurred while calculating the upgrade.

This was likely caused by:
* Unofficial software packages not provided by Ubuntu
Please use the tool 'ppa-purge' from the ppa-purge
package to remove software from a Launchpad PPA and
try the upgrade again.

If none of this applies, then please report this bug using the
command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal. If
you want to investigate this yourself the log files in
'/var/log/dist-upgrade' will contain details about the upgrade.
Specifically, look at 'main.log' and 'apt.log'.

Restoring original system state

Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
=== Command detached from window (Tue Jan 17 17:46:10 2023) ===
=== Command terminated with exit status 1 (Tue Jan 17 17:46:20 2023) ===

Revision history for this message
Raghava V (raghavav) said :
#29

Thanks Manfred Hampl, that solved my question.