Closed maserowik closed 3 years ago
HI @maserowik -- Please be sure to remove your credentials in the lftp_cmds.txt
, and upload_log.txt
if present, then drag the file into the comment box in this issue. That will upload and attach the log to the issue for us to review.
If you're not sure how to get the files off of your Pi, and the file contents is fairly short, you can copy/paste the contest instead. If you opt for this route, please be sure to put '~~~' ( Just the 3 ~, not the single quotes ) on the line above and below the pasted contents for easier reading. :)
Thanks!
lftp_cmds.txt
set ssl:check-hostname false
open --user " " --password " " ftp:
set net:max-retries 2
set net:timeout 20
rm -f SaveImageDay-15882
put 'image.jpg' -o 'SaveImageDay-15882' || echo 'put of image.jpg failed!' && exit
rm -f "image.jpg"
mv SaveImageDay-15882 "/domains/n3bsq.com/public_html/allsky/image//image.jpg"
exit
upload_log.txt is blank
Thanks @maserowik , can you also check either:
/var/log/allsky.log
Or
journalctl -u allsky --since today
In either output, look for the time around when the upload failed for messages related to uploading...
Thanks!
it show the upload is successfully Oct 8 11:38:12 Pi-AllSky allsky.sh[629]: STARTING EXPOSURE at: 2021-10-08 11:38:12 Oct 8 11:38:12 Pi-AllSky allsky.sh[629]: > Exposure set to 495 us (0.50 ms), timeout: 5000 ms Oct 8 11:38:12 Pi-AllSky allsky.sh[629]: > Got image @ exposure: 495 us (0.50 ms) Oct 8 11:38:12 Pi-AllSky allsky.sh[629]: > Attempt 1, current exposure 495 us, mean 203, temp min exposure 100 us, tempMaxExposure 10000000 us, new exposure 445 us Oct 8 11:38:12 Pi-AllSky allsky.sh[629]: > !!! Retrying @ 445 us because 'mean > maxAcceptableHistogram (136)' Oct 8 11:38:12 Pi-AllSky allsky.sh[629]: > Exposure set to 445 us (0.44 ms), timeout: 5000 ms Oct 8 11:38:13 Pi-AllSky allsky.sh[629]: > Got image @ exposure: 445 us (0.44 ms) Oct 8 11:38:13 Pi-AllSky allsky.sh[629]: > Attempt 2, current exposure 445 us, mean 198, temp min exposure 100 us, tempMaxExposure 490 us, new exposure 400 us Oct 8 11:38:13 Pi-AllSky allsky.sh[629]: > !!! Retrying @ 400 us because 'mean > maxAcceptableHistogram (136)' Oct 8 11:38:13 Pi-AllSky allsky.sh[629]: > Exposure set to 400 us (0.40 ms), timeout: 5000 ms Oct 8 11:38:13 Pi-AllSky allsky.sh[629]: > Got image @ exposure: 400 us (0.40 ms) Oct 8 11:38:13 Pi-AllSky allsky.sh[629]: > Attempt 3, current exposure 400 us, mean 187, temp min exposure 100 us, tempMaxExposure 440 us, new exposure 360 us Oct 8 11:38:13 Pi-AllSky allsky.sh[629]: > !!! Retrying @ 360 us because 'mean > maxAcceptableHistogram (136)' Oct 8 11:38:13 Pi-AllSky allsky.sh[629]: > Exposure set to 360 us (0.36 ms), timeout: 5000 ms Oct 8 11:38:14 Pi-AllSky allsky.sh[629]: > Got image @ exposure: 360 us (0.36 ms) Oct 8 11:38:14 Pi-AllSky allsky.sh[629]: > Attempt 4, current exposure 360 us, mean 181, temp min exposure 100 us, tempMaxExposure 395 us, new exposure 325 us Oct 8 11:38:14 Pi-AllSky allsky.sh[629]: > !!! Retrying @ 325 us because 'mean > maxAcceptableHistogram (136)' Oct 8 11:38:14 Pi-AllSky allsky.sh[629]: > Exposure set to 325 us (0.32 ms), timeout: 5000 ms Oct 8 11:38:14 Pi-AllSky allsky.sh[629]: > Got image @ exposure: 325 us (0.32 ms) Oct 8 11:38:14 Pi-AllSky allsky.sh[629]: > Attempt 5, current exposure 325 us, mean 173, temp min exposure 100 us, tempMaxExposure 355 us, new exposure 290 us Oct 8 11:38:14 Pi-AllSky allsky.sh[629]: > !!! Retrying @ 290 us because 'mean > maxAcceptableHistogram (136)' Oct 8 11:38:14 Pi-AllSky allsky.sh[629]: > Exposure set to 290 us (0.29 ms), timeout: 5000 ms Oct 8 11:38:15 Pi-AllSky allsky.sh[629]: > Got image @ exposure: 290 us (0.29 ms) Oct 8 11:38:15 Pi-AllSky allsky.sh[629]: > Attempt 6, current exposure 290 us, mean 162, temp min exposure 100 us, tempMaxExposure 320 us, new exposure 260 us Oct 8 11:38:15 Pi-AllSky allsky.sh[629]: > !!! Retrying @ 260 us because 'mean > maxAcceptableHistogram (136)' Oct 8 11:38:15 Pi-AllSky allsky.sh[629]: > Exposure set to 260 us (0.26 ms), timeout: 5000 ms Oct 8 11:38:15 Pi-AllSky allsky.sh[629]: > Got image @ exposure: 260 us (0.26 ms) Oct 8 11:38:15 Pi-AllSky allsky.sh[629]: > Attempt 7, current exposure 260 us, mean 163, temp min exposure 100 us, tempMaxExposure 285 us, new exposure 235 us Oct 8 11:38:15 Pi-AllSky allsky.sh[629]: > !!! Retrying @ 235 us because 'mean > maxAcceptableHistogram (136)' Oct 8 11:38:15 Pi-AllSky allsky.sh[629]: > Exposure set to 235 us (0.23 ms), timeout: 5000 ms Oct 8 11:38:16 Pi-AllSky allsky.sh[629]: > Got image @ exposure: 235 us (0.23 ms) Oct 8 11:38:16 Pi-AllSky allsky.sh[629]: > Attempt 8, current exposure 235 us, mean 148, temp min exposure 100 us, tempMaxExposure 255 us, new exposure 210 us Oct 8 11:38:16 Pi-AllSky allsky.sh[629]: > !!! Retrying @ 210 us because 'mean > maxAcceptableHistogram (136)' Oct 8 11:38:16 Pi-AllSky allsky.sh[629]: > Exposure set to 210 us (0.21 ms), timeout: 5000 ms Oct 8 11:38:16 Pi-AllSky allsky.sh[629]: > Got image @ exposure: 210 us (0.21 ms) Oct 8 11:38:16 Pi-AllSky allsky.sh[629]: > Using exposure of 210 us with mean 129 Oct 8 11:38:16 Pi-AllSky allsky.sh[629]: > Saving image 'image.jpg' that started at 2021-10-08 11:38:12 (0 us) Oct 8 11:38:16 Pi-AllSky allsky.sh[629]: > Sleeping from histogram exposure: 150000 ms Oct 8 11:38:17 Pi-AllSky allsky.sh[629]: upload.sh: FTP'ing image.jpg to /domains/n3bsq.com/public_html/allsky/image//image.jpg
@maserowik Mike,
This line appears to have failed, since you still have SaveImageDay-15882 on your server, although I'm surprised there isn't an error message in the log: mv SaveImageDay-15882 "/domains/n3bsq.com/public_html/allsky/image//image.jpg"
Try removing the trailing "/" from the directory name:
IMAGE_DIR="/domains/n3bsq.com/public_html/allsky/image/"
although I don't think that will fix it.
The only other thing is to put quotes around the temporary file name. Change line 104 of scripts/upload.sh to:
echo mv "\"${TEMP_NAME}\"" "\"${REMOTE_DIR}${DESTINATION_FILE}\""
@EricClaeys
Here are the results of the test. I removed the / on the lines 43 # The remote directory where the current "image.jpg" file should go. 44 IMAGE_DIR="/domains/n3bsq.com/public_html/allsky/image" 45 46 # The remote directory where the timelapse video should go. 47 # Some people prefer to put timelapse, keogram, and startrails in separate directories. 48 VIDEOS_DIR="/domains/n3bsq.com/public_html/allsky/videos" 49 VIDEOS_DESTINATION_NAME="" 50 WEB_VIDEOS_DIR="" 51 52 # The remote directory where the keogram image should go. 53 KEOGRAM_DIR="/domains/n3bsq.com/public_html/allsky/keograms" 54 KEOGRAM_DESTINATION_NAME="" 55 WEB_KEOGRAM_DIR="" 56 57 # The remote directory where the startrails image should go. 58 STARTRAILS_DIR="/domains/n3bsq.com/public_html/allsky/startrails" 59 STARTRAILS_DESTINATION_NAME="" 60 WEB_STARTRAILS_DIR=""
and add the line you recommended to the scripts/upload.sh
104 # echo "mv '${TEMP_NAME}' '${REMOTE_DIR}${DESTINATION_FILE}' | echo 'mv of ${TEMP_NAME} to ${REMOTE_DIR}${DESTINATION_FILE} failed!" 105 106 echo mv "\"${TEMP_NAME}\"" "\"${REMOTE_DIR}${DESTINATION_FILE}\"" 107 108 echo exit
looking at the allsky/tmp folder i see the following pi@Pi-AllSky:~/allsky/tmp $ ls -ahl total 216K drwxr-xr-x 2 pi pi 4.0K Oct 8 10:01 . drwxr-xr-x 13 pi pi 4.0K Oct 8 20:35 .. -rw-r--r-- 1 pi pi 994 Oct 8 10:01 capture_args.txt -rw-r--r-- 1 pi pi 361 Oct 8 20:35 lftp_cmds.txt -rw-r--r-- 1 pi pi 199K Oct 8 10:01 liveview-image.jpg -rw-r--r-- 1 pi pi 0 Oct 8 20:35 upload_log.txt
the upload log is still at 0
looking at the root of my hosting server still have the images going there.
looked at the log and it appears to be uploading fine. Oct 8 20:39:37 Pi-AllSky allsky.sh[629]: > Sleeping from auto exposure: 10 ms (0 sec) Oct 8 20:39:37 Pi-AllSky allsky.sh[629]: STARTING EXPOSURE at: 2021-10-08 20:39:37 Oct 8 20:39:37 Pi-AllSky allsky.sh[629]: > Exposure set to 10000000 us (10000.00 ms), timeout: 25000 ms Oct 8 20:39:38 Pi-AllSky allsky.sh[629]: upload.sh: FTP'ing image.jpg to /domains/n3bsq.com/public_html/allsky/image/image.jpg Oct 8 20:39:47 Pi-AllSky allsky.sh[629]: > Got image @ exposure: 10000000 us (10000.00 ms) Oct 8 20:39:48 Pi-AllSky allsky.sh[629]: > Saving image 'image.jpg' that started at 2021-10-08 20:39:37 (0 us) Oct 8 20:39:48 Pi-AllSky allsky.sh[629]: > Sleeping from auto exposure: 10 ms (0 sec) Oct 8 20:39:48 Pi-AllSky allsky.sh[629]: STARTING EXPOSURE at: 2021-10-08 20:39:48 Oct 8 20:39:48 Pi-AllSky allsky.sh[629]: > Exposure set to 10000000 us (10000.00 ms), timeout: 25000 ms Oct 8 20:39:49 Pi-AllSky allsky.sh[629]: upload.sh: FTP'ing image.jpg to /domains/n3bsq.com/public_html/allsky/image/image.jpg
Is there a way i can have the system echo what it think the file path is so i can see if it is correct. I see in the log it says it is correct but i like to remove the application and see if I can just get the lftp to work.
Thanks Mjke
I reloaded the sd card and re did the allsky program. Not sure what changed but the allsky program appears to be working correctly now. Closing this issue
@maserowik I fixed a bug in the upload.sh file last night, after testing on your Pi. Going forward, in a terminal window you can type "lftp" thrn copy/paste from the lftp_cmds.txt file into the window. You will see exactly what it is doing.
@maserowik The recent change to scripts/upload.sh should finally fix this. The Pi I'm using is running the new upload.sh and is uploading files. If you agree it's fixed, please close the issue. Thanks Mike. Using your Pi has allowed me to fix and test several things now. Thanks again for letting me use it.
So I did a new git pull this morning and thought I configured everything correctly, boy was I incorrect.
I have everything working locally on my side. I have a live image on my gui interface and the setting look fine for what I am use to seeing.
now on my hosted website, the live image is just stuck at the loading screen
I the config.sh IMG_UPLOAD is set to true
ftp-settings.sh
inside the allsky tmp folder is
so i check my hosted sited and i see the following
not sure what the next steps are any suggestions?
Mike