Closed andjones132 closed 3 years ago
I tried running the following commands from the /tmp/lftp_cmds.txt file, but when I try to execute the 'open' command I get error: -bash: open: command not found
set ssl:check-hostname false
open --user 'username' --password 'secret' 'ftp://192.168.1.5'
set net:max-retries 2
set net:timeout 20
rm -f '/remote/observatory/allskycam/images/SaveImageDay-13954'
put 'image.jpg' -o '/remote/observatory/allskycam/images/SaveImageDay-13954' || (echo 'put of image.jpg failed!'; exit $rm -f '/remote/observatory/allskycam/images/image.jpg'
mv '/remote/observatory/allskycam/images/SaveImageDay-13954' '/remote/observatory/allskycam/images/image.jpg' || ( echo$exit 0
@andjones132, the Wiki has a page on troubleshooting uploads. It should allow you to solve your certificate issue.
The last line of the Wiki page should solve your "open" issue:
To see lftp messages line-by-line, enter lftp followed by enter, then copy each line from the lftp_cmds.txt and paste into the terminal window.
You probably did enter "lftp" first.
@EricClaeys thanks for the info. I finally figured out after going through the upload.sh file that i had to enter lfpt first. I was then able to execute the lines in the lftp_cmds.txt file. I think I found the problem. On my synology I had Enable FTP SSL/TLS encryption service check in my FTP settings. When I unchecked this option and re-ran the "put" command, then it copied the image to the Synology FTP directory. I don't remember making any changes recently to my FTP settings on my Synology so not sure exactly what changed and why it worked previously. I will leave SSL off for now.
I see from one of the scripts that they are working on SFTP, so maybe I will be able to use SSL in the future.
Question: to use FTP uploads, do I need to have UPLOAD_* all set to True? It says for website, but not sure if this applies to FTP as well.
@andjones132, Would you please look at the Wiki page on troubleshooting uploads and let me know if it needs rewording so other people don't have the same issue you did? I'm trying to make the pages really useful.
Is it possible you had something in the LFTP_COMMANDS variable in ftp-settings.sh? Or in the ~/.lftprc file?
SFTP should work - all the code is there. I don't think my web server provider supports it so I haven't tested it. You can try and let me know.
Each of the file types (images, keograms, startrails, and videos) has its own UPLOAD variable in config.sh that determines if it should be uploaded. The upload.sh script doesn't know what it's uploading, and is only called by another script if the appropriate UPLOAD variable is true. For example, in endOfNight.sh and saveImageDay.sh/saveImageNight.sh.
Does this answer your (good) questions?
I think I figured out the issue.
In the ftp-settings.sh file in the web gui Editor, it says to use:
# If you need special commands executed when connecting to the FTP server enter them here.
# For example, to allow lftp to work with unknown certificates, use:
# LFTP_COMMANDS="set ssl:check-hostname false"
# If you have more than one command to enter, separate them with semicolons (;).
So I had set LFTP_COMMANDS="set ssl:check-hostname false
. When I read through the troubleshooting uploads wiki, I notice it said to use LFTP_COMMANDS="set ssl:verify-certificate no"
. Once I change my LFTP_COMMANDS in ftp-settings.sh to use LFTP_COMMANDS="set ssl:verify-certificate no"
, then it started working even with FTP SSL/TSL enabled on my NAS.
It might be helpful to update the comment in the ftp-settings.sh file to reflect this change.
Thanks @EricClaeys for your help.
@andjones132, Glad you got it working, and thanks for the feedback. I can see why you would have set it per the example in ftp-settings.sh. Would it help if I removed the example, and instead said "See the Wiki for example commands to enter into LFTP_COMMANDS"?
Hello, I added this line on the End of file /etc/lftp.conf set ssl:verify-certificate no
Hi Eric.
I like the idea of a link to the wiki. I didn’t know there was a wiki until you sent link. Plus only need to maintain in one place.
Andrew
On Sat, Oct 23, 2021 at 12:06 AM EricClaeys @.***> wrote:
@andjones132 https://github.com/andjones132, Glad you got it working, and thanks for the feedback. I can see why you would have set it per the example in ftp-settings.sh. Would it help if I removed the example, and instead said "See the Wiki for example commands to enter into LFTP_COMMANDS"?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/thomasjacquin/allsky/issues/721#issuecomment-950066372, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJTPWKBELGJI2HXJEZ4OBPDUII7ENANCNFSM5GRCXECA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I just downloaded the latest version of allsky and installed it on a fresh intall of RasbianOS. I also installed the Web Gui. I updated the ftp-settings.sh file usin the Editor in the web gui and input the exact same setting that I used with a previous install of allsky, but now I cannot get the files to write to my Synology NAS.
If I I look at the upload_log.txt in the allsky/tmp directory, I am seeing the following error message"
I am not sure why this is happening as I have not changed anything on the nas since I last and allsky installed and it worked without any issues. Has any one else experience issues with the ftp working? I tried to run the upload.sh script, but I don't know the arguments that it expects for ftp. I would welcome any advice on how to debug this issue.