AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[landscape](ubuntu)

Martin Hope
Jonas Lindau
Asked: 2024-02-27 23:19:43 +0800 CST

更改 Landscape 使用的 tmp 目录?

  • 7

如果我理解正确的话,Landscape 在运行之前会将所有脚本作为文件上传,并将它们存储在 /tmp 下。如果您使用 noexec 配置 tmp 分区,这当然是一个问题,并给我留下类似于以下的错误:

     File "/usr/lib/python3.10/os.py", line 598, in _execvpe
     exec_func(file, *argrest)
          PermissionError: [Errno 13] Permission denied: '/tmp/tmpnn0rb1qz'

那么,是否可以更改 Landscape 用于存储脚本的位置?我找不到景观配置的此类选项,配置文件中也没有任何内容。

我真的不想用 exec 配置 tmp...

landscape
  • 1 个回答
  • 26 Views
Martin Hope
SK49
Asked: 2023-09-07 19:13:49 +0800 CST

Landscape RestAPI 错误 - API 版本无效

  • 5

当使用 Postman 尝试访问 Landscape 19.10 的 API 时,我收到“无效的 API 版本”结果:

邮递员输出: 邮递员输出

构建 API 请求的步骤: 构建 API 请求的步骤

有谁知道如何找出 19.10 正在使用的 API 版本,因为我希望我可以简单地将 API 版本添加到步骤 1?

landscape
  • 2 个回答
  • 33 Views
Martin Hope
user300510
Asked: 2020-12-20 14:06:06 +0800 CST

Ubuntu Landscape - update_security_db.sh 在新的快速启动部署中失败

  • 2

我已经在 Proxmox 中运行的全新 18.04 LXC 容器上安装了 Landscape Server 19.10(快速入门)。安装没有问题,Web GUI 运行良好,并且我能够将客户端计算机连接到服务器。

不幸的是,我在 Web GUI 的通知窗格中注意到脚本update_security_db.sh每次运行时都会重复失败(根据 /etc/cron.d/landscape-server,它每小时都会失败一次)。

在此处输入图像描述

检查update-security-db.log并手动运行脚本会给我以下错误:

Dec 19 16:40:36 update-security-db ERR  Traceback (most recent call last):
Dec 19 16:40:36 update-security-db ERR    File "./process-usns", line 7, in <module>
Dec 19 16:40:36 update-security-db ERR      canonical.landscape.scripts.usn.run()
Dec 19 16:40:36 update-security-db ERR    File "/opt/canonical/landscape/canonical/landscape/scripts/batch.py", line 77, in __call__
Dec 19 16:40:36 update-security-db ERR      code = self.run()
Dec 19 16:40:36 update-security-db ERR    File "/opt/canonical/landscape/canonical/landscape/scripts/usn.py", line 40, in run
Dec 19 16:40:36 update-security-db ERR      changeset = update_from_usn_tool_db(db)
Dec 19 16:40:36 update-security-db ERR    File "/opt/canonical/landscape/canonical/landscape/model/package/usn.py", line 237, in update_from_usn_tool_db
Dec 19 16:40:36 update-security-db ERR      "WHERE id = %(temp)s.pkg_id" % {"temp": temp_table})
Dec 19 16:40:37 update-security-db ERR    File "/usr/lib/python2.7/dist-packages/storm/store.py", line 109, in execute
Dec 19 16:40:37 update-security-db ERR      return self._connection.execute(statement, params, noresult)
Dec 19 16:40:37 update-security-db ERR    File "/usr/lib/python2.7/dist-packages/storm/databases/postgres.py", line 306, in execute
Dec 19 16:40:37 update-security-db ERR      return Connection.execute(self, statement, params, noresult)
Dec 19 16:40:37 update-security-db ERR    File "/usr/lib/python2.7/dist-packages/storm/database.py", line 241, in execute
Dec 19 16:40:37 update-security-db ERR      raw_cursor = self.raw_execute(statement, params)
Dec 19 16:40:37 update-security-db ERR    File "/usr/lib/python2.7/dist-packages/storm/databases/postgres.py", line 316, in raw_execute
Dec 19 16:40:37 update-security-db ERR      return Connection.raw_execute(self, statement, params)
Dec 19 16:40:37 update-security-db ERR    File "/usr/lib/python2.7/dist-packages/storm/database.py", line 374, in raw_execute
Dec 19 16:40:37 update-security-db ERR      self._run_execution(raw_cursor, args, params, statement)
Dec 19 16:40:37 update-security-db ERR    File "/usr/lib/python2.7/dist-packages/storm/database.py", line 392, in _run_execution
Dec 19 16:40:37 update-security-db ERR      statement, params or (), error)
Dec 19 16:40:37 update-security-db ERR    File "/usr/lib/python2.7/dist-packages/storm/database.py", line 454, in _check_disconnect
Dec 19 16:40:37 update-security-db ERR      return function(*args, **kwargs)
Dec 19 16:40:37 update-security-db ERR    File "/usr/lib/python2.7/dist-packages/storm/tracer.py", line 248, in trace
Dec 19 16:40:37 update-security-db ERR      attr(*args, **kwargs)
Dec 19 16:40:37 update-security-db ERR    File "/usr/lib/python2.7/dist-packages/storm/databases/postgres.py", line 463, in connection_raw_execute_error
Dec 19 16:40:37 update-security-db ERR      statement, params, "SQL server cancelled statement")
Dec 19 16:40:37 update-security-db ERR  storm.exceptions.TimeoutError: 'SQL server cancelled statement', 'UPDATE package SET usn_id = new_package_usn_6KqW4Z.usn_id FROM new_package_usn_6KqW4Z WHERE id = new_package_usn_6KqW4Z.pkg_id', ()

每次运行update_security_db.sh时都会发生此错误。手动运行脚本时,我注意到它成功地从 Ubuntu 服务器卷曲了 USN 文件。然后它将文件传递给process_usns脚本。该脚本会运行几分钟,然后退出并出现上面显示的 SQL 错误。

我基本上直接在一个新容器上安装了landscape-server-quickstart,然后在一个新容器上再次尝试这个过程也给了我同样的问题。奇怪的是,该日志似乎暗示 SQL 服务器处理新下载的 USN 文件存在一些问题。运行脚本时 CPU 和内存利用率很好(我的容器有 4GB RAM 和 2vCPU)。这对我来说是一个问题,因为我设置 Landscape 的主要原因是为多台计算机执行补丁管理。

更新:我今天在 Ubuntu Server 18.04 的新映像上启动了 KVM 虚拟机。得到与以前完全相同的错误(好奇这个问题是否仅在 LXC 中运行时才会出现)。

landscape 18.04
  • 2 个回答
  • 224 Views
Martin Hope
Mike Fry
Asked: 2020-10-01 04:46:23 +0800 CST

任何使用 Landscape 管理 Ubuntu 桌面的人

  • 0

几年来,我一直在尝试使用 Landscape 来管理 Ubuntu 桌面。问题接连出现问题。最新的问题是 Landscape 将源列表引用留给自身。

示例输出。

cat /var/log/aaIT/aait-geue-cleanup_vpn/aait-geue-cleanup_vpn_200910105536.log 
INFO: Logging started for aait-geue-cleanup_vpn at 200910105536
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO: Can dpkg run?
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO: Initiating aait-geue-cleanup_vpn Routine
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

aait-geue-cert-renew/unknown,now 2019.07.16 all [installed,automatic]

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 landscape-profile-standalone-certificate-renewal-process-20190716 : Depends: aait-geue-cert-renew (= 2019.07.16) but it is not going to be installed
 landscape-profile-standalone-aait-geue-employee-vpn-20200325 : Depends: aait-geue-employee-vpn (= 2020.03.25) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.


WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

landscape-profile-standalone-aait-geue-employee-vpn-20200325/now 1 all [installed,local]

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  libdumbnet1 linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic
  linux-image-4.15.0-29-generic linux-modules-4.15.0-29-generic
  linux-modules-extra-4.15.0-29-generic x11proto-dri2-dev x11proto-gl-dev
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  aait-geue-employee-vpn
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/22.2 MB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 194297 files and directories currently installed.)
Preparing to unpack .../aait-geue-employee-vpn_2020.03.25_all.deb ...
+ '[' '!' -f /var/log/aaIT/build/build3.log ']'
++ dmidecode -s system-manufacturer
+ virtual='Dell Inc.'
+ [[ Dell Inc. == \V\M\w\a\r\e\,\ \I\n\c\. ]]
+ SCRIPT_NAME=preinst
+ UPDATE_PACKAGE_NAME=aait-geue-employee-vpn-pre
+ BASE_INSTALL_DIR=/.deploy
+ UPDATE_HOME=/.deploy/auto_update/aait-geue-employee-vpn-pre
+ UPDATE_LOG_DIR=/var/log/aaIT/aait-geue-employee-vpn-pre
+ UPDATE_PACKAGE_STATUS=/var/log/aaIT/aait-geue-employee-vpn-pre/aait-geue-employee-vpn-pre.status
++ /bin/date +%y%m%d%H%M%S
+ UPDATE_ME_TIMESTAMP=200910105540
++ grep VERSION_ID /etc/os-release
++ awk -F '"' '{print $2}'
+ OS_RELEASE=18.04
++ mktemp -t tmp.XXXXXXXXXX
+ SCRATCH=/tmp/tmp.byjAAYTknb
+ start_log
+ echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ echo 'INFO: Initiating aait-geue-employee-vpn-pre Package Install Routine'
INFO: Initiating aait-geue-employee-vpn-pre Package Install Routine
+ echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ '[' '!' -d /var/log/aaIT/aait-geue-employee-vpn-pre ']'
+ chmod -R 755 /var/log/aaIT/aait-geue-employee-vpn-pre
+ UPDATE_LOG_FILE=/var/log/aaIT/aait-geue-employee-vpn-pre/aait-geue-employee-vpn-pre_200910105540.log
+ export UPDATE_LOG_FILE
+ exec
+ exec
++ tee -a /var/log/aaIT/aait-geue-employee-vpn-pre/aait-geue-employee-vpn-pre_200910105540.log
++ tee -a /var/log/aaIT/aait-geue-employee-vpn-pre/aait-geue-employee-vpn-pre_200910105540.log
INFO: Logging started for aait-geue-employee-vpn-pre at 200910105540
+ echo 'INFO: Logging started for aait-geue-employee-vpn-pre at 200910105540'
+ sleep 1
+ chmod 755 /var/log/aaIT/aait-geue-employee-vpn-pre/aait-geue-employee-vpn-pre_200910105540.log
+ execute_updates
+ echo 'Removing old packages'
+ rm -f /opt/cisco/anyconnect/profile/raeEmployee.xml
Removing old packages
+ rm -f /opt/cisco/anyconnect/profile/raePartner.xml
+ rm -f /etc/cron.hourly/vpn-cert-enroll
Unpacking aait-geue-employee-vpn (2020.03.25) ...
dpkg: error processing archive /var/cache/apt/archives/aait-geue-employee-vpn_2020.03.25_all.deb (--unpack):
 trying to overwrite '/usr/local/bin/ssl-cert-check.bash', which is also in package aait-geue-cert-renew 2019.07.16
Errors were encountered while processing:
 /var/cache/apt/archives/aait-geue-employee-vpn_2020.03.25_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@USFRYLNCNDJMK2G:/home/user# 

有没有人遇到过这个问题,你是如何解决的?

landscape debian-installer
  • 1 个回答
  • 207 Views
Martin Hope
Sharad Kumar
Asked: 2020-07-29 08:08:55 +0800 CST

横向 Saas 防火墙端口

  • 1

我有一个关于 Ubuntu Landscape 的快速问题。我们将 Landscape 用作 canonical 提供的 Saas 产品,效果很好。

我们所有的计算机都已注册并连接到景观,但现在我们想在我们的网络中添加防火墙。因此,我们想知道需要在 ubuntu 服务器上打开哪些端口才能保持与景观云的持续连接。

我们还能以某种方式获得可以在边缘防火墙上列入白名单的 Landscape 服务器的 IP 地址吗?

firewall landscape
  • 1 个回答
  • 404 Views
Martin Hope
Mike
Asked: 2020-02-14 17:19:18 +0800 CST

景观问题

  • 0

我在我的内部网络上设置了一个独立的 Landscape 实例。我的问题是,当 Landscape 更新服务器上的软件包时,他们是通过 Internet 获取它们,还是从 Landscape 服务器获取它们?我正在尝试确定是否需要设置本地存储库。从文档中不清楚默认情况下会发生什么。

landscape
  • 1 个回答
  • 112 Views
Martin Hope
peperjohnny
Asked: 2020-01-18 05:49:14 +0800 CST

LXDhost 不会将包报告到容器中的景观

  • 1

伙计们,美好的一天,我在 lxd 容器中运行景观。容器处于桥接模式。我将 lxdhost 添加到景观中,效果很好,据我所知,它连接正常。但是它没有报告它的包,这使得它对于补丁管理毫无用处,正如你可以想象的那样。所有系统都运行 ubuntu 18.04。如果我手动运行landscape-package-reporter,我会收到以下错误:

sudo landscape-package-reporter 
[sudo] password for lxcuser: 
2020-01-17 14:38:53,220 ERROR    [MainThread] None
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 653, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/lib/python3/dist-packages/landscape/client/package/reporter.py", line 92, in <lambda>
result.addCallback(lambda x: self.request_unknown_hashes())
File "/usr/lib/python3/dist-packages/landscape/client/package/reporter.py", line 498, in request_unknown_hashes
self._facade.ensure_channels_reloaded()
File "/usr/lib/python3/dist-packages/landscape/lib/apt/package/facade.py", line 265, in ensure_channels_reloaded
self.reload_channels()
File "/usr/lib/python3/dist-packages/landscape/lib/apt/package/facade.py", line 253, in reload_channels
version, with_info=False).get_hash()
File "/usr/lib/python3/dist-packages/landscape/lib/apt/package/facade.py", line 402, in get_package_skeleton
return build_skeleton_apt(pkg, with_info=with_info, with_unicode=True)
File "/usr/lib/python3/dist-packages/landscape/lib/apt/package/skeleton.py", line 131, in build_skeleton_apt
version.record, "Provides", DEB_PROVIDES))
File "/usr/lib/python3/dist-packages/apt/package.py", line 690, in record
return Record(self._records.record)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 724: invalid start byte

有趣的是,所有其他容器都正常报告他们的包裹,没有任何问题。

我查看了脚本,但由于我的编程知识非常低,我找不到问题可能是什么。

也许你们中的一个人有一个想法。

server landscape container 18.04 lxd
  • 1 个回答
  • 172 Views
Martin Hope
serhumanos
Asked: 2019-11-11 08:18:36 +0800 CST

Landscape-sysinfo (VPS) 上的网络接口

  • 0

我有一个带有“landscape-sysinfo” (来自“landscape-common”包)的 VPS(Ubuntu 14.04.6 LTS)

显示信息时,它仅显示 1 个网络接口(venet0 = 127.0.0.2),而不显示第二个网络接口 venet0:0(宽度为 IPv4 外部 IP)

如何启用显示第二个网络接口 (venet0:0) 的信息?

谢谢!

networking vps landscape interface
  • 1 个回答
  • 262 Views
Martin Hope
Lync
Asked: 2019-09-15 08:43:03 +0800 CST

Ubuntu Landscape 0.01 美元/小时的定价是否基于机器运行时?

  • 0

使用Canonical的自助Landscape 1c-per-hour服务时,小时数是怎么计算的?即我的服务器全天候运行,所以显然我会为每个服务器支付 24 美分。不过,我的 POS 系统每天只开启约 8 小时。

我的问题是:Landscape 是否只向我收取每台托管机器开启的时间,还是假设每台机器都是 24x7 使用?

landscape
  • 1 个回答
  • 436 Views
Martin Hope
jtlindsey
Asked: 2019-04-26 07:29:49 +0800 CST

更改景观时区

  • 1

如何更改 Ubuntu Landscape 的时区?服务器时间是 EDT(用 设置dpkg-reconfigure tzdata),但 Landscape 将所有内容显示为 UTC

$ timedatectl
                      Local time: Thu 2019-04-25 11:22:29 EDT
                  Universal time: Thu 2019-04-25 15:22:29 UTC
                        RTC time: Thu 2019-04-25 15:22:29
                       Time zone: US/Eastern (EDT, -0400)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

Landscape 没有此处建议的“时区”设置。 在此处输入图像描述 在此处输入图像描述

landscape
  • 1 个回答
  • 228 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve