我已经安装了景观(本地)使用 quickstart 在新的 Ubuntu 1804LTS 安装上安装 19.10https://docs.ubuntu.com/landscape/en/landscape-install-quickstart。
我已经成功注册了 Ubuntu 1804 LTS 客户端,但是在尝试查看软件包时 https://landscapeurl/account/standalone/computer/3/packages 我在应用服务器日志中收到以下错误
File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 129, in publish
obj = request.traverse(obj)
File "/usr/lib/python2.7/dist-packages/zope/publisher/browser.py", line 560, in traverse
ob = super(BrowserRequest, self).traverse(ob)
File "/usr/lib/python2.7/dist-packages/zope/publisher/http.py", line 457, in traverse
ob = super(HTTPRequest, self).traverse(obj)
File "/usr/lib/python2.7/dist-packages/zope/publisher/base.py", line 260, in traverse
obj = publication.traverseName(self, obj, entry_name)
File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 198, in traverseName
ob2 = adapter.publishTraverse(request, nm)
File "/opt/canonical/landscape/canonical/routes/publisher.py", line 137, in publishTraverse
view = queryMultiAdapter((self.context, request), name=name)
File "/usr/lib/python2.7/dist-packages/zope/component/_api.py", line 123, in queryMultiAdapter
return sitemanager.queryMultiAdapter(objects, interface, name, default)
File "/usr/lib/python2.7/dist-packages/zope/interface/registry.py", line 359, in queryMultiAdapter
objects, interface, name, default)
File "/usr/lib/python2.7/dist-packages/zope/interface/adapter.py", line 541, in queryMultiAdapter
result = factory(*objects)
File "/opt/canonical/landscape/canonical/landscape/ui/package/dashboard.py", line 70, in __init__
if self._has_no_packages:
File "/usr/lib/python2.7/dist-packages/zope/cachedescriptors/property.py", line 71, in __get__
value = func(inst)
File "/opt/canonical/landscape/canonical/landscape/ui/package/dashboard.py", line 118, in _has_no_packages
no_packages_count = self._computer_counts["no-packages"]
File "/usr/lib/python2.7/dist-packages/zope/cachedescriptors/property.py", line 71, in __get__
value = func(inst)
File "/opt/canonical/landscape/canonical/landscape/ui/package/dashboard.py", line 109, in _computer_counts
return self._counts[0]
File "/usr/lib/python2.7/dist-packages/zope/cachedescriptors/property.py", line 71, in __get__
value = func(inst)
File "/opt/canonical/landscape/canonical/landscape/ui/package/dashboard.py", line 105, in _counts
return self._search.get_computer_counts()
File "/opt/canonical/landscape/canonical/landscape/model/package/search.py", line 221, in get_computer_counts
counts = self._get_computer_counts_external()
File "/opt/canonical/landscape/canonical/landscape/model/package/search.py", line 301, in _get_computer_counts_external
account_id=account_id, computer_ids=computer_ids)
File "/opt/canonical/landscape/canonical/landscape/model/package/client.py", line 38, in query
return self._query(method, params)
File "/opt/canonical/landscape/canonical/landscape/model/package/client.py", line 58, in _query
raise PackageSearchConnectionError(str(error))
PackageSearchConnectionError: Error 65: necessary data rewind wasn't possible
我可以查看已注册客户端的所有其他属性,即硬件、进程等,没有任何错误。
有人能提供进一步的帮助吗?我将不胜感激。
答案1
发现问题了;因为我们有公司代理服务器,“no_proxy”环境变量缺少 localhost。我认为 PYCurl 在后台用于查询在 localhost 上监听的包搜索服务;看起来它使用了 http_proxy、https_proxy 和 no_proxy 环境变量。
导航至 lo 接口时使用 tcpdump https://landscapeurl/account/standalone/computer/3/packages。在该跟踪中发现请求我们公司代理服务器的名称解析的数据包。
更新了 /etc/vironment 中的 no_proxy 环境变量,服务器重新启动,现在它可以正常工作