cargo-cacher
cargo-cacher copied to clipboard
WARN [cargo_cacher::index_sync] Failed to update index
Hello, could you help me pls?
what is it means? WARN [cargo_cacher::index_sync] Failed to update index how to fix this WARN?
how I run cargo-cacher: cargo-cacher -i /opt/data
Could you run it with more verbosity: cargo-cacher -ddd -i /opt/data
. When I do this same thing, it works correctly:
$ sudo mkdir /opt/data
$ sudo chown $USER:$USER /opt/data
$ cargo run -- -ddd -i /opt/data
...
2019-12-20 16:19:24 INFO [cargo_cacher] Configuration: Config { all: false, prefetch_path: None, index_path: "/opt/data", crate_path: "/opt/data/crates", git_index_path: "/opt/data/index", upstream: "https://static.crates.io/crates/", index: "https://github.com/rust-lang/crates.io-index.git", port: 8080, refresh_rate: 600, threads: 16, log_level: Trace }
2019-12-20 16:19:24 DEBUG [cargo_cacher::index_sync] Syncing git repo at /opt/data/index with https://github.com/rust-lang/crates.io-index.git
2019-12-20 16:19:24 DEBUG [cargo_cacher::index_sync] Repo path is "/opt/data/index/.git"
2019-12-20 16:19:50 TRACE [cargo_cacher::index_sync] Successfully synced
Listening on 0.0.0.0:8080
2019-12-20 16:19:50 DEBUG [hyper::server] threads = 128
Yeah, now it works, but I got new errors
[dependencies]
rand = "0.6.0"
root@debian-test:~/projects/hello_cargo# cargo build
Updating http://localhost:8080/index index
Downloaded rand v0.6.5 (registry http://localhost:8080/index)
error: failed to download replaced source registry https://github.com/rust-lang/crates.io-index
Caused by:
failed to verify the checksum of rand v0.6.5 (registry http://localhost:8080/index)
~/.cargo/config:
[source]
[source.mirror]
registry = "http://localhost:8080/index"
[source.crates-io]
replace-with = "mirror"
cargo-cacher server debug info:
root@debian-test:~/projects/hello_cargo# cargo-cacher -dd -i /opt/data
2020-01-30 15:26:21,847 INFO [cargo_cacher] Configuration: Config { all: false, prefetch_path: None, index_path: "/opt/data", crate_path: "/opt/data/crates", git_index_path: "/opt/data/index", upstream: "https://static.crates.io/crates/", index: "https://github.com/rust-lang/crates.io-index.git", extern_url: "http://localhost:8080", port: 8080, refresh_interval: 600s, threads: 16, log_level: Debug }
2020-01-30 15:26:21,847 DEBUG [cargo_cacher::index_sync] Syncing git repo at /opt/data/index with https://github.com/rust-lang/crates.io-index.git, setting API url to http://localhost:8080
2020-01-30 15:26:21,848 DEBUG [cargo_cacher::index_sync] Repo path is "/opt/data/index/.git"
Listening on :::8080
2020-01-30 15:26:22,892 DEBUG [hyper::server] threads = 8
2020-01-30 15:26:29,324 DEBUG [hyper::server] Incoming stream
2020-01-30 15:26:29,324 DEBUG [hyper::server::request] Request Line: Get AbsolutePath("/api/v1/crates/time/0.1.42/download") Http11
2020-01-30 15:26:29,324 DEBUG [hyper::server::request] Headers { Host: localhost:8080
, User-Agent: cargo 1.40.0 (bc8e4c8be 2019-11-22)
, Accept: */*
, Connection: Upgrade, HTTP2-Settings
, Upgrade: h2c
, HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
, }
2020-01-30 15:26:29,325 DEBUG [cargo_cacher] Downloading: time:0.1.42
2020-01-30 15:26:29,325 DEBUG [cargo_cacher] path "/opt/data/crates/time/0.1.42" exists!
2020-01-30 15:26:29,325 INFO [logger] GET http://localhost:8080/api/v1/crates/time/0.1.42/download 200 OK (0.141665 ms)
2020-01-30 15:26:29,325 DEBUG [hyper::server::response] writing head: Http11 Ok
2020-01-30 15:26:29,325 DEBUG [hyper::server::response] headers [
Headers { Content-Length: 243
, Content-Type: text/plain
, Access-Control-Allow-Origin: *
, Date: Thu, 30 Jan 2020 12:26:29 GMT
, }]
2020-01-30 15:26:29,325 DEBUG [hyper::server::response] write 243 bytes
2020-01-30 15:26:29,325 DEBUG [hyper::server] keep_alive = true for [::1]:55250
2020-01-30 15:26:29,325 INFO [cargo_cacher::stats] Logging a crate request to sqlite: CargoRequest { name: "time", version: "0.1.42", hit: true, size: 243 }
2020-01-30 15:26:29,326 INFO [cargo_cacher::stats] Version ID: 1
2020-01-30 15:26:29,326 DEBUG [hyper::server] ioerror in keepalive loop = Custom { kind: UnexpectedEof, error: "end of stream before headers finished" }
2020-01-30 15:26:29,326 DEBUG [hyper::server] keep_alive loop ending for [::1]:55250