Debian update failed and its solution

W: Failed to fetch http://ftp2.de.debian.org/debian-security/dists/lenny/updates/main/binary-amd64/Packages  404 Not Found

W: Failed to fetch http://ftp2.de.debian.org/debian-security/dists/lenny/updates/contrib/binary-amd64/Packages  404 Not Found

W: Failed to fetch http://ftp2.de.debian.org/debian-security/dists/lenny/updates/non-free/binary-amd64/Packages  404 Not Found

E: Some index files failed to download, they have been ignored, or old ones used instead.

Solution:

open /etc/apt/sources.list and change security deb into

deb      http://security.debian.org/ lenny/updates main contrib non-free