HTTP outcall error SysTransient Connection refused

My HTTP outcall does not work, any clue what I am missing?

let body = gpt_body_generation(download_url);

    let body_json = serde_json::to_string(&body).map_err(|e| e.to_string())?;

    // Looks good: {"model":"dall-e-3","n":1,"prompt":"A cute baby sea otter","size":"1024x1024"}
    print(format!("--------------------> {}", body_json));

    let request_headers = vec![
        HttpHeader {
            name: "Content-Type".to_string(),
            value: "application/json".to_string(),
        }
    ];

    let request = CanisterHttpRequestArgument {
        url: "https://us-central1-xxxxx-ipv6.cloudfunctions.net/openai/".to_string(),
        method: HttpMethod::POST,
        body: Some(body_json.into_bytes()),
        max_response_bytes: None,
        transform: None,
        headers: request_headers,
    };

    match http_request_outcall(request, 10_000_000_000).await {
        Ok((response,)) => {
            let str_body = String::from_utf8(response.body)
                .expect("Transformed response is not UTF-8 encoded.");

            Ok(())
        }
        Err((r, m)) => {
            let message = format!("HTTP request error. RejectionCode: {:?}, Error: {}", r, m);
            Err(message)
        }
    }

Same in JS works fine - i.e. my proxy to use IPv6 for the call works fine:

const response = await fetch(
			`https://us-central1-xxxxxx-ipv6.cloudfunctions.net/openai/`,
			{
				method: 'POST',
				headers: {
					'Content-Type': 'application/json'
				},
				body: JSON.stringify({
					model: 'dall-e-3',
					prompt: 'A cute baby sea otter',
					n: 1,
					size: '1024x1024'
				})
			}
		);

		if (!response.ok) {
			console.error('Response not ok!', response);
			return;
		}

		const result = await response.json();
		console.log('OK', result);

The error just says the following:

juno-satellite-1 | Feb 28 18:24:10.182 INFO s:wl44v-wrkxf-oha2r-ip3hg-hzodh-7eu6u-c6jmc-mpupc-i3hw3-vfedz-lae/n:m62ac-gftga-hraen-72o6n-tggo4-wwypg-xaji3-brl6g-jlgu6-lu2jw-7qe/ic_replicated_state/subnet_call_context_manager Received the response for HttpRequest with callback id 34 from CanisterId(jx5yt-yyaaa-aaaal-abzbq-cai)
juno-satellite-1 | 2024-02-28 18:07:59.778000965 UTC: [Canister jx5yt-yyaaa-aaaal-abzbq-cai] HTTP request error. RejectionCode: SysTransient, Error: error trying to connect: Connection refused (os error 111)

Starting my Docker container a new blank volume solved the issue. :man_shrugging:

Anyway if it works, it works.

juno-satellite-1 | 2024-02-28 19:54:40.277962293 UTC: [Canister jx5yt-yyaaa-aaaal-abzbq-cai] ------RESPONSE--------------> {“created”:1709150078,“data”:[{“revised_prompt”:“Visualize a charming baby sea otter. The otter is adorably small with a light brown, fluffy coat. It’s floating contentedly on its back in serene blue-green ocean waters, its tiny paws folded over its round belly. Rays of the sun filter through the water, casting a peaceful glow around the otter, who looks at ease in its natural habitat. Distant waves form a sparkling and harmonious background, providing a setting of calm and serenity that complements the otter’s playful and tranquil spirit.”,“url”:“https://oaidalleapiprodscus.blob.core.windows.net/private/org-0VwyX9I7hRN2Kb6rDovnq2qM/user-VclZasefvIrUds2IFnFV28Em/img-9aTawqO2p85nKSCgNOv1aBpw.png?st=2024-02-28T18%3A54%3A38Z&se=2024-02-28T20%3A54%3A38Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-02-27T22%3A21%3A15Z&ske=2024-02-28T22%3A21%3A15Z&sks=b&skv=2021-08-06&sig=B0Jq%2BwUc6kaoYwS2W4/tw4VYUn7PYDqt1n7bDmnAoPU%3D”}]}
juno-satellite-1 | 2024-02-28 19:54:40.277962293 UTC: [Canister qhbym-qaaaa-aaaaa-aaafq-cai] Indexed: 0 waiting : 60s