Note that I posted this issue to the RPi networking subforum but have yet to 
receive a reply.

I have two Raspberry Pi 4s running Buster. The are connected via WiFi to the 
same LAN. They run essentially identical software the job of which is to 
capture an image from a USB webcam, process that image and badge it with 
weather information and then upload the image to a web host. This morning I 
noticed that one of the Pies was failing to upload the image. 

From My Log on the machine that fails:
Sun Aug 24 04:14:05 +07 2025 Convert ended, uploading file size 62325
curl: (6) Could not resolve host: mine.com
From resolve.conf
pi@raspmountain:~/webcam $ cat /etc/resolv.conf
# Generated by resolvconf
nameserver 8.8.8.8
nameserver 1.1.1.1
The curl code that fails:
host=sftp://mine.com/~/public_html/
        curl -s -S -u me: \
        --connect-timeout 25 \
        --max-time 40 \
        --retry 3 \
        --pubkey ~/.ssh/id_rsa.pub \
        -T $file $host >> $log 2>&1
Two curls that work fine on the same machine:
curl -s 
"http://api.openweathermap.org/data/2.5/weather?id=$city&APPID=$dev_key&units=metric";
 -o $wx
202508240405 OWM OK
Clouds

curl -s "https://api.airvisual.com/v2/nearest_city?lat=12.76&lon=99.96\
&key=$key” -o $aqijson
202508240405 AirVisual OK
From the machine that works:

My log
Sun Aug 24 04:14:23 +07 2025 Convert ended, uploading file size 72074
Sun Aug 24 04:14:28 +07 2025 Upload Ended 0 - raspcondo
resolv.conf
pi@raspcondo:~/webcam $ cat /etc/resolv.conf
# Generated by resolvconf
nameserver 8.8.8.8
nameserver 1.1.1.1
The code that works:
host=sftp://mine.com/~/public_html/
        curl -s -S -u me: \
        --connect-timeout 25 \
        --max-time 40 \
        --retry 3 \
        --pubkey ~/.ssh/id_rsa.pub \
        -T $file $host >> $log 2>&1
I was not on site when this happened, so I resolved the issue by remotely power 
cycling the Pi that failed to resolve the host. That worked.

I would like to understand what was going on here and how I can avoid the 
problem in the future.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to