Possible issue with SFTP + AWS and postData.sh + check_allsky.sh #3939
Replies: 1 comment 1 reply
-
Do you mean the output of the modules, or the actual module source files, e.g., Please double check your PROTOCOL in ftp-settings.sh. If you are using AWS the PROTOCOL should be What ftp log are you referring to? There are several. The one you show just contains the commands passed to the |
Beta Was this translation helpful? Give feedback.
-
I started seeing two issues pop up about 2 months ago (running Version: v2023.05.01_03 at the time). Initially what I think happened is I was saving too many images on local allsky (RPi) and ran out of disk space. Two things started happening after that:
After resetting # of days to keep to far less and restoring the modules to last "working" version, making an edit (clicking any of the check boxes on then off) and finally saving - it fixed #1.
The postData.sh continued to have issues. Images/startrails etc were uploading fine. It was just the .json files as far as I can tell from the logs. So, today I upgraded to Version: v2023.05.01_05. With the new
check_allsky.sh
I got this:PROTOCOL (sftp) set but not 'REMOTE_PASSWORD'. Uploads will not work.
Note - we use a .pem file, not a password to connect to AWS and this has worked just fine - so, I think this error is incorrect? That said, when I ran postData.sh after the upgrade, I get this (same as v_03):
Upload output from '/home/pi/allsky/config/settings.json:
rm of settings.json failed! Trying again...
rm: Access failed: No such file (settings.json)
The difference after upgrade of allsky (v_05) is that postData.sh did make the postData.sh XXX days old message go away, where as it did not in v_03. So, we'll see if this is works automatically going forward... It could also be that the allsky local files became corrupted when I ran out of disk space and the upgrade simply fixed that by installing uncorrupted files??
Looking at the lftp log, there still seems to be an issue related to file removal? In case this helps:
set sftp:connect-program 'ssh -i /home/pi/Documents/.pem'
set dns:fatal-timeout 10
set net:max-retries 2
set net:timeout 10
open --user '' --password '' 'sftp://********'
cd . || exit 99
quote PWD | grep current
ls
debug 5
cd '../bitnami/htdocs/allsky/' || exit 1
echo 'In DIRECTORY=../bitnami/htdocs/allsky/:'
ls
glob --exist 'PostData-3964*' && echo 'PostData-3964 exists; removing...' && rm 'PostData-3964'
put '/home/pi/allsky/tmp/data.json' -o 'PostData-3964'
|| (echo 'put of /home/pi/allsky/tmp/data.json to PostData-3964 failed! Trying again...'; (!sleep 3); put '/home/pi/allsky/tmp/data.json' -o 'PostData-3964' && echo 'WORKED' && exit 0)
|| (echo '2nd put failed again, quitting'; exit 1)
|| exit 2
rm -f 'data.json'
glob --exist 'data.json*'
&& (echo 'rm of data.json failed! Trying again...'; (!sleep 3); rm 'data.json' && echo 'WORKED' && exit 1)
&& (echo '2nd rm failed, quiting.'; rm -f 'PostData-3964'; exit 1)
&& exit 3
mv 'PostData-3964' 'data.json'
|| (echo 'mv of PostData-3964 to data.json failed! Trying again...'; (!sleep 3); mv 'PostData-3964' 'data.json' && echo 'WORKED' && exit 0)
|| (echo '2nd mv failed, quitting.'; rm -f 'PostData-3964'; exit 1)
|| exit 4
exit 0
Beta Was this translation helpful? Give feedback.
All reactions