0
votes

Artifactory 5.8.4 Professional

Chef Development Kit Version: 1.1.16

chef-client version: 12.17.44

delivery version: master (83358fb62c0f711c70ad5a81030a6cae4017f103)

berks version: 5.2.0

kitchen version: 1.14.2

In Artifactory, I have this repository (virtual): avirtual-repo

Berksfile contains:

# cat Berksfile
# vim: ft=berksfile.ruby:

source "http://artifactory-server:8181/artifactory/api/chef/avirtual-repo"

cookbook "top_level_cookbook_name", ">= 0.0.0"

When, I'm running berks install, it sometimes succeeds (takes time to fetch cookbook and dependent cookbook versions that it finds during berks install process) and most of the times, it fails with the following Timeout error messages.

For a successful run in Jenkins for berks intsall: I see this:

06:27:39 Resolving cookbook dependencies...
06:27:39 Fetching cookbook index from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo...
06:27:50 Installing active_directory (2.1.16) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
06:27:50 Installing dependent_project1 (3.0.19) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
...
......
....
bunch of more cookbooks are downloaded and it works
the end result is, I see a Berkshelf.lock file as expected in the workspace folder, containing locked versions for the top level cookbooks and its dependent cookbooks
.....
...
06:35:47 
06:35:47 -- Next steps - starts here onwards

For a FAILED run of berks intstall in Jenkins: I see the following errors:

Error messages: /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:805:in `gets': execution expired ( Faraday::TimeoutError )

[2019-03-06T10:25:27.447804 #74360] ERROR -- : Actor crashed!

[2019-03-06T10:25:37.451708 #74360] ERROR -- : Couldn't cleanly terminate all actors in 10 seconds!

Full Console output of Failed run:

10:19:12 Resolving cookbook dependencies...
10:19:12 Fetching cookbook index from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo...
10:19:24 Installing active_directory (2.1.16) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:19:24 Installing apache_commons (0.3.8) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:19:24 Installing dependent_project1 (3.0.19) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:19:24 Installing automation_library (2.0.7) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:19:24 Installing chef_scripts (1.4.0) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:20:20 Installing dependent_project2 (4.10.20) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:20:21 Installing cots_database (7.1.0) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:20:21 Installing database (7.1.1) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:20:22 Installing db_devops (6.1.701) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:21:19 Installing dependent_project3 (3.3.20) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:21:19 Installing top_level_cookbook_name (0.1.6) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:21:20 Installing global_domains (0.1.1) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:21:20 Installing dependent_project4 (1.1.13) from http://artifactory-server:8181/artifactory/api/chef/avirtual-repo ([opscode] http://artifactory-server:8181/artifactory/api/chef/avirtual-repo/api/v1)
10:25:37 /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:805:in `gets': execution expired (Faraday::TimeoutError)
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:805:in `block in parse_header'
10:25:37    from /opt/chefdk/embedded/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:801:in `parse_header'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:784:in `read_header'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:561:in `get_header'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1299:in `do_get_header'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1245:in `do_get_block'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1019:in `block in do_request'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1133:in `protect_keep_alive_disconnected'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1014:in `do_request'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:856:in `request'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/adapter/httpclient.rb:36:in `call'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/request/retry.rb:116:in `call'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/ridley-5.1.0/lib/ridley/middleware/follow_redirects.rb:67:in `perform_with_redirection'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/ridley-5.1.0/lib/ridley/middleware/follow_redirects.rb:60:in `call'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/response.rb:8:in `call'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:140:in `get'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/community_rest.rb:116:in `find'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/community_rest.rb:100:in `download'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/downloader.rb:61:in `try_download'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/downloader.rb:35:in `block in download'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/downloader.rb:34:in `each'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/downloader.rb:34:in `download'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/installer.rb:105:in `install'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'
10:25:37    from (celluloid):0:in `remote procedure call'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in `value'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/proxies/cell_proxy.rb:17:in `_send_'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/pool_manager.rb:41:in `_send_'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/pool_manager.rb:140:in `method_missing'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'
10:25:37    from (celluloid):0:in `remote procedure call'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/future.rb:104:in `value'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/future.rb:68:in `value'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/installer.rb:175:in `map'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/installer.rb:175:in `install_from_universe'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/installer.rb:39:in `run'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/berksfile.rb:422:in `install'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/cli.rb:143:in `install'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/cli.rb:52:in `dispatch'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/cli.rb:27:in `execute!'
10:25:37    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/bin/berks:5:in `<top (required)>'
10:25:37    from /usr/bin/berks:49:in `load'
10:25:37    from /usr/bin/berks:49:in `<main>'
10:25:37 E, [2019-03-06T10:25:27.447804 #74360] ERROR -- : Actor crashed!
10:25:37 Faraday::TimeoutError: execution expired
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:805:in `gets'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:805:in `block in parse_header'
10:25:37    /opt/chefdk/embedded/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:801:in `parse_header'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:784:in `read_header'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:561:in `get_header'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1299:in `do_get_header'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1245:in `do_get_block'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1019:in `block in do_request'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1133:in `protect_keep_alive_disconnected'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1014:in `do_request'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:856:in `request'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/adapter/httpclient.rb:36:in `call'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/request/retry.rb:116:in `call'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/ridley-5.1.0/lib/ridley/middleware/follow_redirects.rb:67:in `perform_with_redirection'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/ridley-5.1.0/lib/ridley/middleware/follow_redirects.rb:60:in `call'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/response.rb:8:in `call'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:140:in `get'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/community_rest.rb:116:in `find'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/community_rest.rb:100:in `download'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/downloader.rb:61:in `try_download'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/downloader.rb:35:in `block in download'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/downloader.rb:34:in `each'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/downloader.rb:34:in `download'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-5.2.0/lib/berkshelf/installer.rb:105:in `install'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'
10:25:37    /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'
10:25:37 E, [2019-03-06T10:25:37.451708 #74360] ERROR -- : Couldn't cleanly terminate all actors in 10 seconds!
10:25:37 
10:25:37 -- OK berks install failed, see console output above. Exiting Gracefully -- Berks Install Failed -- 
10:25:37 

Looking at the source code of the gems .rb file, I see somewhere it talks about Timeout limit being 600 (seconds), but I think that's enough as during a successful run, everything works within 1-3 minutes. A failed run takes about 6-7 minutes before it finally times out by killing the whole single process thread.

1

1 Answers

0
votes

One simple simple solution is to restart Artifactory service on the machine.

OR

Try this solution: To change the source file for the gem and bump the values. Save it, retry berks install to see. Restart Chef if required.

For ex:: Change values in the following file, line containing options and values i.e. retry to 3, retry_interval to 1 or 2, open_timeout to 60 and timeout to 60.

# ls -l /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-api-client-3.0.0/lib/berkshelf/api_client/connection.rb
-rw-r--r-- 1 root root 2651 Dec 15  2016 /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/berkshelf-api-client-3.0.0/lib/berkshelf/api_client/connection.rb
[superuser@chefserver ~]
# grep timeout: $_

      options         = {retries: 3, retry_interval: 0.5, open_timeout: 30, timeout: 30}.merge(options)

[superuser@chefserver ~]
#

Here is related info: https://github.com/berkshelf/berkshelf/issues/1287#issuecomment-60674084

Now, the important thing was what could possibly cause these error messages on the first place, when berks install is running (which fetch chef cookbook artifacts from a source repository (Artifactory) especially after berks shelf uninstall i.e. cleanup of Berks SHELF (cache area). It turned out that if you run a heave AQL (either using curl -uU:pass ... -T aql.json or jfrog rt s ... --spec aql.json (both json files have different syntax (jfrog cli --spec aql.json requires more outside {, } brackets) for same AQL search), then you'll notice, console output for that particular run (via CLI or some automation) will NOT return an output very quickly and in some cases, it'll take infinite time. If you have processes which runs such AQLs very often (ex: running from different runs of a / multiple Jenkins jobs) then berks install may get these errors intermittently.

Also, even if you Control + ^C (kill or any other way) kill that curl/jfrog command line run, it'll do something in Artifactory and possibly all future berks install runs will still get these timeout errors continuously until artifactory service restart is performed as that will help resolve berks timeout issue (for now).

One should consider picking the following approaches (specially picking the latter one than 1st):

  1. berks shelf uninstall + berks install (i.e. clean the shelf/cache and then, fetch dependent cookbooks versions - latest from a given source ex: Artifactory here AND update berk's CACHE)
  2. berks update + berks install -- this will make any berks cmd faster (as you're not cleaning the whole cache and recreating it from scratch - as berks install after berks shelf uninstall takes time 1-10+ minutes depending upon a cookbook artifact's no. of other cookbook dependencies/tree/graph search).

See this post on How to use Artifactory AQL .json files using curl and jfrog cli: JFrog CLI can't set properties on an artifact in JFrog Artifactory for the first property name and using SSH key examples for multi property search

See here how berks update works: What exactly does "berks update <cookbook-name>" do? or

For more info on Berkshelf see here: https://docs.chef.io/berkshelf.html

One possible solution is to try creating (or modifying) ~/.berkshelf/config.json and adding this to see if it helps?

{
  "api": {
    "timeout": 3000
  }
}