user7997330
user7997330

Reputation: 33

Upload from GitLab to Artifactory during pipeline fails occasionally

Occasionally the first upload of artifacts during a GitLab pipeline fail.

I'm getting the following error message in the logs:

2019-08-01 13:43:14,149 [http-nio-8082-exec-187] [ERROR] (o.j.s.b.p.t.FilePersistenceHelper:87) - Failed moving 'path_to_artifactory\filestore_pre\dbRecord123.bin' to 'path_to_artifactory\filestore\5e\5ecc5f719b4442b9b04f9010646d34917aca8ca2'. Access to file denied null 2019-08-01 13:43:14,149 [http-nio-8082-exec-187] [ERROR] (o.a.w.s.RepoFilter :251) - Upload request of products-stage-qa:file_to_upload failed due to {} java.nio.file.AccessDeniedException: Failed to persist file with sha1: 5ecc5f719b4442b9b04f9010646d34917aca8ca2

This seems to happen only during builds, but not during other uploads directly by a user.

It doesn't happen all the time, and only on first tries. But I haven't found any logic when the first try fails or succeeds. It doesn't seem to have anything to do with file types or the like. I can't really determine if it has anything to do with network speeds though since I only have access to part of the infrastructure.

I found an open ticket with the same error message, but only for Conan and for us it only happens with ivy repositories

We are using Artifactory 6.9.1 and GitLab 12.0.3 starter

Upvotes: 2

Views: 633

Answers (1)

Adi Vizgan
Adi Vizgan

Reputation: 299

This looks to be a permission issue. You are getting an error message that states that the move failed due to "Access to file denied". You can try to log in to the server using the "artifactory" user and manually move the file called "path_to_artifactory\filestore_pre\dbRecord123.bin" to "path_to_artifactory\filestore\5e\5ecc5f719b4442b9b04f9010646d34917aca8ca2" and see if you have any issues with this. To log in to the server with the "artifactory" user you can use the command "sudo -s -u artifactory". You will also need to make sure that all filestore and its subdirectories are owned by the "artifactory" user and have the correct permissions.

Hope this helps.

Upvotes: 3

Related Questions