Problem connecting to FTP Server

OS info

  • Operating System : Windows 10.0.17134
  • Wappler Version : 1.9.4

Problem description

I am not able to connect to my server using FTP Under project settings. I am able to use DOS FTP with the same setting and get connected.

Steps to reproduce

  1. set up FTP on Project settings
  2. Test Connection - Fails

Hello @edgay54
This doesn’t look like a “bug”, more like a configuration issue.
What is the exact error message you see?

Connection Failed:
Connection Log:
Testing Connection …

  • set color:use-color yes
  • set cmd:interactive yes
  • set file:charset utf-8
  • set xfer:clobber on
  • set ftp:timezone
  • set cmd:show-status yes
  • set cmd:set-term-status yes
  • set ftp:list-options -a
  • set cmd:fail-exit yes
  • set cmd:time-style “%Y-%m-%d %H:%M:%S”
  • set ftp:ssl-allow no
  • set ssl:verify-certificate no
  • set net:max-retries 3
  • set net:timeout 20
  • set net:reconnect-interval-base 5
  • set net:reconnect-interval-multiplier 1
  • open -u user,pass ftp://xxx.xxx.xxx.xxx:21
    ---- Resolving host address…
    ---- 1 address found: xxx.xxx.xxx.xxx
  • ls
    ---- Connecting to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) port 21
    **** Timeout - reconnecting
    ---- Closing control socket
    ---- Connecting to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) port 21
    **** Socket error (Connection refususer) - reconnecting
    ---- Closing control socket
    ---- Connecting to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) port 21
    **** Timeout - reconnecting
    ---- Closing control socket
    ls: Fatal error: max-retries exceuser****user

OK, I checked my settings and now I can get into the FTP server. The new error is:
“Can not find the uploaded files!”

Testing Connection …

  • set color:use-color yes
  • set cmd:interactive yes
  • set file:charset utf-8
  • set xfer:clobber on
  • set ftp:timezone
  • set cmd:show-status yes
  • set cmd:set-term-status yes
  • set ftp:list-options -a
  • set cmd:fail-exit yes
  • set cmd:time-style “%Y-%m-%d %H:%M:%S”
  • set ftp:ssl-allow no
  • set ssl:verify-certificate no
  • set net:max-retries 3
  • set net:timeout 20
  • set net:reconnect-interval-base 5
  • set net:reconnect-interval-multiplier 1
  • open -u user,pass ftp://xxx.xxx.xxx.xxx:21
    ---- Resolving host address…
    ---- 1 address found: xxx.xxx.xxx.xxx
  • ls
    ---- Connecting to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) port 21
    <— 220-FileZilla Server version 0.9.41 beta
    <— 220-written by Tim Kosse (mysite.com)
    <— 220 Please visit http://mysite.com
    —> FEAT
    <— 211-Features:
    <— MDTM
    <— REST STREAM
    <— SIZE
    <— MLST type*;size*;modify*;
    <— MLSD
    <— UTF8
    <— CLNT
    <— MFMT
    <— 211 End
    —> CLNT lftp/4.8.4
    <— 200 Don’t care
    —> OPTS UTF8 ON
    <— 530 Please log in with USER and PASS first.
    —> USER user
    <— 331 Password requiruser for user
    —> PASS pass
    <— 230 Logguser on
    —> CLNT lftp/4.8.4
    <— 200 Don’t care
    —> OPTS UTF8 ON
    <— 200 UTF8 mode enabluser
    —> PWD
    <— 257 “/” is current directory.
    —> PASV
    <— 227 Entering Passive Mode (xxx,xxx,xxx,xxx,195,118)
    ---- Connecting data socket to (xxx.xxx.xxx.xxx) port 50038
    ---- Data connection establishuser
    —> LIST -a
    <— 150 Connection acceptuser
    ---- Got EOF on data connection
    ---- Closing data socket
    <— 226 Transfer OK
  • put mysite.com
    —> TYPE I
    <— 200 Type set to I
    —> PASV
    <— 227 Entering Passive Mode (xxx,xxx,xxx,xxx,195,119)
    ---- Connecting data socket to (xxx.xxx.xxx.xxx) port 50039
    ---- Data connection establishuser
    —> ALLO 38
    <— 202 No storage allocation neccessary.
    —> STOR mysite.com
    <— 150 Connection acceptuser
    ---- Closing data socket
    <— 226 Transfer OK
    —> MFMT 20190326132804 mysite.com
    <— 213 modify=20190326132804; /mysite.com
    38 bytes transferruser
    —> QUIT
    <— 221 Goodbye

I don’t see where it put any file in the FTP folder.

This is some error now in setting up the site url, remote directory or BOTH. Check this guide please:

1 Like

I think I followed all the directions but I still get the error: “Can not find uploaded files!”
Dose the folder name on the FTP server have to be the same as the local folder name?

“Can not find uploaded files!” means your remote folder OR site URL OR both are wrong, so Wappler cannot “see” the uploaded files in the destination you set up… so if your site url is: site.com and if you must put your files in the /public_html folder (just an exampe), then if you have not entered this folder in the config - the files are not there and the connection cannot “see” then there.

What should the remote directory/site url be and what have you entered for these in the target configuration (post a screenshot please)

Here is a copy of my setup in Wappler and on the FileZilla FTP Server:

Wappler:

FTP Server:
FileZilla

Well i see a folder called “MyFirstWappler” on your second screenshot - why is it not added in the remote directory input in Wappler?
Also you should fix your url to point to it as well.
http://10.2.1.74/MyFirstWappler

When I added http:…10.2.1.74/MyFirstWappler the test connection worked. Could you explain why that is? I did have the FTP Home Directory set for MyFirstWappler. I guess that Wappler doesn’t know what the home directory is? Is that correct?

1 Like

What do you call home directory? Are you referring to the remote directory - as on your screenshot it's also empty.

The home directory(I believe) is the folder on the FTP server that is the default for the user. When that user (in this case ed) logs in they automatically are in the default folder…

That’s fine, but as it is a subfolder in your server root it needs to be added to the URL, which points to the root. Wappler does not know where your FTP Home Directory is :slight_smile:

Thank you for all your trouble, I appreciate the help.

1 Like

Would you believe it... I did not make any changes to the FTP Server nor the Project Settings I was going to show my FTP connection to someone and I am received another error... I removed the ../MyFirstWappler from the 10.2.10.74 and I get a connection - the error goes away.