[Solved] Server certificate verification failed

Hi,

I am using Rosbot 2.0. When i try to perform sudo apt-get update, I am getting the following error

Hit:1 http://ppa.launchpad.net/mozillateam/ppa/ubuntu xenial InRelease         
Hit:2 http://packages.ros.org/ros/ubuntu xenial InRelease                      
Hit:3 http://ports.ubuntu.com/ubuntu-ports xenial InRelease              
Hit:4 https://packages.microsoft.com/repos/vscode stable InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease
Hit:6 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease
Ign:7 https://ftp.debian.org/debian stretch-backports InRelease
Hit:8 https://install.husarnet.com/deb all InRelease
Hit:9 https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease
Ign:10 https://ftp.debian.org/debian stretch-backports Release
Hit:11 https://files.husarion.com/repo xenial InRelease
Ign:12 https://ftp.debian.org/debian stretch-backports/main armhf Packages
Ign:13 https://ftp.debian.org/debian stretch-backports/main all Packages
Ign:14 https://ftp.debian.org/debian stretch-backports/main Translation-en
Ign:12 https://ftp.debian.org/debian stretch-backports/main armhf Packages
Ign:13 https://ftp.debian.org/debian stretch-backports/main all Packages
Ign:14 https://ftp.debian.org/debian stretch-backports/main Translation-en
Ign:12 https://ftp.debian.org/debian stretch-backports/main armhf Packages
Ign:13 https://ftp.debian.org/debian stretch-backports/main all Packages
Ign:14 https://ftp.debian.org/debian stretch-backports/main Translation-en
Ign:12 https://ftp.debian.org/debian stretch-backports/main armhf Packages
Ign:13 https://ftp.debian.org/debian stretch-backports/main all Packages
Ign:14 https://ftp.debian.org/debian stretch-backports/main Translation-en
Ign:12 https://ftp.debian.org/debian stretch-backports/main armhf Packages
Ign:13 https://ftp.debian.org/debian stretch-backports/main all Packages
Ign:14 https://ftp.debian.org/debian stretch-backports/main Translation-en
Err:12 https://ftp.debian.org/debian stretch-backports/main armhf Packages
  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
Ign:13 https://ftp.debian.org/debian stretch-backports/main all Packages
Ign:14 https://ftp.debian.org/debian stretch-backports/main Translation-en
Reading package lists... Done
W: The repository 'https://ftp.debian.org/debian stretch-backports Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://ftp.debian.org/debian/dists/stretch-backports/main/binary-armhf/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
E: Some index files failed to download. They have been ignored, or old ones used instead.

Any help?

Thanks in advance.

Hello aiubian,

The apt-get update command is querying several servers for package list. The servers or their mirrors are automatically chosen based on device localization, thus the queried servers may vary for various countries.
For server https://ftp.debian.org/ there is actually a problem with certificate.

There are few possible solutions:

  1. You may try to set alternative repository mirror following this guide
  2. You can try to reinstall certificates, this may force apt to use different mirror:
    apt-get install --reinstall ca-certificates
    
  3. You can download and flash fresh image for ROSbot.
  4. It is also possible that certificate problem is temporary on server side and you will be able to make update later.

Regards,
Łukasz

Hi Łukasz,

Thanks for your help.

Hi Łukasz,

I have tried 2 to fix the issue. But didn’t work. I want to try 1 no solution but confused which one to update. Here is the content of my /etc/apt/sources.lst

deb http://ports.ubuntu.com/ubuntu-ports xenial main universe multiverse restricted
deb-src http://ports.ubuntu.com/ubuntu-ports xenial main universe multiverse restricted

deb http://ports.ubuntu.com/ubuntu-ports xenial-security main universe multiverse restricted
deb-src http://ports.ubuntu.com/ubuntu-ports xenial-security main universe multiverse restricted

deb http://ports.ubuntu.com/ubuntu-ports xenial-updates main universe multiverse restricted
deb-src http://ports.ubuntu.com/ubuntu-ports xenial-updates main universe multiverse restricted

deb https://files.husarion.com/repo xenial main ros rpi backports
      deb http://packages.ros.org/ros/ubuntu xenial main
      deb http://ppa.launchpad.net/mozillateam/ppa/ubuntu xenial main

You need to substitute all lines with address containing ports.ubuntu.com.
If you want to use e.g. http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports/
Your file will be:

deb http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports/ xenial main universe multiverse restricted
deb-src http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports/ xenial main universe multiverse restricted

deb http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports/ xenial-security main universe multiverse restricted
deb-src http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports/ xenial-security main universe multiverse restricted

deb http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports/ xenial-updates main universe multiverse restricted
deb-src http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports/ xenial-updates main universe multiverse restricted

deb https://files.husarion.com/repo xenial main ros rpi backports
      deb http://packages.ros.org/ros/ubuntu xenial main
      deb http://ppa.launchpad.net/mozillateam/ppa/ubuntu xenial main

Regards,
Łukasz

Hi Łukasz,

Thanks for your help. But the issue still exists :cry:

Are you getting exactly the same error as before changing the repository address?

Hi Łukasz,

I am getting this

husarion@husarion:~$ sudo apt-get update
Hit:1 http://ppa.launchpad.net/mozillateam/ppa/ubuntu xenial InRelease
Hit:2 http://packages.ros.org/ros/ubuntu xenial InRelease                     
Get:3 https://packages.microsoft.com/repos/vscode stable InRelease [3938 B]
Get:4 https://packages.microsoft.com/repos/vscode stable/main amd64 Packages [145 kB]
Ign:5 https://ftp.debian.org/debian stretch-backports InRelease    
Hit:6 https://install.husarnet.com/deb all InRelease        
Hit:7 https://files.husarion.com/repo xenial InRelease         
Hit:8 https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease   
Hit:9 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial InRelease        
Ign:10 https://ftp.debian.org/debian stretch-backports Release
Get:11 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial-security InRelease [109 kB]
Ign:12 https://ftp.debian.org/debian stretch-backports/main armhf Packages
Get:13 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial-updates InRelease [109 kB]
Get:14 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial-security/main Sources [155 kB]
Ign:15 https://ftp.debian.org/debian stretch-backports/main all Packages       
Get:16 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial-security/main armhf Packages [528 kB]
Get:17 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial-security/main Translation-en [295 kB]
Ign:18 https://ftp.debian.org/debian stretch-backports/main Translation-en     
Get:19 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial-security/universe armhf Packages [401 kB]
Get:20 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial-security/universe Translation-en [189 kB]
Get:21 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial-updates/main Sources [340 kB]
Ign:12 https://ftp.debian.org/debian stretch-backports/main armhf Packages     
Get:22 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial-updates/main armhf Packages [783 kB]
Get:23 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial-updates/main Translation-en [405 kB]
Ign:15 https://ftp.debian.org/debian stretch-backports/main all Packages       
Get:24 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial-updates/universe armhf Packages [683 kB]
Get:25 http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports xenial-updates/universe Translation-en [321 kB]
Ign:18 https://ftp.debian.org/debian stretch-backports/main Translation-en     
Ign:12 https://ftp.debian.org/debian stretch-backports/main armhf Packages     
Ign:15 https://ftp.debian.org/debian stretch-backports/main all Packages       
Ign:18 https://ftp.debian.org/debian stretch-backports/main Translation-en     
Ign:12 https://ftp.debian.org/debian stretch-backports/main armhf Packages     
Ign:15 https://ftp.debian.org/debian stretch-backports/main all Packages       
Ign:18 https://ftp.debian.org/debian stretch-backports/main Translation-en     
Ign:12 https://ftp.debian.org/debian stretch-backports/main armhf Packages
Ign:15 https://ftp.debian.org/debian stretch-backports/main all Packages
Ign:18 https://ftp.debian.org/debian stretch-backports/main Translation-en
Err:12 https://ftp.debian.org/debian stretch-backports/main armhf Packages
  SSL: certificate subject name (www.debian.org) does not match target host name 'ftp.debian.org'
Ign:15 https://ftp.debian.org/debian stretch-backports/main all Packages
Ign:18 https://ftp.debian.org/debian stretch-backports/main Translation-en
Fetched 4468 kB in 34s (131 kB/s)
Reading package lists... Done
W: The repository 'https://ftp.debian.org/debian stretch-backports Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://ftp.debian.org/debian/dists/stretch-backports/main/binary-armhf/Packages  SSL: certificate subject name (www.debian.org) does not match target host name 'ftp.debian.org'
E: Some index files failed to download. They have been ignored, or old ones used instead.

Hello aiubian,

I think, that this issue will need specialized debugging.
Would it be acceptable for you to setup remote session with your ROSbot or schedule a Skype call?
If so, please send me PM.

Regards,
Łukasz

1 Like

Hi Łukasz,

After giving reset, this issue is solved.

Thanks for your help.