Closed telemix closed 9 months ago
I'm away at the moment. I'll have a look at this once I'm back home in a couple of weeks.
Is it possible that creative Procrastination comes to the rescue here?
https://anvil.works/forum/t/no-module-named-functools-when-using-anvil-app-server/18591/7
Possibly :)
Do i need to update the anvil docker image within amoni or do I just pull the latest version of the app server directly in docker (eg something like docker pull) ?
I don;t know how to do either, but it would be good to know that I'm banging my head against the right method ... :)
-- David Wylie @.***
On Wed, 13 Sep 2023, at 17:51, Owen Campbell wrote:
Is it possible that creative Procrastination comes to the rescue here?
— Reply to this email directly, view it on GitHub https://github.com/anvilistas/amoni/issues/25#issuecomment-1718064392, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3CVT4PNDUIAGWWCXOIN33X2HXANANCNFSM6AAAAAA4M6HNNQ. You are receiving this because you authored the thread.Message ID: @.***>
sorry I can't look into this properly right now. Life is getting in the way.
Try amoni start --update
which should update the docker image for you.
Same error here! Ubuntu 22.04 also.
It fails on Debian 12, Ubuntu 22.04 and Centos 9. The centos output is here :
[+] Running 4/4l app and database servers
✔ Network demo_default Created 0.1s
✔ Volume "demo_postgresql" Created 0.0s
✔ Container demo-db-1 Healthy 0.0s
✔ Container demo-app-1 Created 0.0s
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "anvil-app-server": executable file not found in $PATH: unknown
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /root/.local/pipx/venvs/amoni/lib64/python3.9/site-packages/amoni/cli/amoni.py:54 in start │
│ │
│ 51 │ │ api.build_image("app") │
│ 52 │ │ api.pull_image("db") │
│ 53 │ with echo.working("Starting anvil app and database servers"): │
│ ❱ 54 │ │ api.start_service("app", detach=True) │
│ 55 │ echo.progress("Your app is available at http://localhost:3030") │
│ 56 │ if launch: │
│ 57 │ │ typer.launch("http://localhost:3030") │
│ │
│ ╭──── locals ────╮ │
│ │ launch = True │ │
│ │ update = False │ │
│ ╰────────────────╯ │
│ │
│ /root/.local/pipx/venvs/amoni/lib64/python3.9/site-packages/amoni/api.py:110 in start_service │
│ │
│ 107 │ detach │
│ 108 │ │ Whether to detach from the service console │
│ 109 │ """ │
│ ❱ 110 │ docker.compose.up([name], detach=detach) │
│ 111 │
│ 112 │
│ 113 def stop_services() -> None: │
│ │
│ ╭──── locals ────╮ │
│ │ detach = True │ │
│ │ name = 'app' │ │
│ ╰────────────────╯ │
│ │
│ /root/.local/pipx/venvs/amoni/lib64/python3.9/site-packages/python_on_whales/components/compose/ │
│ cli_wrapper.py:749 in up │
│ │
│ 746 │ │ │ services = to_list(services) │
│ 747 │ │ │ full_cmd += services │
│ 748 │ │ # important information is written to both stdout AND stderr. │
│ ❱ 749 │ │ run(full_cmd, capture_stdout=quiet, capture_stderr=quiet) │
│ 750 │ │
│ 751 │ def version(self) -> str: │
│ 752 │ │ """Returns the version of docker compose as a `str`.""" │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ abort_on_container_exit = False │ │
│ │ attach_dependencies = False │ │
│ │ build = False │ │
│ │ color = True │ │
│ │ detach = True │ │
│ │ force_recreate = False │ │
│ │ full_cmd = [PosixPath('/usr/bin/docker'), 'compose', 'up', '--detach', 'app'] │ │
│ │ log_prefix = True │ │
│ │ no_attach_services = None │ │
│ │ no_build = False │ │
│ │ pull = None │ │
│ │ quiet = False │ │
│ │ recreate = True │ │
│ │ remove_orphans = False │ │
│ │ scales = {} │ │
│ │ self = <python_on_whales.components.compose.cli_wrapper.ComposeCLI object │ │
│ │ at 0x7f8b4e8f03a0> │ │
│ │ services = ['app'] │ │
│ │ start = True │ │
│ │ wait = False │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /root/.local/pipx/venvs/amoni/lib64/python3.9/site-packages/python_on_whales/utils.py:194 in run │
│ │
│ 191 │ │ │ │ │ completed_process.stderr, │
│ 192 │ │ │ │ ) │
│ 193 │ │ │
│ ❱ 194 │ │ raise DockerException( │
│ 195 │ │ │ args, │
│ 196 │ │ │ completed_process.returncode, │
│ 197 │ │ │ completed_process.stdout, │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ args = ['/usr/bin/docker', 'compose', 'up', '--detach', 'app'] │ │
│ │ capture_stderr = False │ │
│ │ capture_stdout = False │ │
│ │ completed_process = CompletedProcess(args=['/usr/bin/docker', 'compose', 'up', '--detach', │ │
│ │ 'app'], returncode=1) │ │
│ │ env = {} │ │
│ │ input = None │ │
│ │ return_stderr = False │ │
│ │ stderr_dest = None │ │
│ │ stdout_dest = None │ │
│ │ subprocess_env = { │ │
│ │ │ 'SHELL': '/bin/bash', │ │
│ │ │ 'HISTCONTROL': 'ignoredups', │ │
│ │ │ 'HOSTNAME': 'centos-s-1vcpu-2gb-sfo3-01', │ │
│ │ │ 'HISTSIZE': '1000', │ │
│ │ │ 'PWD': '/root/demo', │ │
│ │ │ 'LOGNAME': 'root', │ │
│ │ │ 'XDG_SESSION_TYPE': 'tty', │ │
│ │ │ 'MOTD_SHOWN': 'pam', │ │
│ │ │ 'HOME': '/root', │ │
│ │ │ 'LANG': 'en_US.UTF-8', │ │
│ │ │ ... +22 │ │
│ │ } │ │
│ │ tty = False │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
DockerException: The docker command executed was `/usr/bin/docker compose up --detach app`.
It returned with code 1
The content of stdout can be found above the stacktrace (it wasn't captured).
The content of stderr can be found above the stacktrace (it wasn't captured).
Is Amoni dead? This issue is STILL persisting.
It's open source. Anyone is welcome to contribute.
It looks like the image build failed silently:
https://github.com/anvilistas/amoni/actions/runs/6169626033/job/16744258595#step:6:8961
It looks like the image build failed silently:
https://github.com/anvilistas/amoni/actions/runs/6169626033/job/16744258595#step:6:8961
Is that something I'm doing wrong?
It looks like the image build failed silently: https://github.com/anvilistas/amoni/actions/runs/6169626033/job/16744258595#step:6:8961
Is that something I'm doing wrong?
Definitely not!
There's a docker image that gets automatically built and deployed whenever the anvil app server itself is updated. The last time that happened, the build failed silently. I don't yet understand why!
It looks like the image build failed silently: https://github.com/anvilistas/amoni/actions/runs/6169626033/job/16744258595#step:6:8961
Is that something I'm doing wrong?
Definitely not!
There's a docker image that gets automatically built and deployed whenever the anvil app server itself is updated. The last time that happened, the build failed silently. I don't yet understand why!
Ah ok. Cheers.
I've had some issues running recent versions of anvil-app-server on Ubuntu (no Docker involved). Have you tried using version 1.7.3?
No, I need to try it with various different versions but just haven't had the time.
This should now be fixed. There are new images for both the app server and the db which you can use with:
amoni start --upgrade
Watch out if you have an existing db. The new image uses postgresql 16 and it will fail to start if you have a db from the older image because that used postgresql 15.
If you only want to upgrade the app server and leave the db untouched, use:
docker compose pull app
amoni start
Just to say it seems to be working fine for me now as well. Thanks!
I am following your getting started instructions, and it all seems work right up to the final docker compose up, when I get this :
There is an empty error.log file in ./logs.
I'm not sure where the PATH should be pointing, or even which PATH it is referring to (maybe there's one in the container?)
Any help gratefully received...
I'm running on Ubuntu 22.04.