Closed uraurora closed 3 weeks ago
Hello @uraurora, thank you for reporting!
A particular dependency didn't get its version pinned, leading to this. It's fixed in this PR: #2 and already merged.
Can you please try again?
@iostreamer-X alright i tried again, and a runtime error occured this time, it seems related to 'config.json'. Am i supposed to config anything? And full log here:
thread 'main' panicked at src/common/settings/mod.rs:82:35:
Could not load config! configuration file "./config.json" not found
stack backtrace:
0: 0x555ac347eef2 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hffecb437d922f988
1: 0x555ac34a84dc - core::fmt::write::hd9a8d7d029f9ea1a
2: 0x555ac347bc7f - std::io::Write::write_fmt::h0e1226b2b8d973fe
3: 0x555ac347ecc4 - std::sys_common::backtrace::print::he907f6ad7eee41cb
4: 0x555ac348047b - std::panicking::default_hook::{{closure}}::h3926193b61c9ca9b
5: 0x555ac34801d3 - std::panicking::default_hook::h25ba2457dea68e65
6: 0x555ac348091d - std::panicking::rust_panic_with_hook::h0ad14d90dcf5224f
7: 0x555ac34807f2 - std::panicking::begin_panic_handler::{{closure}}::h4a1838a06f542647
8: 0x555ac347f3c6 - std::sys_common::backtrace::__rust_end_short_backtrace::h77cc4dc3567ca904
9: 0x555ac3480524 - rust_begin_unwind
10: 0x555ac2fd2dc5 - core::panicking::panic_fmt::h940d4fd01a4b4fd1
11: 0x555ac2fb2c69 - std::sys::sync::once::futex::Once::call::hea42e03bc76d2587
12: 0x555ac2faca00 - std::sync::once_lock::OnceLock<T>::initialize::h8d4e62d0d1f98454
13: 0x555ac304c2b0 - rusty_backend::common::settings::settings::h2ecb92b439b266a6
14: 0x555ac3005396 - tokio::runtime::park::CachedParkThread::block_on::h03676419d0641067
15: 0x555ac2ff6782 - tokio::runtime::context::runtime::enter_runtime::h7f45ac8a7eeb08bc
16: 0x555ac30132ae - tokio::runtime::runtime::Runtime::block_on::h22032340f42f925d
17: 0x555ac3021d4a - rusty_backend::main::hd2f82f9b97b19bbd
18: 0x555ac300e873 - std::sys_common::backtrace::__rust_begin_short_backtrace::h9fce6f36bc453ba7
19: 0x555ac3014399 - std::rt::lang_start::{{closure}}::h61b6d56c2d4cfa1c
20: 0x555ac3475593 - std::rt::lang_start_internal::h103c42a9c4e95084
21: 0x555ac3021e05 - main
22: 0x7f72b326bdba - <unknown>
23: 0x7f72b326be75 - __libc_start_main
24: 0x555ac2fd3471 - _start
25: 0x0 - <unknown>
Hey @uraurora
Both rusty-backend
and app.metz
need to be configured, but they come along with a configuration that works out of the box.
The error you encountered seems to be coming from rusty-backend
. It indeed relies on a config.json
ONLY IF the config is not being provided through environment variables.
If you set the env LOAD_CONFIG_FROM_ENV=true
, it will not attempt to load on file, rather will look for config on environment.
The docker-compose.yaml
file has this configured on line 20.
Based on your logs that you shared in your first comment, this is how it's kicking off the process:
[COMMAND] docker exec l4ook44o48wskwsocwoosws8 bash -c 'SOURCE_COMMIT=67c29008f438209985259600fdc98af251d30905 COOLIFY_BRANCH=main docker compose --env-file /artifacts/l4ook44o48wskwsocwoosws8/.env --project-name g880sc48osg0ws8ggwgw808w --project-directory /artifacts/l4ook44o48wskwsocwoosws8 -f /artifacts/l4ook44o48wskwsocwoosws8/docker-compose.yaml build --pull'
[OUTPUT]
#0 building with "default" instance using docker driver
Notice --env-file /artifacts/l4ook44o48wskwsocwoosws8/.env
, which is probably overriding the env-file configuration in docker-compose.yaml
.
Can you please try removing the part which loads another .env
and let the compose file do it?
Alternatively, look at:
These are environment variables that need to be present.
Hey @uraurora
Context
Both
rusty-backend
andapp.metz
need to be configured, but they come along with a configuration that works out of the box.The error you encountered seems to be coming from
rusty-backend
. It indeed relies on aconfig.json
ONLY IF the config is not being provided through environment variables.If you set the env
LOAD_CONFIG_FROM_ENV=true
, it will not attempt to load on file, rather will look for config on environment.Problem
The
docker-compose.yaml
file has this configured on line 20.Based on your logs that you shared in your first comment, this is how it's kicking off the process:
[COMMAND] docker exec l4ook44o48wskwsocwoosws8 bash -c 'SOURCE_COMMIT=67c29008f438209985259600fdc98af251d30905 COOLIFY_BRANCH=main docker compose --env-file /artifacts/l4ook44o48wskwsocwoosws8/.env --project-name g880sc48osg0ws8ggwgw808w --project-directory /artifacts/l4ook44o48wskwsocwoosws8 -f /artifacts/l4ook44o48wskwsocwoosws8/docker-compose.yaml build --pull' [OUTPUT] #0 building with "default" instance using docker driver
Notice
--env-file /artifacts/l4ook44o48wskwsocwoosws8/.env
, which is probably overriding the env-file configuration indocker-compose.yaml
.Possible Solution
Can you please try removing the part which loads another
.env
and let the compose file do it?Alternatively, look at:
- https://github.com/metz-sh/simulacrum-self-host/blob/main/rusty-backend/config.env
- https://github.com/metz-sh/simulacrum-self-host/blob/main/app.metz/.env
These are environment variables that need to be present.
Oh, I didn't notice that the configuration file had changed, it starts successfully now, thanks😁.
It seems that success is just one step away, when accessing the page, it remains in a loading state as shown below, but i cannot find anything wrong from the log
Whoa, that's weird. Can you please check network logs from browser?
My guess is the frontend app is not able to reach the server. Given server port is unchanged, can you please try reaching the server from your terminal?
curl -v http://localhost:3117/health
yeah, pretty weird, the result seems fine
* Trying 192.168.254.193:3117...
* Connected to 192.168.254.193 (192.168.254.193) port 3117 (#0)
> GET /health HTTP/1.1
> Host: 192.168.254.193:3117
> User-Agent: curl/7.79.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< content-length: 0
< date: Thu, 12 Sep 2024 01:31:53 GMT
<
* Connection #0 to host 192.168.254.193 left intact
I tried my local env instead of remote and it works well, so sure its my net issue, i'll handle it myself, thanks😁
Anytime! Thank you for reporting.
I am deploying the application using docker compose without changing any configuration, and a Rust error during the startup process. Since I am not familiar with Rust, I cannot figure out what happened. The full log is as follows.