Bug Description
I get the following error when I set the MIRRORD_TCP_OUTGOING
to true
on macOS an and a JVM-based service:
2022-10-26T18:13:26.498142Z INFO ThreadId(01) mirrord_layer::go_env: replace -> hooking "runtime.goenvs_unix"
2022-10-26T18:13:26.688625Z INFO ThreadId(15) mirrord_layer::socket::hooks: 14
2022-10-26T18:13:26.718586Z INFO ThreadId(15) mirrord_layer::error: libc error (doesn't indicate a problem) >> ResponseError(
RemoteIO(
RemoteIOError {
raw_os_error: Some(
111,
),
kind: ConnectionRefused,
},
),
)
ERROR: transport error 202: connect failed: Unknown error: 111
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [./src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:735]
Process finished with exit code 2
Here are my env vars which I'm using:
DYLD_INSERT_LIBRARIES=/Users/jamowei/Library/Application Support/JetBrains/IntelliJIdea2022.2/plugins/mirrord/libmirrord_layer.dylib
LD_PRELOAD=/Users/jamowei/Library/Application Support/JetBrains/IntelliJIdea2022.2/plugins/mirrord/libmirrord_layer.so
MIRRORD_AGENT_RUST_LOG=DEBUG
RUST_LOG=DEBUG
MIRRORD_ACCEPT_INVALID_CERTIFICATES=true
MIRRORD_EPHEMERAL_CONTAINER=false
MIRRORD_SKIP_PROCESSES=
MIRRORD_OVERRIDE_ENV_VARS_INCLUDE=*
MIRRORD_IMPERSONATED_TARGET=pod/my-service-xxx
MIRRORD_TARGET_NAMESPACE=mynamespace
MIRRORD_FILE_OPS=false
MIRRORD_AGENT_TCP_STEAL_TRAFFIC=false
MIRRORD_REMOTE_DNS=true
MIRRORD_TCP_OUTGOING=true
MIRRORD_UDP_OUTGOING=false
When I set MIRRORD_TCP_OUTGOING
to false
mirroring works as expected.
Steps to Reproduce
- set
MIRRORD_TCP_OUTGOING
to true
- start
mirrord exec
with the JVM-based server
- get the error message
Backtrace
No response
Relevant Logs
2022-10-26T18:22:08.185829Z TRACE ThreadId(11) tungstenite::protocol: Frames still in queue: 0
2022-10-26T18:22:08.185827Z TRACE ThreadId(02) handle_daemon_message: mirrord_layer: enter daemon_message=TcpOutgoing(Connect(Err(RemoteIO(RemoteIOError { raw_os_error: Some(111), kind: ConnectionRefused }))))
2022-10-26T18:22:08.185831Z TRACE ThreadId(11) tokio_tungstenite::compat: /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-tungstenite-0.17.2/src/compat.rs:149 Read.read
2022-10-26T18:22:08.185834Z TRACE ThreadId(11) tokio_tungstenite::compat: /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-tungstenite-0.17.2/src/compat.rs:126 AllowStd.with_context
2022-10-26T18:22:08.185836Z TRACE ThreadId(11) tokio_tungstenite::compat: /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-tungstenite-0.17.2/src/compat.rs:152 Read.with_context read -> poll_read
2022-10-26T18:22:08.185839Z TRACE ThreadId(11) tokio_tungstenite::compat: WouldBlock
2022-10-26T18:22:08.185842Z TRACE ThreadId(02) handle_daemon_message:handle_daemon_message: mirrord_layer::outgoing::tcp: enter daemon_message=TcpOutgoing(Connect(Err(RemoteIO(RemoteIOError { raw_os_error: Some(111), kind: ConnectionRefused })))) response=Connect(Err(RemoteIO(RemoteIOError { raw_os_error: Some(111), kind: ConnectionRefused })))
2022-10-26T18:22:08.185850Z TRACE ThreadId(02) handle_daemon_message:handle_daemon_message: mirrord_layer::outgoing::tcp: Connect -> connect Err(
RemoteIO(
RemoteIOError {
raw_os_error: Some(
111,
),
kind: ConnectionRefused,
},
),
) daemon_message=TcpOutgoing(Connect(Err(RemoteIO(RemoteIOError { raw_os_error: Some(111), kind: ConnectionRefused })))) response=Connect(Err(RemoteIO(RemoteIOError { raw_os_error: Some(111), kind: ConnectionRefused })))
2022-10-26T18:22:08.185866Z TRACE ThreadId(02) handle_daemon_message:handle_daemon_message: mirrord_layer::outgoing::tcp: exit daemon_message=TcpOutgoing(Connect(Err(RemoteIO(RemoteIOError { raw_os_error: Some(111), kind: ConnectionRefused })))) response=Connect(Err(RemoteIO(RemoteIOError { raw_os_error: Some(111), kind: ConnectionRefused })))
2022-10-26T18:22:08.185871Z TRACE ThreadId(02) handle_daemon_message: mirrord_layer: exit daemon_message=TcpOutgoing(Connect(Err(RemoteIO(RemoteIOError { raw_os_error: Some(111), kind: ConnectionRefused }))))
2022-10-26T18:22:08.185876Z TRACE ThreadId(02) actix_codec::framed: attempting to decode a frame
2022-10-26T18:22:08.185906Z TRACE ThreadId(15) connect: mirrord_layer::socket::ops: exit sockfd=14 raw_address=0x70000bc22590 address_length=16
2022-10-26T18:22:08.185912Z INFO ThreadId(15) mirrord_layer::error: libc error (doesn't indicate a problem) >> ResponseError(
RemoteIO(
RemoteIOError {
raw_os_error: Some(
111,
),
kind: ConnectionRefused,
},
),
)
ERROR: transport error 202: connect failed: Unknown error: 111
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [./src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:735]
Process finished with exit code 2
Your operating system and version
macOS 12.6
Local process
/usr/bin/java: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64 - Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e - Mach-O 64-bit executable arm64e]
Local process version
openjdk version "11.0.15" 2022-04-19 LTS OpenJDK Runtime Environment Zulu11.56+19-CA (build 11.0.15+10-LTS) OpenJDK 64-Bit Server VM Zulu11.56+19-CA (build 11.0.15+10-LTS, mixed mode)
Additional Info
No response
bug