Harbor: Clair bazaar error

Created on 7 Nov 2017  路  14Comments  路  Source: goharbor/harbor

I installed harbor v1.2.2 with clair via online installer and a below error occurred.
The image name is vmware/clair:v2.0.1-photon.
When I tried to install clair alone provided from quary.io/coreos, it works fine to update ubuntu data.

I guess that something is wrong inside vmware/clair image but if there is a solution to fix it, let me know please.

Thanks!

Nov  7 04:53:18 172.18.0.1 clair[4120]: {"Event":"could not pull Ubuntu repository","Level":"error","Location":"ubuntu.go:189","Time":"2017-11-07 04:53:18.736912","er
ror":"exit status 3","output":"No handlers could be found for logger \"bzr\"\nfailed to open trace file: [Errno 13] Permission denied: '/root/.bzr.log'\nPermission de
nied while trying to load configuration store file:///root/.bazaar/bazaar.conf.\nPermission denied while trying to load configuration store file:///root/.bazaar/bazaa
r.conf.\nPermission denied while trying to load configuration store file:///root/.bazaar/bazaar.conf.\nPermission denied while trying to load configuration store file
:///root/.bazaar/bazaar.conf.\nPermission denied while trying to load configuration store file:///root/.bazaar/bazaar.conf.\nPermission denied while trying to load co
nfiguration store file:///root/.bazaar/bazaar.conf.\nbzr: ERROR: Not a branch: \"/tmp/ubuntu-cve-tracker008038456/\".\n"}
Nov  7 04:53:18 172.18.0.1 clair[4120]: {"Event":"an error occured when fetching update","Level":"error","Location":"updater.go:220","Time":"2017-11-07 04:53:18.73750
9","error":"could not download requested resource","updater name":"ubuntu"}
arevulnerability-scan kinbug needtest-case targevic-1.3

All 14 comments

Could you use offline installer?
We updated the clair image on docker hub this may cause the issue.

yes

It seems to work fine via offline installer.
Is there a way to use online installer?

The root cause is that online installer reference an image on docker hub which is updated very recently, we'll fix it and after that online installer will work.

@reasonerjt
It doesn't work fine even via offline installer.
Now another error occurred.

Nov  7 09:31:16 172.18.0.1 clair[1946]: {"Event":"could not pull Ubuntu repository","Level":"error","Location":"ubuntu.go:189","Time":"2017-11-07 09:31:16.999322","error":"exit status 3","output":"bzr: ERROR: Not a branch: \"/tmp/ubuntu-cve-tracker045785765/\".\n"}
Nov  7 09:31:16 172.18.0.1 clair[1946]: {"Event":"an error occured when fetching update","Level":"error","Location":"updater.go:220","Time":"2017-11-07 09:31:16.999404","error":"could not download requested resource","updater name":"ubuntu"}

could you confirm in quary.io/coreos you don't see this issue?

If the answer is yes I'll take a look into it

@odg0318
The online installer should be OK now, I have update the vmware/clair:v2.0.1-photon image.

Please try to run "docker rmi vmware/clair:v2.0.1-photon" before you use the online installer.

@reasonerjt I confirm that there is no issue with quary.io/coreos.
I followed running-clair described in https://github.com/coreos/clair/blob/master/Documentation/running-clair.md to setup.
All of Oracle Linux, RHEL, Alphine, Debian and Ubuntu work fine when being updated.

{"Event":"pagination key is empty, generating...","Level":"warning","Location":"config.go:110","Time":"2017-11-07 12:24:22.113320"}
{"Detectors":"alpine-release,apt-sources,lsb-release,os-release,redhat-release","Event":"Clair registered components","Level":"info","Listers":"apk,dpkg,rpm","Location":"main.go:101","Time":"2017-11-07 12:24:22.113426","Updaters":"alpine,debian,oracle,rhel,ubuntu"}
{"Event":"running database migrations","Level":"info","Location":"pgsql.go:270","Time":"2017-11-07 12:24:22.162539"}
{"Event":"database migration ran successfully","Level":"info","Location":"pgsql.go:277","Time":"2017-11-07 12:24:22.656229"}
{"Event":"notifier service is disabled","Level":"info","Location":"notifier.go:76","Time":"2017-11-07 12:24:22.656622"}
{"Event":"starting grpc server","Level":"info","Location":"server.go:155","Time":"2017-11-07 12:24:22.656728","addr":"[::]:6060"}
{"Event":"grpc server is configured without client certificate authentication","Level":"warning","Location":"server.go:199","Time":"2017-11-07 12:24:22.656962"}
{"Event":"starting health API","Level":"info","Location":"api.go:62","Time":"2017-11-07 12:24:22.657027","addr":"0.0.0.0:6061"}
{"Event":"updater service started","Level":"info","Location":"updater.go:91","Time":"2017-11-07 12:24:22.657179","lock identifier":"c3b3b5f3-b6ef-43b2-9d61-edfe4c02510f"}
{"Event":"updating vulnerabilities","Level":"info","Location":"updater.go:191","Time":"2017-11-07 12:24:22.684102"}
{"Event":"fetching vulnerability updates","Level":"info","Location":"updater.go:271","Time":"2017-11-07 12:24:22.684241"}
{"Event":"Start fetching vulnerabilities","Level":"info","Location":"oracle.go:119","Time":"2017-11-07 12:24:22.684313","package":"Oracle Linux"}
{"Event":"Start fetching vulnerabilities","Level":"info","Location":"rhel.go:92","Time":"2017-11-07 12:24:22.684438","package":"RHEL"}
{"Event":"Start fetching vulnerabilities","Level":"info","Location":"ubuntu.go:88","Time":"2017-11-07 12:24:22.684953","package":"Ubuntu"}
{"Event":"Start fetching vulnerabilities","Level":"info","Location":"alpine.go:52","Time":"2017-11-07 12:24:22.691567","package":"Alpine"}
{"Event":"Start fetching vulnerabilities","Level":"info","Location":"debian.go:63","Time":"2017-11-07 12:24:22.696310","package":"Debian"}
{"Event":"finished fetching","Level":"info","Location":"updater.go:290","Time":"2017-11-07 12:24:56.252769","updater name":"alpine"}
{"Event":"finished fetching","Level":"info","Location":"updater.go:290","Time":"2017-11-07 12:25:58.231473","updater name":"debian"}
{"Event":"finished fetching","Level":"info","Location":"updater.go:290","Time":"2017-11-07 12:38:33.020245","updater name":"rhel"}
{"Event":"finished fetching","Level":"info","Location":"updater.go:290","Time":"2017-11-07 12:41:12.207433","updater name":"ubuntu"}
{"Event":"finished fetching","Level":"info","Location":"updater.go:290","Time":"2017-11-07 12:42:09.422499","updater name":"oracle"}
{"Event":"adding metadata to vulnerabilities","Level":"info","Location":"updater.go:317","Time":"2017-11-07 12:42:09.446453"}

@odg0318 could you provide the clair.log in your Harbor deployment?
You can find it at /var/log/harbor/${the_date}/

Please upload the file as attachment in this issue.

@reasonerjt I was trying to install clair via harbor online installer @yixingjia said.
In this time, it seems like that clair works fine.

# tail -f clair.log 
Nov  7 22:00:21 172.18.0.1 clair[1481]: {"Event":"starting main API","Level":"info","Location":"api.go:52","Time":"2017-11-07 13:00:21.873232","port":6060}
Nov  7 22:00:21 172.18.0.1 clair[1481]: {"Event":"starting health API","Level":"info","Location":"api.go:85","Time":"2017-11-07 13:00:21.873496","port":6061}
Nov  7 22:00:21 172.18.0.1 clair[1481]: {"Event":"updater service started","Level":"info","Location":"updater.go:80","Time":"2017-11-07 13:00:21.873693","lock identifier":"7d4e3599-3e71-43e9-ab76-a45f3569eeb2"}
Nov  7 22:00:21 172.18.0.1 clair[1481]: {"Event":"updating vulnerabilities","Level":"info","Location":"updater.go:167","Time":"2017-11-07 13:00:21.888799"}
Nov  7 22:00:21 172.18.0.1 clair[1481]: {"Event":"fetching vulnerability updates","Level":"info","Location":"updater.go:213","Time":"2017-11-07 13:00:21.888994"}
Nov  7 22:00:21 172.18.0.1 clair[1481]: {"Event":"Start fetching vulnerabilities","Level":"info","Location":"rhel.go:92","Time":"2017-11-07 13:00:21.889132","package":"RHEL"}
Nov  7 22:00:21 172.18.0.1 clair[1481]: {"Event":"Start fetching vulnerabilities","Level":"info","Location":"ubuntu.go:88","Time":"2017-11-07 13:00:21.889332","package":"Ubuntu"}
Nov  7 22:00:21 172.18.0.1 clair[1481]: {"Event":"Start fetching vulnerabilities","Level":"info","Location":"alpine.go:52","Time":"2017-11-07 13:00:21.901177","package":"Alpine"}
Nov  7 22:00:21 172.18.0.1 clair[1481]: {"Event":"Start fetching vulnerabilities","Level":"info","Location":"debian.go:63","Time":"2017-11-07 13:00:21.908467","package":"Debian"}
Nov  7 22:00:21 172.18.0.1 clair[1481]: {"Event":"Start fetching vulnerabilities","Level":"info","Location":"oracle.go:119","Time":"2017-11-07 13:00:21.909529","package":"Oracle Linux"}
Nov  7 22:01:02 172.18.0.1 clair[1481]: {"Event":"finished fetching","Level":"info","Location":"updater.go:227","Time":"2017-11-07 13:01:02.130166","updater name":"alpine"}
Nov  7 22:01:40 172.18.0.1 clair[1481]: {"Event":"finished fetching","Level":"info","Location":"updater.go:227","Time":"2017-11-07 13:01:40.650146","updater name":"debian"}
Nov  7 22:10:09 172.18.0.1 clair[1481]: {"Event":"finished fetching","Level":"info","Location":"updater.go:227","Time":"2017-11-07 13:10:09.087161","updater name":"ubuntu"}

I am waiting for finishing update but ubuntu was finished.

Thanks a lot.

ok thanks.

Not seeing this issue in recent tests. closing.

@odg0318 @reasonerjt I also install clair via harbor online and meet this problem, clair log is like this:

Nov 29 16:55:13 172.19.11.1 clair[1200]: {"Event":"updating vulnerabilities","Level":"info","Location":"updater.go:167","Time":"2017-11-29 08:55:13.311489"}
Nov 29 16:55:13 172.19.11.1 clair[1200]: {"Event":"fetching vulnerability updates","Level":"info","Location":"updater.go:213","Time":"2017-11-29 08:55:13.311564"}
Nov 29 16:55:13 172.19.11.1 clair[1200]: {"Event":"Start fetching vulnerabilities","Level":"info","Location":"oracle.go:119","Time":"2017-11-29 08:55:13.311699","package":"Oracle Linux"}
Nov 29 16:55:13 172.19.11.1 clair[1200]: {"Event":"Start fetching vulnerabilities","Level":"info","Location":"ubuntu.go:88","Time":"2017-11-29 08:55:13.311776","package":"Ubuntu"}
Nov 29 16:55:13 172.19.11.1 clair[1200]: {"Event":"Start fetching vulnerabilities","Level":"info","Location":"alpine.go:52","Time":"2017-11-29 08:55:13.311874","package":"Alpine"}
Nov 29 16:55:13 172.19.11.1 clair[1200]: {"Event":"Start fetching vulnerabilities","Level":"info","Location":"debian.go:63","Time":"2017-11-29 08:55:13.311932","package":"Debian"}
Nov 29 16:55:13 172.19.11.1 clair[1200]: {"Event":"Start fetching vulnerabilities","Level":"info","Location":"rhel.go:92","Time":"2017-11-29 08:55:13.311918","package":"RHEL"}
Nov 29 16:55:15 172.19.11.1 clair[1200]: {"Event":"finished fetching","Level":"info","Location":"updater.go:227","Time":"2017-11-29 08:55:15.246648","updater name":"alpine"}
Nov 29 16:55:16 172.19.11.1 clair[1200]: {"Event":"finished fetching","Level":"info","Location":"updater.go:227","Time":"2017-11-29 08:55:16.022968","updater name":"rhel"}
Nov 29 16:55:17 172.19.11.1 clair[1200]: {"Event":"finished fetching","Level":"info","Location":"updater.go:227","Time":"2017-11-29 08:55:17.091609","updater name":"oracle"}
Nov 29 16:56:40 172.19.11.1 clair[1200]: {"Event":"could not branch Ubuntu repository","Level":"error","Location":"ubuntu.go:177","Time":"2017-11-29 08:56:40.829539","error":"exit status 3","output":"bzr: ERROR: short readline in the readvfile hunk: '\u003chtml\u003e\u003cframeset\u003e \u003cframe id=\'top\' src=\"http'\n"}
Nov 29 16:56:40 172.19.11.1 clair[1200]: {"Event":"an error occured when fetching update","Level":"error","Location":"updater.go:220","Time":"2017-11-29 08:56:40.829735","error":"could not download requested resource","updater name":"ubuntu"}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

reasonerjt picture reasonerjt  路  3Comments

pingcrosby picture pingcrosby  路  3Comments

steveal picture steveal  路  3Comments

xiaosadexiaohai picture xiaosadexiaohai  路  3Comments

mramanathan picture mramanathan  路  3Comments