To Proxmox or not to Proxmox

You need to change sources.list in /etc/apt to use the correct repos now that Bullseye is released. The error is literally telling you what to change the repo name to.

1 Like

I thought you upgraded to PVE7?

Yeah using latest Proxmox will also fix it

@tteck yes, on PVE 7.

@DavidFW1960 my sources.list is:

 1 deb http://ftp.debian.org/debian bullseye main contrib
 2
 3 deb http://ftp.debian.org/debian bullseye-updates main contrib
 4
 5 # PVE pve-no-subscription repository provided by proxmox.com,
 6 # NOT recommended for production use
 7 deb http://download.proxmox.com/debian bullseye pve-no-subscription
 8
 9 # security updates
10 deb http://security.debian.org bullseye-security main contrib
11
12 # deb http://download.proxmox.com/debian/pve bullseye pvetest

Looks correct

@tteck just tried the sed line again and zigbee2mqtt:

root@Proxmox2:/etc/apt# sed -i 's/buster\/updates/bullseye-security/g;s/buster/bullseye/g' /etc/apt/sources.list
root@Proxmox2:/etc/apt# nano sources.listroot@Proxmox2:/etc/apt# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/pve7_zigbee2mqtt_container.sh)"
[INFO] Using 'hdd2-img' for storage location.
[INFO] Container ID is 114.
Updating LXC template list...
Downloading LXC template...
Creating LXC container...
Starting LXC container...
Setting up Container OS...
Updating Container OS...
E: Repository 'http://security.debian.org buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://ftp.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://ftp.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
[ERROR:LXC] 100@35 Unknown failure occured.
[ERROR] 100@164 Unknown failure occured.

I wonder if there is some sort of cache for sources.list?

It’s on my end. Working on it now.

1 Like

Think I have found a solution, for whiskerz007 script anyway:

Effectively replace:

apt-get update

with:

apt-get --allow-releaseinfo-change update
1 Like

Thanks for the heads up! z2m 7 is fixed
Now to fix the others.

Edit: All Proxmox helpers have been fixed.

3 Likes

Hi, sorry for hijacking this discussion, but I believe my question is somewhat relevant (for some users) and can be answered by participants.

I currently have a NUC with bare-metal Ubuntu, which is where MariaDB, Influx, ZoneMinder and Plex are running. HA (core) and zigbee2mqtt are running on a dedicated Pi to keep automations intact while rebooting the NUC when updates are installed.

I have ordered new Hardware for a new Server and plan to use Proxmox in the future.

The question I have is about the Quick Sync hardware acceleration (VA-API), which Plex is currently capable of using. My plan would be to install Plex within an LXC container. I would passthrough the device (currently /dev/dri/renderD128) to the container to retain the hardware accelerated transcoding. Is this approach recommended / possible?

Additionally to that, can the hardware-acceleration be used by other containers in parallel? I specifically I have Viseron in mind, which I might use to replace ZoneMinder. In that case I think I would install Docker in another LXC, where I as well would need the device from /dev. I don’t know however if this would even be possible on a bare-metal machine (when combined with Plex). But maybe someone here has already done that. :thinking:

So essentially my question is: can the device for hardware acceleration be shared across multiple LXC containers (with optionally nested Docker containers)?

Thanks in advance. :+1:

AFAIK, serial devices connected to Proxmox can be shared with multiple LXC containers simultaneously.

1 Like

@tteck I have installed mqtt container, edited the config and it is working ok.
I have also installed zigbee2mqtt, followed the instructions to identify USB device, edited the config file however after I then start zigbee2mqtt service and check the status I get the following error:

root@zigbee2mqtt:~# systemctl status zigbee2mqtt
* zigbee2mqtt.service - zigbee2mqtt
   Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit-hit) since Wed 2021-08-18 12:45:33 BST; 19h ago
  Process: 427 ExecStart=/usr/bin/npm start (code=exited, status=0/SUCCESS)
 Main PID: 427 (code=exited, status=0/SUCCESS)
      CPU: 1.131s

Aug 18 12:45:33 zigbee2mqtt systemd[1]: zigbee2mqtt.service: Service RestartSec=100ms expired, scheduling rest
Aug 18 12:45:33 zigbee2mqtt systemd[1]: zigbee2mqtt.service: Scheduled restart job, restart counter is at 5.
Aug 18 12:45:33 zigbee2mqtt systemd[1]: Stopped zigbee2mqtt.
Aug 18 12:45:33 zigbee2mqtt systemd[1]: zigbee2mqtt.service: Consumed 1.131s CPU time.
Aug 18 12:45:33 zigbee2mqtt systemd[1]: zigbee2mqtt.service: Start request repeated too quickly.
Aug 18 12:45:33 zigbee2mqtt systemd[1]: zigbee2mqtt.service: Failed with result 'start-limit-hit'.
Aug 18 12:45:33 zigbee2mqtt systemd[1]: Failed to start zigbee2mqtt.

The config file is:

frontend:
  port: 9442
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://192.168.1.189:1883'
  user: mqtt
  password: CORRECT PASSWORD
  keepalive: 60
  reject_unauthorized: true
  version: 4
serial:
  port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
advanced:
  pan_id: GENERATE
  network_key: GENERATE
  channel: 20

I have used MQTT Explorer to connect to MQTT and that is working correctly, just cant seem to get zigbee2mqtt working :frowning:

I saw suggestions to change /etc/systemd/system/zigbee2mqtt.service β€˜ExecStart=/usr/bin/npm start’ to β€˜ExecStart=/usr/local/bin/npm start’ which I tried but that made it worse; the service wouldnt start at all after performing a systemctl daemon-reload so I switched it back. Upon reloading again, you can see below the service starts and runs ok but within seconds fails again:

* zigbee2mqtt.service - zigbee2mqtt
   Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2021-08-19 09:00:04 BST; 650ms ago
 Main PID: 1171 (npm)
    Tasks: 31 (limit: 9334)
   Memory: 45.3M
      CPU: 684ms
   CGroup: /system.slice/zigbee2mqtt.service
           |-1171 npm
           |-1182 sh -c node index.js
           |-1183 node index.js
           |-1190 /bin/sh -c npm run build
           `-1191 npm

Aug 19 09:00:04 zigbee2mqtt systemd[1]: Started zigbee2mqtt.
Aug 19 09:00:04 zigbee2mqtt npm[1171]: > [email protected] start /opt/zigbee2mqtt
Aug 19 09:00:04 zigbee2mqtt npm[1171]: > node index.js
root@zigbee2mqtt:/etc/systemd/system# systemctl status zigbee2mqtt
* zigbee2mqtt.service - zigbee2mqtt
   Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit-hit) since Thu 2021-08-19 09:00:05 BST; 8s ago
  Process: 1171 ExecStart=/usr/bin/npm start (code=exited, status=0/SUCCESS)
 Main PID: 1171 (code=exited, status=0/SUCCESS)
      CPU: 764ms

Aug 19 09:00:05 zigbee2mqtt systemd[1]: zigbee2mqtt.service: Service RestartSec=100ms expired, scheduling rest
Aug 19 09:00:05 zigbee2mqtt systemd[1]: zigbee2mqtt.service: Scheduled restart job, restart counter is at 5.
Aug 19 09:00:05 zigbee2mqtt systemd[1]: Stopped zigbee2mqtt.
Aug 19 09:00:05 zigbee2mqtt systemd[1]: zigbee2mqtt.service: Consumed 764ms CPU time.
Aug 19 09:00:05 zigbee2mqtt systemd[1]: zigbee2mqtt.service: Start request repeated too quickly.
Aug 19 09:00:05 zigbee2mqtt systemd[1]: zigbee2mqtt.service: Failed with result 'start-limit-hit'.
Aug 19 09:00:05 zigbee2mqtt systemd[1]: Failed to start zigbee2mqtt.

Any suggestions?

:thinking: From the zigbee2mqtt lxc console try this

cd /opt/zigbee2mqtt
npm start

hmmmm getting an error message with that:

root@zigbee2mqtt:/opt/zigbee2mqtt# npm start

> [email protected] start /opt/zigbee2mqtt
> node index.js

Building Zigbee2MQTT... (initial build), failed
(node:16104) UnhandledPromiseRejectionWarning: Error: Command failed: npm run build
sh: 1: tsc: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] build: `tsc && node index.js writehash`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-08-19T08_13_53_031Z-debug.log

    at ChildProcess.exithandler (child_process.js:390:12)
    at ChildProcess.emit (events.js:400:28)
    at maybeClose (internal/child_process.js:1055:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:16104) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:16104) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The output in the log file mentioned in the error screen is:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node$
9 verbose lifecycle [email protected]~build: CWD: /opt/zigbee2mqtt
10 silly lifecycle [email protected]~build: Args: [ '-c', 'tsc && node index.js writehash' ]
11 info lifecycle [email protected]~build: Failed to exec build script
12 verbose stack Error: [email protected] build: `tsc && node index.js writehash`
12 verbose stack spawn ENOENT
12 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/sp$
12 verbose stack     at ChildProcess.emit (events.js:400:28)
12 verbose stack     at maybeClose (internal/child_process.js:1055:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
13 verbose pkgid [email protected]
14 verbose cwd /opt/zigbee2mqtt
15 verbose Linux 5.11.22-3-pve
16 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
17 verbose node v14.17.5
18 verbose npm  v6.14.14
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error [email protected] build: `tsc && node index.js writehash`
23 error spawn ENOENT
24 error Failed at the [email protected] build script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

Ok, stop and remove that lxc
run the script again.
I made changes for typescript

1 Like

@tteck
Thank you - that worked. Service hasnt failed even after being live for 5 mins :slight_smile:

1 Like

Proxmox helper scripts now use Debian 11

1 Like

I had this at work this week.

ssh to the proxmox host and manually run apt update

It will say the same 'Repository β€˜http://ftp.debian.org/debian buster InRelease’ changed its β€˜Suite’ value from β€˜stable’ to β€˜oldstable’ ’ - and give you a β€œaccept y/n”

Just hit y and next time you do an apt-update it will be fine.

1 Like

@tteck sorry to keep bothering you. I blasted the zigbee2mqtt and mqtt containers (thought I would start from scratch again as Im building out a new HA lxc still but using suggestions for splitting everything down like Frenck does).

I have installed new mqtt container, done the config, however when I try to connect via MQTT Explorer I cant connect. I then built the zigbee2mqtt container, edited config etc, load the webservice but that doesnt connect either.
When I run systemctl status on the mqtt lxc I see the following:

root@mqtt:~# sudo systemctl status mosquitto
* mosquitto.service - Mosquitto MQTT Broker
     Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-08-21 11:42:17 BST; 1min 2s ago
       Docs: man:mosquitto.conf(5)
             man:mosquitto(8)
    Process: 133 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exited, status=0/SUCCESS)
    Process: 142 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto (code=exited, status=0/SUCCESS)
    Process: 144 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto (code=exited, status=0/SUCCESS)
    Process: 146 ExecStartPre=/bin/chown mosquitto /run/mosquitto (code=exited, status=0/SUCCESS)
   Main PID: 149 (mosquitto)
      Tasks: 1 (limit: 9334)
     Memory: 2.5M
        CPU: 55ms
     CGroup: /system.slice/mosquitto.service
             `-149 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

Aug 21 11:42:17 mqtt systemd[1]: Starting Mosquitto MQTT Broker...
Aug 21 11:42:17 mqtt mosquitto[149]: 1629542537: Loading config file /etc/mosquitto/conf.d/default.conf
Aug 21 11:42:17 mqtt systemd[1]: Started Mosquitto MQTT Broker.

Seems the MQTT service is working correctly so quiet strange I cant get through to MQTT. Any thoughts? Definetly not a pssword issue as I have rebuilt the mqtt lxc 5 times now and tried different usernames and passwords to no avail

The MQTT log file (found at /var/log/mosquitto/mosquitto.log) shows:

1629542323: mosquitto version 2.0.11 starting
1629542323: Config loaded from /etc/mosquitto/mosquitto.conf.
1629542323: Starting in local only mode. Connections will only be possible from clients running on this machi>
1629542323: Create a configuration file which defines a listener to allow remote access.
1629542323: For more details see https://mosquitto.org/documentation/authentication-methods/
1629542323: Opening ipv4 listen socket on port 1883.
1629542323: Opening ipv6 listen socket on port 1883.
1629542323: mosquitto version 2.0.11 running
1629542527: mosquitto version 2.0.11 terminating
1629542527: Saving in-memory database to /var/lib/mosquitto//mosquitto.db.
1629542537: mosquitto version 2.0.11 starting
1629542537: Config loaded from /etc/mosquitto/mosquitto.conf.
1629542537: Starting in local only mode. Connections will only be possible from clients running on this machi>
1629542537: Create a configuration file which defines a listener to allow remote access.
1629542537: For more details see https://mosquitto.org/documentation/authentication-methods/
1629542537: Opening ipv4 listen socket on port 1883.
1629542537: Opening ipv6 listen socket on port 1883.
1629542537: mosquitto version 2.0.11 running
1 Like