Improve error message for S3 errors
Opened this issue · 1 comments
Lykos153 commented
I'm getting the following error while pushing:
│ attic-api-server-765cb9fb46-qkp8b api-server thread 'tokio-runtime-worker' panicked at /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbb │
│ e8d0/aws-runtime-1.2.2/src/auth.rs:254:69: │
│ attic-api-server-765cb9fb46-qkp8b api-server called `Result::unwrap()` on an `Err` value: InvalidHeaderValue │
After reading the mentioned line of code I suspect this is due to an issue with the S3 server.
It would be great to have proper error messages for that kind of thing
Lykos153 commented
Hm. I could not find any issues with the S3 backend. I can connect just fine using awscli
from the same host. How I interpret the stackstrace is that the error occurs during signing the http request which suggests to me that the InvalidHeader doesn't originate in the S3 backend but actually somewhere in attic. However, I can't seem to figure out what I configured wrong.
Any idea?
Full stack trace
attic-api-server-57756fdcf6-zznbd api-server thread 'tokio-runtime-worker' panicked at /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/aws-runtime-1.2.2/src/auth.rs:254:69:
attic-api-server-57756fdcf6-zznbd api-server called `Result::unwrap()` on an `Err` value: InvalidHeaderValue
attic-api-server-57756fdcf6-zznbd api-server stack backtrace:
attic-api-server-57756fdcf6-zznbd api-server 0: 0x55b00d2b7a77 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h28f16e8528a6973f
attic-api-server-57756fdcf6-zznbd api-server 1: 0x55b00ceeb26b - core::fmt::write::h75b6ef8f7aee1a7c
attic-api-server-57756fdcf6-zznbd api-server 2: 0x55b00d2c8b1e - std::io::Write::write_fmt::h973b363e3c6dba24
attic-api-server-57756fdcf6-zznbd api-server 3: 0x55b00d2b77e9 - std::sys_common::backtrace::print::hf04e3a54197b934a
attic-api-server-57756fdcf6-zznbd api-server 4: 0x55b00d2a9ee7 - std::panicking::default_hook::{{closure}}::hb3640bfc4d36f569
attic-api-server-57756fdcf6-zznbd api-server 5: 0x55b00d2aaec2 - std::panicking::rust_panic_with_hook::h3a41910ac9040dcc
attic-api-server-57756fdcf6-zznbd api-server 6: 0x55b00d2b7dc2 - std::panicking::begin_panic_handler::{{closure}}::h4a1c04c4ab6c7070
attic-api-server-57756fdcf6-zznbd api-server 7: 0x55b00d2b7d19 - std::sys_common::backtrace::__rust_end_short_backtrace::h21d2f857d4d898b1
attic-api-server-57756fdcf6-zznbd api-server 8: 0x55b00d2aa246 - rust_begin_unwind
attic-api-server-57756fdcf6-zznbd api-server 9: 0x55b00c571052 - core::panicking::panic_fmt::hbd29354903ebb815
attic-api-server-57756fdcf6-zznbd api-server 10: 0x55b00c570e25 - core::result::unwrap_failed::hcf443243a02c12f7
attic-api-server-57756fdcf6-zznbd api-server 11: 0x55b00cb59df7 - aws_runtime::auth::apply_signing_instructions::hafd3723f74811d9f
attic-api-server-57756fdcf6-zznbd api-server 12: 0x55b00cb58206 - <aws_runtime::auth::sigv4::SigV4Signer as aws_smithy_runtime_api::client::auth::Sign>::sign_http_request::haa2baddde8f6d2ef
attic-api-server-57756fdcf6-zznbd api-server 13: 0x55b00c984399 - aws_smithy_runtime::client::orchestrator::try_attempt::{{closure}}::{{closure}}::ha2071364abd9b9b0
attic-api-server-57756fdcf6-zznbd api-server 14: 0x55b00c97c916 - aws_smithy_runtime::client::orchestrator::try_op::{{closure}}::{{closure}}::{{closure}}::h3b6fa0eed4e28c70
attic-api-server-57756fdcf6-zznbd api-server 15: 0x55b00c975dd3 - aws_smithy_runtime::client::orchestrator::try_op::{{closure}}::{{closure}}::h6ef00dea538b2b2d
attic-api-server-57756fdcf6-zznbd api-server 16: 0x55b00c96b262 - aws_smithy_runtime::client::orchestrator::invoke_with_stop_point::{{closure}}::{{closure}}::{{closure}}::h6c95505cc190ba03
attic-api-server-57756fdcf6-zznbd api-server 17: 0x55b00c9698bc - aws_smithy_runtime::client::orchestrator::invoke_with_stop_point::{{closure}}::hceef97b79ae60bd2
attic-api-server-57756fdcf6-zznbd api-server 18: 0x55b00c99e625 - <attic_server::storage::s3::S3Backend as attic_server::storage::StorageBackend>::upload_file::{{closure}}::hedbca64289a6a8a0
attic-api-server-57756fdcf6-zznbd api-server 19: 0x55b00c8ee52e - attic_server::api::v1::upload_path::upload_chunk::{{closure}}::h3ca0421d156986e6
attic-api-server-57756fdcf6-zznbd api-server 20: 0x55b00c8d6904 - attic_server::api::v1::upload_path::upload_path_new_unchunked::{{closure}}::hf6f8c08d8251b151
attic-api-server-57756fdcf6-zznbd api-server 21: 0x55b00c8cb853 - attic_server::api::v1::upload_path::upload_path_new::{{closure}}::hed3be796a22c257a
attic-api-server-57756fdcf6-zznbd api-server 22: 0x55b00c89d1ff - attic_server::api::v1::upload_path::upload_path::{{closure}}::{{closure}}::h9bd0bef65e3cf7ee
attic-api-server-57756fdcf6-zznbd api-server 23: 0x55b00c8992b7 - <F as axum::handler::Handler<(M,T1,T2,T3,T4),S>>::call::{{closure}}::hca13f3fc24c7b23f
attic-api-server-57756fdcf6-zznbd api-server 24: 0x55b00c80965f - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::h9fec44d7e3048852
attic-api-server-57756fdcf6-zznbd api-server 25: 0x55b00c782a84 - <axum::routing::route::RouteFuture<E> as core::future::future::Future>::poll::h0b5f69375f0acaaf
attic-api-server-57756fdcf6-zznbd api-server 26: 0x55b00c5a7bb6 - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::hdb1fb420dc61af1b
attic-api-server-57756fdcf6-zznbd api-server 27: 0x55b00c6941b1 - axum::middleware::from_fn::Next::run::{{closure}}::h93c0eb1c464f0abc
attic-api-server-57756fdcf6-zznbd api-server 28: 0x55b00c635cfb - <axum::middleware::from_fn::FromFn<F,S,I,(T1,)> as tower_service::Service<http::request::Request<axum_core::body::Body>>>::call::{{closure}}::hf14b04031a475fda
attic-api-server-57756fdcf6-zznbd api-server 29: 0x55b00c5a785d - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::h8d040fcf462b2e5d
attic-api-server-57756fdcf6-zznbd api-server 30: 0x55b00c782a84 - <axum::routing::route::RouteFuture<E> as core::future::future::Future>::poll::h0b5f69375f0acaaf
attic-api-server-57756fdcf6-zznbd api-server 31: 0x55b00c5a7bb6 - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::hdb1fb420dc61af1b
attic-api-server-57756fdcf6-zznbd api-server 32: 0x55b00c6941b1 - axum::middleware::from_fn::Next::run::{{closure}}::h93c0eb1c464f0abc
attic-api-server-57756fdcf6-zznbd api-server 33: 0x55b00c63879a - <axum::middleware::from_fn::FromFn<F,S,I,(T1,T2)> as tower_service::Service<http::request::Request<axum_core::body::Body>>>::call::{{closure}}::he0323e5110443df0
attic-api-server-57756fdcf6-zznbd api-server 34: 0x55b00c5a785d - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::h8d040fcf462b2e5d
attic-api-server-57756fdcf6-zznbd api-server 35: 0x55b00c782a84 - <axum::routing::route::RouteFuture<E> as core::future::future::Future>::poll::h0b5f69375f0acaaf
attic-api-server-57756fdcf6-zznbd api-server 36: 0x55b00c5a7bb6 - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::hdb1fb420dc61af1b
attic-api-server-57756fdcf6-zznbd api-server 37: 0x55b00c6941b1 - axum::middleware::from_fn::Next::run::{{closure}}::h93c0eb1c464f0abc
attic-api-server-57756fdcf6-zznbd api-server 38: 0x55b00c63ad0d - <axum::middleware::from_fn::FromFn<F,S,I,(T1,T2,T3)> as tower_service::Service<http::request::Request<axum_core::body::Body>>>::call::{{closure}}::h8c9a243ee4fc8768
attic-api-server-57756fdcf6-zznbd api-server 39: 0x55b00c5a785d - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::h8d040fcf462b2e5d
attic-api-server-57756fdcf6-zznbd api-server 40: 0x55b00c782a84 - <axum::routing::route::RouteFuture<E> as core::future::future::Future>::poll::h0b5f69375f0acaaf
attic-api-server-57756fdcf6-zznbd api-server 41: 0x55b00c5a7bb6 - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::hdb1fb420dc61af1b
attic-api-server-57756fdcf6-zznbd api-server 42: 0x55b00c6941b1 - axum::middleware::from_fn::Next::run::{{closure}}::h93c0eb1c464f0abc
attic-api-server-57756fdcf6-zznbd api-server 43: 0x55b00c639a48 - <axum::middleware::from_fn::FromFn<F,S,I,(T1,T2,T3)> as tower_service::Service<http::request::Request<axum_core::body::Body>>>::call::{{closure}}::h1841121209550ec6
attic-api-server-57756fdcf6-zznbd api-server 44: 0x55b00c5a785d - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::h8d040fcf462b2e5d
attic-api-server-57756fdcf6-zznbd api-server 45: 0x55b00c782a84 - <axum::routing::route::RouteFuture<E> as core::future::future::Future>::poll::h0b5f69375f0acaaf
attic-api-server-57756fdcf6-zznbd api-server 46: 0x55b00c5a7bb6 - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::hdb1fb420dc61af1b
attic-api-server-57756fdcf6-zznbd api-server 47: 0x55b00c5a7db3 - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::hdc6e6cd9b38da9b1
attic-api-server-57756fdcf6-zznbd api-server 48: 0x55b00c782a84 - <axum::routing::route::RouteFuture<E> as core::future::future::Future>::poll::h0b5f69375f0acaaf
attic-api-server-57756fdcf6-zznbd api-server 49: 0x55b00c593de1 - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::ha0a0d099948899b8
attic-api-server-57756fdcf6-zznbd api-server 50: 0x55b00c5a7333 - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::h37b2e27f028b43c0
attic-api-server-57756fdcf6-zznbd api-server 51: 0x55b00c782a84 - <axum::routing::route::RouteFuture<E> as core::future::future::Future>::poll::h0b5f69375f0acaaf
attic-api-server-57756fdcf6-zznbd api-server 52: 0x55b00c5a6cd2 - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::h143d16e50348d4ba
attic-api-server-57756fdcf6-zznbd api-server 53: 0x55b00c782a84 - <axum::routing::route::RouteFuture<E> as core::future::future::Future>::poll::h0b5f69375f0acaaf
attic-api-server-57756fdcf6-zznbd api-server 54: 0x55b00c710c44 - hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_write::hd52d77d599021871
attic-api-server-57756fdcf6-zznbd api-server 55: 0x55b00c5dad0d - <hyper_util::server::conn::auto::UpgradeableConnection<I,S,E> as core::future::future::Future>::poll::h1fea08c0c1e850cf
attic-api-server-57756fdcf6-zznbd api-server 56: 0x55b00c79565b - <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll::h8b3fc459d7415cbc
attic-api-server-57756fdcf6-zznbd api-server 57: 0x55b00c73ba27 - tokio::runtime::task::raw::poll::h9ae2b56951617c43
attic-api-server-57756fdcf6-zznbd api-server 58: 0x55b00d2fdfd0 - tokio::runtime::scheduler::multi_thread::worker::Context::run_task::hc97d4febead2bdc5
attic-api-server-57756fdcf6-zznbd api-server 59: 0x55b00d316ab6 - tokio::runtime::task::raw::poll::h502b66ce5533de0b
attic-api-server-57756fdcf6-zznbd api-server 60: 0x55b00d2e6fe3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h7dda0236e12172cb
attic-api-server-57756fdcf6-zznbd api-server 61: 0x55b00d2e6d17 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h5aef0b3d67efd009
attic-api-server-57756fdcf6-zznbd api-server 62: 0x55b00d2bcb5b - std::sys::pal::unix::thread::Thread::new::thread_start::h1307fc33aba787ab
attic-api-server-57756fdcf6-zznbd api-server 63: 0x7f28546e8a42 - start_thread
attic-api-server-57756fdcf6-zznbd api-server 64: 0x7f285476805c - __GI___clone3
attic-api-server-57756fdcf6-zznbd api-server 65: 0x0 - <unknown>