Build failure in rust - http server - respond with 200

I’m stuck on Stage #IA4 in rust. My code looks exactly the same as some of the examples, but I’m getting this error on build. I’m on a mac.

remote: [build] Step 5 complete.
remote: [build] Step 6 complete.
remote: [build] Step 7 complete.
remote: [build] Step 8 complete.
remote: [build] Step 9 complete.
remote: [build] Step 10 complete.
remote: [build] Error: process "/bin/sh -c mkdir /app/src" did not complete successfully: stat /var/lib/buildkit/runc-stargz/executor/resolv.conf: structure needs cleaning.
remote: [build] Build failed. Check the logs above for the reason.
remote: [build] If you think this is a CodeCrafters error, please contact us at hello@codecrafters.io

I’m unsure how to tackle this problem. /var/lib/buildkit/runc-stargz/executor/resolv.conf: doesn’t exist.

And here’s a snippet of my code:

use std::io::Write;
use std::net::TcpListener;

fn main() {
    println!("Logs from your program will appear here!");

    let listener = TcpListener::bind("127.0.0.1:4221").unwrap();

    for stream in listener.incoming() {
        match stream {
            Ok(mut _stream) => {
                println!("accepted new connection");
                _stream.write(b"HTTP/1.1 200 OK\r\n\r\n").expect("200 \n");
            }
            Err(e) => {
                println!("error: {}", e);
            }
        }
    }
}

This was a downtime issue, unrelated to your code :slight_smile: "Structure needs cleaning" errors - #16 by jessaimaya

Please let us know if you’re still running into this!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.