Is there any obvious reason why my Windows app can no longer connect via MBS CURL (sftp) to my webapp that has been moved from an old xojo cloud server to a new xojo cloud server? I have updated the IP and SFTP password in the Windows app, and cannot figure out what else could be going wrong.
The error message indicates: Can not resolve host (error code 6).
[quote=317066:@Christian Schmitz]DNS fails?
Invalid domain name?[/quote]
Yes, domain moved as well, and I verified it points to the correct IP (including with an SFTP client I use).
I just tried again first thing this morning - forgot to update the password (which I did correctly yesterday), and CURL responded with correct “Wrong Password” error. So then I corrected the password, tried again, and now getting the “Cannot resolve host” error again. This is similar to what happened yesterday.
Silly theory: something gets “stuck” after the bad password attempt. Going to reboot/restart and try again with good password and see what happens.
On my DNS server, I only have an “ftp” record; I assume I don’t need a separate “sftp” record - right? I don’t recall ever having an “sftp” record before.
In case this helps - I am also using these statements:
uCURL.OptionFTPSSL = uCURL.kFTPSSL_CONTROL // Require SSL for the control connection or fail with CURLE_USE_SSL_FAILED.
uCURL.OptionSSLVerifyPeer=0 // don't verify peer
uCURL.OptionSSLVerifyHost=0 // ignore host name in verify
Does the new host know that he has a new domain too? I’ve had similiar issues but with SSH logins on a webserver. My DNS was updated but the DNS at my ISP not.
From the DebugMessage event on the Class UploadCURL DebugMessage: 0, Could not resolve host: mysftppassword@mydomainname
UploadCURL DebugMessage: 0, Closing connection 0
From the handler that captures the CURL response error in my code uCURL DebugData:
uCURL error code = 6
The way I am setting up the CURL is as follows (I am starting to think this is the wrong way, but my code used to work this way):
It turns out that the sftp password has all sorts of special characters in it, including @ & $
I don’t know if any of those characters are causing an issue?
OK - rereading my post I think I am seeing something embarrassing. I see that “@” is a character in my sftp password. Isn’t that a “Duh”. I guess I should somehow encode this???
…post edit
And after further analysis - I see that the unresolved address is everything after the “@” in my sftp password. That pretty much confirms where the error is coming from. Doh!
OK - got passed the credentials, now the process is properly crawling to the destination data directory - as evidenced by debug messages indicating "Creating directory ‘/maindatadir/userdatadir’ "
But then it gets to writing the file, and I get this message: “Creating the dir/file failed: No such file or directory”
The way I am writing the file via CURL is as follows:
In the documentation I have, there is a reference to “OptionFTPAppend as Boolean” - but that does not seem to be an active option (not recognized in the IDE). Is there some file overwrite option I should be setting.
FYI: the file does exist on the server - so I am trying to overwrite it.
Thanks. Set that to both true and false - no difference. Paths all look good. Tried different literal file name - still no success.
When I get a chance I am going to just try to write some text (not in a file) and see if I can do that.