Can't upgrade self hosted from 1.0d

I just had to recreate my controller because it just stopped working completely - just giving ‘Bad Gateway’ errors. I’ve rebuild the controller docker container with:

docker run -it --security-opt seccomp=unconfined --cgroupns host --add-host local.manage.alta.inc:0.0.0.255 --net=control_net --restart=unless-stopped -v /sys/fs/cgroup/access.scope:/sys/fs/cgroup:rw --tmpfs /run --tmpfs /run/lock --name control altalabs/control:1.0d-amd64

Activated it and logged in. However I can’t update from 1.0d which I think I’ll need to because all my ap’s are running >2.0g from the previous contoller install.

If I try to update from the interface I’m just getting


main.90faac52.js:2 
 GET https://local.kmqmwt32f2c.ddns.manage.alta.inc/api/controller/check-updates…NjkwMywiZXhwIjoxNzQ3NTg4OTAzfQ.pIrBKjJm23tVCA8HmTfNLbkl4esdpNnuA0t9xiHyKL4 400 (Bad Request)

main.90faac52.js:2 auth fail
main.90faac52.js:2 Error: [object Object]
    at main.90faac52.js:2:361433
    at d (main.90faac52.js:2:1644439)
    at Generator.<anonymous> (main.90faac52.js:2:1645782)
    at Generator.next (main.90faac52.js:2:1644802)
    at r (main.90faac52.js:2:1637734)
    at s (main.90faac52.js:2:1637937)
main.90faac52.js:2 
 POST https://local.kmqmwt32f2c.ddns.manage.alta.inc/api/fe/oops 400 (Bad Request)

errors in the web console.

Does anyone have any ideas please?

Cross posted for visibility because I’m pulling my hair out.

Launch a shell within your container and try to apt update && apt upgrade -y

That doesn’t work. The postgress upgrade stalls the update/upgrade process and it never completes.

I had that same problem trying to move control to new hardware. I ended up exporting my old docker image. I think Alta Labs needs to release a new image. You might try shutting down postgresql (and maybe killing /sbin/init) before upgrading. Maybe someone from Alta Labs could try this?

I’ve tried rebuilding and upgrading this so many times now I’m prepared to try anything at this point but I have tried stoping postgresql - I’ll try again, this time killing /sbin/init as you suggest.

You’re right though there needs to be a new image, this problem is easily repeatable by anyone.

Ok, that didn’t work either.

Unless I’m missing something, this is what I’d refer to as a “show stopper” regression. Self hosted controller is uninstallable for new users.

Yup. I don’t think there is any way for anyone to run a new instance of the controller and it’s not a new issue either.

I’d consider it abandoned.

Going to have to dig out my old kit now :frowning:

Have you tried setting it up with compose? I created a yaml for the purpose here that may be helpful.

I’m pretty sure I tried that before giving up and modifying it to use an image I exported. Have you tried it? Why not just release an updated docker image?

If need be I could futz around and probably get postgres upgraded - my background is in database internals and I’m fairly familiar with postgres. Seems like it would be easier for folks at Alta Labs to fix this though.

Unfortunately this changes nothing, the result is the same. Postgres upgrade hangs still.

Setting up python3-apt (2.4.0ubuntu4) ...
Setting up postgresql-common (277.pgdg22.04+1) ...
Installing new version of config file /etc/postgresql-common/pg_upgradecluster.d/analyze ...
Replacing config file /etc/postgresql-common/createcluster.conf with new version

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

I’ll spin up a fresh instance today and investigate further so we can get our engineers to take a look if necessary.

3 Likes

We had no issue running the update from the UI at Settings -> System. Can’t reproduce your example.

Hmm. Not sure what’s going on. More than one of us has had this problem.

Just tried it again.
Steps I went through:
Stopped my working control docker image.
Started a new one with “docker compose up”
Gave it activation code and email.
Clicked “New Produce 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)

Yup this is the same issue, I have loads of these backend crash errors emailed to me,..

It appears you do not understand the issue at hand. The distributed Docker container currently in use is significantly outdated—it includes an older version of the Alta Labs controller and contains 128 outdated packages within the Ubuntu distribution.

While updating the controller via the UI does successfully install the latest controller version, it does not address the outdated Ubuntu packages or apply necessary security updates. As a result, the system remains in an unstable and unsupported state.

When accessing the container via shell and attempting to run apt update && apt upgrade, the following error is encountered:

dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

Manually running dpkg --configure -a resolves this issue and allows the update process to proceed. However, the upgrade process then hangs at the following step:

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

This behavior further contributes to the instability of the environment and effectively blocks the completion of critical system updates.

Best practice would be for Alta Labs to update the docker image with each release of the control software to ensure everything is secure and up-to-date from both an OS level and with the control application.

1 Like

Is there some background processing that’s going on that we need to wait for after creating a new instance? Ie We can create the instance, login but need to wait for some cron job or something to run on you end before it can be upgraded using the web interface?

Have you tried doing this from outside the Alta network, which is what we’re all doing?

There appears to be a mix of issues reported by 3 different people in this thread.

Can each of you please document your exact steps to reproduce, and provide complete logs and outputs? None of these issues are replicable in our environments.