c3d / ociplex

An OCI runtime multiplexer
0 stars 0 forks source link

Error: ttrpc err: Scheme "/run/containerd/containerd.sock" is not supported #11

Closed c3d closed 1 year ago

c3d commented 1 year ago

After fixing #9, this is the message I get from the runtime.#

c3d commented 1 year ago

Tried adding the .ttrpc bit, i.e. point to /run/containerd/containerd.sock.ttrpc. I get the same message:

Error: ttrpc err: Scheme "/run/containerd/containerd.sock.ttrpc" is not supported
c3d commented 1 year ago

This is from the ttrpc Rust crate, specifically errors.rs:

/// The error type for ttrpc.
#[derive(Error, Debug, Clone)]
pub enum Error {
    #[error("socket err: {0}")]
    Socket(String),

    #[error("rpc status: {0:?}")]
    RpcStatus(Status),

    #[error("Nix error: {0}")]
    Nix(#[from] nix::Error),

    #[error("ttrpc err: local stream closed")]
    LocalClosed,

    #[error("ttrpc err: remote stream closed")]
    RemoteClosed,

    #[error("eof")]
    Eof,

    #[error("ttrpc err: {0}")]
    Others(String),
}
c3d commented 1 year ago

The source for the "Scheme is not supported" part is this code:

#[cfg(target_os = "linux")]
fn parse_sockaddr(addr: &str) -> Result<(Domain, &str)> {
    if let Some(addr) = addr.strip_prefix("unix://") {
        return Ok((Domain::Unix, addr));
    }

    if let Some(addr) = addr.strip_prefix("vsock://") {
        return Ok((Domain::Vsock, addr));
    }

    Err(Error::Others(format!("Scheme {:?} is not supported", addr)))
}

So the expectation is a unix:// sock scheme, not a file path.