Closed Arryboom closed 5 months ago
2023-11-18T04:26:27.399641Z ERROR tunnel{peer="127.0.0.1:37174" forwarded_for="8.8.8.8" id="018be0a8-f0d9-7ec1-8399-14dfe175433b" remote="127.0.0.1:55111"}: wstunnel::tunnel::io: error while reading from websocket rx Unexpected EOF
2023-11-18T04:26:27.400209Z INFO tunnel{peer="127.0.0.1:37174" forwarded_for="8.8.8.8" id="018be0a8-f0d9-7ec1-8399-14dfe175433b" remote="127.0.0.1:55111"}: wstunnel::tunnel::io: Closing local rx <== websocket rx tunnel
2023-11-18T04:26:27.400500Z INFO tunnel{peer="127.0.0.1:37174" forwarded_for="8.8.8.8" id="018be0a8-f0d9-7ec1-8399-14dfe175433b" remote="127.0.0.1:55111"}: wstunnel::tunnel::io: Closing local tx ==> websocket tx tunnel
2023-11-18T04:26:28.597271Z INFO wstunnel::tunnel::server: Accepting connection
2023-11-18T04:26:28.597771Z INFO tunnel{peer="127.0.0.1:36974"}: wstunnel::tunnel::server: Request X-Forwarded-For: "8.8.8.8" 2023-11-18T04:26:28.598100Z INFO tunnel{peer="127.0.0.1:36974" forwarded_for="8.8.8.8" id="018be0ae-1ac1-7759-be03-c99a6bdb24f4" remote="127.0.0.1:55111"}: wstunnel::udp: Opening UDP connection to 127.0.0.1:55111 2023-11-18T04:26:28.598247Z INFO tunnel{peer="127.0.0.1:36974" forwarded_for="8.8.8.8" id="018be0ae-1ac1-7759-be03-c99a6bdb24f4" remote="127.0.0.1:55111"}: wstunnel::tunnel::server: connected to Udp { timeout: None } Ipv4(127.0.0.1) 55111 thread 'tokio-runtime-worker' panicked at library/std/src/time.rs:408:33: overflow when adding duration to instant note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ./ss.sh: line 2: 65592 Aborted ./wstunnel server --restrict-http-upgrade-path-prefix 8L1lVWhuPkQAeeFd ws://127.0.0.1:5566 --restrict-to 127.0.0.1:55111 root@db-west-130109:/soft/ws# root@db-west-130109:/soft/ws# RUST_BACKTRACE=1 ./ss.sh 2023-11-19T08:42:22.011821Z INFO wstunnel: WsServerConfig { socket_so_mark: None, bind: 127.0.0.1:5566, restrict_to: Some(["127.0.0.1:55111"]), websocket_ping_frequency: None, timeout_connect: 10s, websocket_mask_frame: false, tls: false } 2023-11-19T08:42:22.012341Z INFO wstunnel::tunnel::server: Starting wstunnel server listening on 127.0.0.1:5566 2023-11-19T08:42:22.165462Z INFO wstunnel::tunnel::server: Accepting connection 2023-11-19T08:42:22.166375Z INFO tunnel{peer="127.0.0.1:52784"}: wstunnel::tunnel::server: Request X-Forwarded-For: "8.8.8.8" 2023-11-19T08:42:22.166924Z INFO tunnel{peer="127.0.0.1:52784" forwarded_for="8.8.8.8" id="018be6be-bcfd-7d11-acfb-2951cff24f2b" remote="127.0.0.1:55111"}: wstunnel::udp: Opening UDP connection to 127.0.0.1:55111 2023-11-19T08:42:22.167215Z INFO tunnel{peer="127.0.0.1:52784" forwarded_for="8.8.8.8" id="018be6be-bcfd-7d11-acfb-2951cff24f2b" remote="127.0.0.1:55111"}: wstunnel::tunnel::server: connected to Udp { timeout: None } Ipv4(127.0.0.1) 55111 2023-11-19T22:07:27.735475Z ERROR tunnel{peer="127.0.0.1:52784" forwarded_for="8.8.8.8" id="018be6be-bcfd-7d11-acfb-2951cff24f2b" remote="127.0.0.1:55111"}: wstunnel::tunnel::io: error while reading from websocket rx Unexpected EOF 2023-11-19T22:07:27.736010Z INFO tunnel{peer="127.0.0.1:52784" forwarded_for="8.8.8.8" id="018be6be-bcfd-7d11-acfb-2951cff24f2b" remote="127.0.0.1:55111"}: wstunnel::tunnel::io: Closing local rx <== websocket rx tunnel 2023-11-19T22:07:27.736275Z INFO tunnel{peer="127.0.0.1:52784" forwarded_for="8.8.8.8" id="018be6be-bcfd-7d11-acfb-2951cff24f2b" remote="127.0.0.1:55111"}: wstunnel::tunnel::io: Closing local tx ==> websocket tx tunnel 2023-11-19T22:07:51.207965Z INFO wstunnel::tunnel::server: Accepting connection 2023-11-19T22:07:51.208615Z INFO tunnel{peer="127.0.0.1:44730"}: wstunnel::tunnel::server: Request X-Forwarded-For: "8.8.8.8" 2023-11-19T22:07:51.208951Z INFO tunnel{peer="127.0.0.1:44730" forwarded_for="8.8.8.8" id="018be9a0-2e08-74ea-ab36-79e01a0ed39e" remote="127.0.0.1:55111"}: wstunnel::udp: Opening UDP connection to 127.0.0.1:55111 2023-11-19T22:07:51.209069Z INFO tunnel{peer="127.0.0.1:44730" forwarded_for="8.8.8.8" id="018be9a0-2e08-74ea-ab36-79e01a0ed39e" remote="127.0.0.1:55111"}: wstunnel::tunnel::server: connected to Udp { timeout: None } Ipv4(127.0.0.1) 55111 thread 'tokio-runtime-worker' panicked at library/std/src/time.rs:408:33: overflow when adding duration to instant stack backtrace: 0: rust_begin_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5 1: core::panicking::panic_fmt at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14 2: core::panicking::panic_display at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:150:5 3: core::panicking::panic_str at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:134:5 4: core::option::expect_failed at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/option.rs:1988:5 5: tokio::time::interval::Interval::poll_tick 6: tokio::time::interval::Interval::tick::{{closure}}::{{closure}} at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/time/interval.rs:445:36 7: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/future/poll_fn.rs:58:9 8: tokio::time::interval::Interval::tick::{{closure}} at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/time/interval.rs:447:17 9: wstunnel::tunnel::io::propagate_read::{{closure}}::{{closure}} at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/macros/select.rs:524:49 10: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/future/poll_fn.rs:58:9 11: wstunnel::tunnel::io::propagate_read::{{closure}} at /home/runner/work/wstunnel/wstunnel/src/tunnel/io.rs:36:24 12: wstunnel::tunnel::server::server_upgrade::{{closure}}::{{closure}} at /home/runner/work/wstunnel/wstunnel/src/tunnel/server.rs:151:90 13: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9 14: tokio::runtime::task::core::Core<T,S>::poll::{{closure}} at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/core.rs:328:17 15: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/loom/std/unsafe_cell.rs:16:9 16: tokio::runtime::task::core::Core<T,S>::poll at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/core.rs:317:30 17: tokio::runtime::task::harness::poll_future::{{closure}} at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/harness.rs:485:19 18: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 19: std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 20: std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 21: std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 22: tokio::runtime::task::harness::poll_future at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/harness.rs:473:18 23: tokio::runtime::task::harness::Harness<T,S>::poll_inner at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/harness.rs:208:27 24: tokio::runtime::task::harness::Harness<T,S>::poll at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/harness.rs:153:15 25: tokio::runtime::task::raw::poll at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/raw.rs:276:5 26: tokio::runtime::task::raw::RawTask::poll at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/raw.rs:200:18 27: tokio::runtime::task::LocalNotified<S>::run
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/mod.rs:408:9
28: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/scheduler/multi_thread/worker.rs:576:18
29: tokio::runtime::coop::with_budget
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/coop.rs:107:5
30: tokio::runtime::coop::budget
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/coop.rs:73:5
31: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/scheduler/multi_thread/worker.rs:575:9
32: tokio::runtime::scheduler::multi_thread::worker::Context::run
33: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}}
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/scheduler/multi_thread/worker.rs:491:21
34: tokio::runtime::context::scoped::Scoped<T>::set
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/context/scoped.rs:40:9
35: tokio::runtime::context::set_scheduler::{{closure}}
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/context.rs:176:26
36: std::thread::local::LocalKey<T>::try_with
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/local.rs:270:16
37: std::thread::local::LocalKey<T>::with
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/local.rs:246:9
38: tokio::runtime::context::set_scheduler
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/context.rs:176:17
39: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/scheduler/multi_thread/worker.rs:486:9
40: tokio::runtime::context::runtime::enter_runtime
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/context/runtime.rs:65:16
41: tokio::runtime::scheduler::multi_thread::worker::run
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/scheduler/multi_thread/worker.rs:478:5
42: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/scheduler/multi_thread/worker.rs:447:45
43: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/blocking/task.rs:42:21
44: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/core.rs:328:17
45: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/loom/std/unsafe_cell.rs:16:9
46: tokio::runtime::task::core::Core<T,S>::poll
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/core.rs:317:30
47: tokio::runtime::task::harness::poll_future::{{closure}}
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/harness.rs:485:19
48: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9
49: std::panicking::try::do_call
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
50: std::panicking::try
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
51: std::panic::catch_unwind
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
52: tokio::runtime::task::harness::poll_future
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/harness.rs:473:18
53: tokio::runtime::task::harness::Harness<T,S>::poll_inner
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/harness.rs:208:27
54: tokio::runtime::task::harness::Harness<T,S>::poll
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/harness.rs:153:15
55: tokio::runtime::task::raw::poll
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/raw.rs:276:5
56: tokio::runtime::task::raw::RawTask::poll
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/raw.rs:200:18
57: tokio::runtime::task::UnownedTask<S>::run
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/task/mod.rs:445:9
58: tokio::runtime::blocking::pool::Task::run
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/blocking/pool.rs:159:9
59: tokio::runtime::blocking::pool::Inner::run
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/blocking/pool.rs:513:17
60: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/blocking/pool.rs:471:13
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
./ss.sh: line 2: 68364 Aborted ./wstunnel server --restrict-http-upgrade-path-prefix 123456ABCDEFG ws://127.0.0.1:5566 --restrict-to 127.0.0.1:55111
setup was like
wstunnel client->CDN->nginx->wstunnel server
command was like: -> client
./wstunnel client -L udp://127.0.0.1:55111:127.0.0.1:55111?timeout_sec=0 --http-upgrade-path-prefix 123456ABCDEFG wss://www.google.com
->server
./wstunnel server --restrict-http-upgrade-path-prefix 123456ABCDEFG ws://127.0.0.1:5566 --restrict-to 127.0.0.1:55111
Hello,
Thank you for reporting the issue. I don't have a computer at hand at the moment, and will likely be able to take a look at ot sunday.
In the meantime, would you mind starting the server with RUST_BACKTRACE=full
and RUST_LOG=DEBUG
env variables set, and post the result. of the crash.
Thanks in advance
Would you mind trying this pre-release and letting me know if you still encounter the issue ? https://github.com/erebe/wstunnel/releases/tag/v7.9.4
Would you mind trying this pre-release and letting me know if you still encounter the issue ? https://github.com/erebe/wstunnel/releases/tag/v7.9.4
Thank you so much,gonna try this version with RUST_BACKTRACE=full and RUST_LOG=DEBUG to see if it crashes again:)
Would you mind trying this pre-release and letting me know if you still encounter the issue ? https://github.com/erebe/wstunnel/releases/tag/v7.9.4
Hi it's been over 3 days and no new error log showed,I think it might be fixed
Thanks, it got released with v8.0.0 version
I've been setup the latest version behind cdn and wrap wireguard's data flow,things runs great.
how ever each 2days or more the server will panic and exit by itself.
I tried rerun it with rusttrace=1 to capture logs like below:
full log gonna paste in below