Can't upgrade self hosted from 1.0d

The steps I listed - that failed with the Alta API Back-End Crash - were what I thought you said you had just successfully run. Is that the case? That was what I understood from your saying that you successfully upgraded through the UI. There seems to also be a - presumably different - issue of not being able to upgrade using apt. Which would you like us to try?

My - more complete steps - with logs:

jhahn@snail:~/docker/configs/control2$ cat compose.yml
services:
  control:
    image: altalabs/control:1.0d-amd64
    container_name: control2
    networks:
      control_net:
        ipv4_address: 192.168.2.13
    tmpfs:
      - /run
      - /run/lock
    volumes:
      - /sys/fs/cgroup/access.scope:/sys/fs/cgroup:rw
    extra_hosts:
      - local.manage.alta.inc:0.0.0.255
    cgroup: host
    security_opt:
      - seccomp=unconfined
    tty: true
    stdin_open: true
    restart: unless-stopped
networks:
  control_net:
    external: true


jhahn@snail:~/docker/configs/control2$ docker compose up
[+] Running 1/1
 ✔ Container control2  Recreated                                                                                                                                        0.1s 
Attaching to control2
control2  | systemd 249.11-0ubuntu3.12 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
control2  | Detected virtualization docker.
control2  | Detected architecture x86-64.
control2  | 
control2  | Welcome to Ubuntu 22.04.4 LTS!
control2  | 
control2  | Queued start job for default target Graphical Interface.
control2  | [  OK  ] Created slice Slice /system/modprobe.
control2  | [  OK  ] Created slice Slice /system/postgresql.
control2  | [  OK  ] Created slice User and Session Slice.
control2  | [  OK  ] Started Dispatch Password …ts to Console Directory Watch.
control2  | [  OK  ] Started Forward Password R…uests to Wall Directory Watch.
control2  | [  OK  ] Reached target Local Encrypted Volumes.
control2  | [  OK  ] Reached target Path Units.
control2  | [  OK  ] Reached target Remote File Systems.
control2  | [  OK  ] Reached target Slice Units.
control2  | [  OK  ] Reached target Swaps.
control2  | [  OK  ] Reached target Local Verity Protected Volumes.
control2  | [  OK  ] Listening on Syslog Socket.
control2  | [  OK  ] Listening on initctl Compatibility Named Pipe.
control2  | [  OK  ] Listening on Journal Socket (/dev/log).
control2  | [  OK  ] Listening on Journal Socket.
control2  | [  OK  ] Reached target Socket Units.
control2  |          Starting Journal Service...
control2  |          Starting Set the console keyboard layout...
control2  |          Starting Remount Root and Kernel File Systems...
control2  | [  OK  ] Finished Remount Root and Kernel File Systems.
control2  |          Starting Create System Users...
control2  | [  OK  ] Started Journal Service.
control2  |          Starting Flush Journal to Persistent Storage...
control2  | [  OK  ] Finished Create System Users.
control2  |          Starting Create Static Device Nodes in /dev...
control2  | [  OK  ] Finished Set the console keyboard layout.
control2  | [  OK  ] Finished Create Static Device Nodes in /dev.
control2  | [  OK  ] Reached target Preparation for Local File Systems.
control2  | [  OK  ] Reached target Local File Systems.
control2  |          Starting Set console font and keymap...
control2  | [  OK  ] Finished Flush Journal to Persistent Storage.
control2  |          Starting Create Volatile Files and Directories...
control2  | [  OK  ] Finished Create Volatile Files and Directories.
control2  |          Starting SSH Host Keys...
control2  |          Starting Network Name Resolution...
control2  | [  OK  ] Reached target System Time Set.
control2  |          Starting Record System Boot/Shutdown in UTMP...
control2  | [  OK  ] Finished Record System Boot/Shutdown in UTMP.
control2  | [  OK  ] Reached target System Initialization.
control2  | [  OK  ] Started Daily apt download activities.
control2  | [  OK  ] Started Daily apt upgrade and clean activities.
control2  | [  OK  ] Started Daily dpkg database backup timer.
control2  | [  OK  ] Started Periodic ext4 Onli…ata Check for All Filesystems.
control2  | [  OK  ] Started Daily rotation of log files.
control2  | [  OK  ] Started Message of the Day.
control2  | [  OK  ] Started Run system activit…ounting tool every 10 minutes.
control2  | [  OK  ] Started Generate summary o…esterday's process accounting.
control2  | [  OK  ] Started Daily Cleanup of Temporary Directories.
control2  | [  OK  ] Reached target Basic System.
control2  | [  OK  ] Reached target Timer Units.
control2  | [  OK  ] Listening on D-Bus System Message Bus Socket.
control2  | [  OK  ] Started Regular background program processing daemon.
control2  | [  OK  ] Started D-Bus System Message Bus.
control2  |          Starting Network Manager...
control2  | [  OK  ] Started Save initial kernel messages after boot.
control2  |          Starting Dispatcher daemon for systemd-networkd...
control2  |          Starting Authorization Manager...
control2  |          Starting System Logging Service...
control2  |          Starting Resets System Activity Logs...
control2  |          Starting User Login Management...
control2  |          Starting WPA supplicant...
control2  | [  OK  ] Finished Resets System Activity Logs.
control2  | [  OK  ] Started System Logging Service.
control2  | [  OK  ] Started Network Name Resolution.
control2  | [  OK  ] Reached target Host and Network Name Lookups.
control2  | [  OK  ] Started User Login Management.
control2  | [  OK  ] Started WPA supplicant.
control2  | [  OK  ] Started Authorization Manager.
control2  | [  OK  ] Started Network Manager.
control2  | [  OK  ] Reached target Network.
control2  |          Starting Alta Labs Controller...
control2  |          Starting A high performanc… and a reverse proxy server...
control2  |          Starting PostgreSQL Cluster 15-main...
control2  |          Starting Permit User Sessions...
control2  | [  OK  ] Started Unattended Upgrades Shutdown.
control2  |          Starting Hostname Service...
control2  | [  OK  ] Finished Permit User Sessions.
control2  | [  OK  ] Started Console Getty.
control2  | [  OK  ] Created slice Slice /system/getty.
control2  | [  OK  ] Reached target Login Prompts.
control2  | [  OK  ] Started Hostname Service.
control2  |          Starting Network Manager Script Dispatcher Service...
control2  | [  OK  ] Started Dispatcher daemon for systemd-networkd.
control2  | [  OK  ] Started Network Manager Script Dispatcher Service.
control2  | [  OK  ] Started A high performance…er and a reverse proxy server.
control2  | [  OK  ] Finished Set console font and keymap.
control2  | [  OK  ] Created slice User Slice of UID 109.
control2  |          Starting User Runtime Directory /run/user/109...
control2  | [  OK  ] Finished User Runtime Directory /run/user/109.
control2  |          Starting User Manager for UID 109...
control2  | [FAILED] Failed to start User Manager for UID 109.
control2  | See 'systemctl status user@109.service' for details.
control2  | [  OK  ] Started Session c1 of User postgres.
control2  |          Stopping User Runtime Directory /run/user/109...
control2  | [  OK  ] Stopped User Runtime Directory /run/user/109.
control2  | [  OK  ] Started Session c2 of User postgres.
control2  | [  OK  ] Finished SSH Host Keys.
control2  |          Starting OpenBSD Secure Shell server...
control2  | [  OK  ] Started OpenBSD Secure Shell server.
control2  | [  OK  ] Removed slice User Slice of UID 109.
control2  | [  OK  ] Created slice User Slice of UID 109.
control2  |          Starting User Runtime Directory /run/user/109...
control2  | [  OK  ] Finished User Runtime Directory /run/user/109.
control2  |          Starting User Manager for UID 109...
control2  | [FAILED] Failed to start User Manager for UID 109.
control2  | See 'systemctl status user@109.service' for details.
control2  | [  OK  ] Started Session c3 of User postgres.
control2  |          Stopping User Runtime Directory /run/user/109...
control2  | [  OK  ] Stopped User Runtime Directory /run/user/109.
control2  | [  OK  ] Removed slice User Slice of UID 109.
control2  |          Stopping A high performanc… and a reverse proxy server...
control2  | [  OK  ] Stopped A high performance…er and a reverse proxy server.
control2  |          Starting A high performanc… and a reverse proxy server...
control2  | [  OK  ] Started A high performance…er and a reverse proxy server.
control2  | [  OK  ] Started Alta Labs Controller.
control2  | 
control2  | Ubuntu 22.04.4 LTS 1c9f22c784ad console
control2  | 

In Firefox, went to 192.168.2.13.
Gave it activation code and email.
Clicked “New Product Activation” link that was emailed to me.
When I then tried to log in I got “Incorrect Email or Password” and was sent an email “Alta API Back-End Crash” with contents:

POST /fe/oops
SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at /usr/share/access/be/access.js:2:1959910
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /usr/share/access/be/access.js:2:1947417
    at async y.pgPool (/usr/share/access/be/access.js:2:2017501)
    at async t.handler (/usr/share/access/be/access.js:2:1947399)

The first two posts represent my primary issue.

Updating from the web interface fails with an auth error.

Trying to do the apt update/upgrade you suggested fails at postgres upgrade.

Backend crash error emails also get sent if I try to login with existing credentials vs signing up again with the same ones.

I’ve outlined the steps I followed in the post above, along with the associated error messages for clarity. The process should be straightforward to replicate.

It may be helpful if you could share the specific steps you’re taking to reproduce the issue, as it appears they may not align with the examples provided by multiple users.

2 Likes

So, this morning I started again from scratch and createda new install. I went part way through the process - Just the activation, not the user sign-up. I left it all day and just came back to it to complete the process. Signed up and got into the web interface and went to System and clicked check - was offered 1.1b. I was never offered this or any other option before.

I clicked the update button and left it to do its thing. Came back to find an nginx bad gateway error - as I’d had before.

Connecting to the instance to investigate I find the following with a journalctl -xe :

Apr 24 17:17:32 a307ad078e7b sudo[1008]:     root : PWD=/usr/share/access/be ; USER=alta ; COMMAND=/usr/bin/node access.js
Apr 24 17:17:32 a307ad078e7b sudo[1008]: pam_limits(sudo:session): Could not set limit for 'core' to soft=-1, hard=-1: Operation not permitted; uid=0,euid=0
Apr 24 17:17:32 a307ad078e7b sudo[1008]: pam_unix(sudo:session): session opened for user alta(uid=1000) by (uid=0)
Apr 24 17:17:32 a307ad078e7b access[1009]: /usr/share/access/be/node_modules/sharp/lib/sharp.js:121
Apr 24 17:17:32 a307ad078e7b access[1009]:   throw new Error(help.join('\n'));
Apr 24 17:17:32 a307ad078e7b access[1009]:   ^
Apr 24 17:17:32 a307ad078e7b access[1009]: Error: Could not load the "sharp" module using the linux-x64 runtime
Apr 24 17:17:32 a307ad078e7b access[1009]: Unsupported CPU: Prebuilt binaries for linux-x64 require v2 microarchitecture
Apr 24 17:17:32 a307ad078e7b access[1009]: Possible solutions:
Apr 24 17:17:32 a307ad078e7b access[1009]: - Ensure optional dependencies can be installed:
Apr 24 17:17:32 a307ad078e7b access[1009]:     npm install --include=optional sharp
Apr 24 17:17:32 a307ad078e7b access[1009]: - Ensure your package manager supports multi-platform installation:
Apr 24 17:17:32 a307ad078e7b access[1009]:     See https://sharp.pixelplumbing.com/install#cross-platform
Apr 24 17:17:32 a307ad078e7b access[1009]: - Add platform-specific dependencies:
Apr 24 17:17:32 a307ad078e7b access[1009]:     npm install --os=linux --cpu=x64 sharp
Apr 24 17:17:32 a307ad078e7b access[1009]: - Consult the installation documentation:
Apr 24 17:17:32 a307ad078e7b access[1009]:     See https://sharp.pixelplumbing.com/install
Apr 24 17:17:32 a307ad078e7b access[1009]:     at Object.<anonymous> (/usr/share/access/be/node_modules/sharp/lib/sharp.js:121:9)
Apr 24 17:17:32 a307ad078e7b access[1009]:     at Module._compile (node:internal/modules/cjs/loader:1364:14)
Apr 24 17:17:32 a307ad078e7b access[1009]:     at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
Apr 24 17:17:32 a307ad078e7b access[1009]:     at Module.load (node:internal/modules/cjs/loader:1203:32)
Apr 24 17:17:32 a307ad078e7b access[1009]:     at Module._load (node:internal/modules/cjs/loader:1019:12)
Apr 24 17:17:32 a307ad078e7b access[1009]:     at Module.require (node:internal/modules/cjs/loader:1231:19)
Apr 24 17:17:32 a307ad078e7b access[1009]:     at require (node:internal/modules/helpers:177:18)
Apr 24 17:17:32 a307ad078e7b access[1009]:     at Object.<anonymous> (/usr/share/access/be/node_modules/sharp/lib/constructor.js:10:1)
Apr 24 17:17:32 a307ad078e7b access[1009]:     at Module._compile (node:internal/modules/cjs/loader:1364:14)
Apr 24 17:17:32 a307ad078e7b access[1009]:     at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
Apr 24 17:17:32 a307ad078e7b access[1009]: Node.js v18.20.2
Apr 24 17:17:32 a307ad078e7b sudo[1008]: pam_unix(sudo:session): session closed for user alta
Apr 24 17:17:32 a307ad078e7b systemd[1]: access.service: Main process exited, code=exited, status=1/FAILURE

Obviously access fails to start and this seems to be the issue:

Unsupported CPU: Prebuilt binaries for linux-x64 require v2 microarchitecture
1 Like

The successful steps that you’re using would be very helpful. If they work for us, then all that really needs to be done is adding a note to the docker setup instructions. If they don’t work, then you know you have some work to do - and you won’t feel you’re on some wild goose chase.

We’re using the steps in the article here: https://help.alta.inc/hc/en-us/articles/25411696788507-Setting-Up-Alta-Control-With-Docker

Followed the article step-by-step, substituting the local subnet and desired IP address as specified.

Completed activation and registering new user.

Under Alta Control Version, selecting Check displays version v1.1b as available. The update completes successfully upon selection.

To update the base Ubuntu distribution within the container, execute the following commands:
1. docker exec -it control /bin/bash
2. apt update – indicates that 129 packages require updates
3. apt upgrade – initiates the upgrade process

apt upgrade command fails (hangs) exactly as described in the previous posts:

Replacing config file /etc/postgresql-common/createcluster.conf with new version

Progress: [ 96%] [#############################################################...]

Consistent with previous tests run and documented above.

Thanks. The confusing part of this thread is that we have multiple different reports mixed together, none of which can be replicated by our team. I’ll continue looking at them, but I want to again encourage everyone to share a fresh set of steps to reproduce and include their journalctl logs along with any web dev console errors. I know I’ve asked for this before, but everyone keeps snipping out bits and pieces – please share the full outputs without excluding anything that you think is irrelevant.

The journalctl output is too big to fit in a message. Also is there anything that shouldn’t be public in those various json bits that go in the log?

You can also email support@alta.inc for direct support to ensure that no private information is leaked.

Turns out the problem I was having was that I wasn’t recreating my local account. I was assuming that it was using cloud based credential verification. Once I created a local account, I was able to login and upgrade control using the UI. Thanks Josh.

2 Likes

It should be noted that you cannot login with existing credentials on a new instance. There are no existing credentials and you must create a new account. I have made this more explicit in our article for clarity.

1 Like

Given the lack of response and the absence of an updated Docker image, I assume that the locally hosted Docker control is no longer a supported product?

The docker and lxc images are unofficially supported, and will remain so for the foreseeable future. As noted, the reports in this thread are not reproducible, so I have asked again for the full unabridged logs from journalctl and the web dev console. You should also include the terminal stdout, for thoroughness.

Alta should remove the locally hosted LXC/Docker Image from the product offerings on your website or update that section of your website to clearly state these are “unofficially supported”. You should consider refunding anyone who purchased a $50 license prior to making them free if you do not officially support what you sold.

I apologize for any misunderstanding. The unofficial support only means that we will not be able to debug your bespoke environment with the same capacity which we would be able to apply to official product support. The software itself is supported, and you are witnessing it in real time here.

Please, if I may reiterate, provide the complete steps to reproduce and include the unabridged logs as requested. As commented above, if you are worried about sensitive data, please share the information with us at support@alta.inc for privacy.

2 Likes

Clearly I feel working with a beta product (LXC/Docker/VM Image) but at least their email support is responsive (which is rare for prosumer products sold at consumer products price).

1 Like

I’ve been away for a week or so but I’m not sure what you want. The problem I have is very clear in the log output I provided. The same error is repeated multiple times, presumably as the service start retries. The issue causes the access service to fail to start and I presume was the cause of my inital issue of getting the

502 Bad Gateway


nginx/1.18.0 (Ubuntu)

error that caused me this frustration in the first instance.

Neither

npm install --os=linux --cpu=x64 sharp

nor

npm install --include=optional sharp

help.

Can also confirm the issue with stock advice to speed along updates by running a full apt update within the container. The latest version of postgresql-15 provided in jammy-pdgd, 15.13-1.pgdg22.04+1, cannot complete installation. The dpkg setup hooks spin endlessly and fail unless manually killed. control’s dependency on postgresql-15 mean upgrades to control will try to pull in offending PSQL updates. If a full (normal) apt upgrade is ever attempted, you enter a deadlock where exporting the data becomes impossible (because PSQL is now not runnable and not exportable through normal means), and the controller’s data lives there. Running the controller is also impossible without the database online.

Why is the config not using volumes for volatile data to support rebuilds in this instance? Starting from scratch and apt-pinning the version of PSQL would be the only workaround here. +1 on the questions in this thread as to why the docker image is never rebuilt and is internally using a deb package repo/apt to manage software updates. Can we support a non-containerized version of this software?