0

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.

4

1 回答 1

0

一种简单的简单解决方案是在机器上重新启动Artifactory 服务。

或者

试试这个解决方案:更改 gem 的源文件并增加值。保存,重试berks install看看。如果需要,重新启动 Chef。

例如::更改以下文件中的值,包含行options和值,即重试为 3,retry_interval为 1 或 2,open_timeout为 60,超时为 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 ~]
#

以下是相关信息:https ://github.com/berkshelf/berkshelf/issues/1287#issuecomment-60674084

现在,重要的是什么可能首先导致这些错误消息,当berks install运行时(从源存储库(Artifactory)获取厨师食谱工件,特别是在berks shelf uninstall清理 Berks SHELF(缓存区域)之后。结果是如果您运行大量 AQL(使用curl -uU:pass ... -T aql.jsonjfrog rt s ... --spec aql.json(两个 json 文件具有不同的语法(jfrog cli --spec aql.json 需要更多外部{}括号)用于相同的 AQL 搜索),那么您会注意到该特定运行的控制台输出(通过 CLI 或一些自动化)不会非常快速地返回输出,在某些情况下,它会花费无限时间。如果您有经常运行此类 AQL 的进程(例如:从一个/多个 Jenkins 作业的不同运行中运行),则berks install可能会间歇性地出现这些错误。

此外,即使您Control + ^C(杀死或任何其他方式)杀死该curl/jfrog命令行运行,它也会在 Artifactory 中执行某些操作,并且可能所有未来的berks install运行仍将持续收到这些超时错误,直到 执行人工服务重新启动,因为这将有助于解决问题超时问题(目前)。

应该考虑选择以下方法(特别是选择后一种方法而不是第一种方法):

  1. berks shelf uninstall+ berks install(即清理架子/缓存,然后获取相关的食谱版本 - 来自给定来源的最新版本,例如:Artifactory here AND update berk's CACHE)
  2. berks update+ berks install- 这将使任何berkscmd 更快(因为您没有清理整个缓存并从头开始重新创建它 - 因为berks install之后berks shelf uninstall需要时间 1-10 分钟以上,具体取决于食谱工件的其他食谱依赖项/树/图形搜索的数量)。

请参阅这篇关于如何 使用和cli使用 Artifactory AQL .json文件的帖子: 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 searchcurljfrog

看看这里是如何berks update工作的:“berks update <cookbook-name>”到底是做什么的?或者

有关 Berkshelf 的更多信息,请参见此处:https ://docs.chef.io/berkshelf.html

一种可能的解决方案是尝试创建(或修改)~/.berkshelf/config.json并添加它以查看是否有帮助?

{
  "api": {
    "timeout": 3000
  }
}
于 2019-03-06T22:50:39.500 回答