ldo Posted January 22, 2018 Report Share Posted January 22, 2018 Good morning, When creating an FTP client in UniStream, and activating the sending from the ladder program I get a response status "-6", general error. The parameters for the FTP server are correct (User, Password etc.). By testing with FileZilla, the FTP server is reachable. Can someone help me? Thank you. Link to comment Share on other sites More sharing options...
Saragani Posted January 23, 2018 Report Share Posted January 23, 2018 The fact that the FTP is reachable to PC does not indicate that it is reachable to the PLC. Is the FTP local? (not somewhere on the internet?) Have you tried pinging the FTP Server through the Ladder element Ping (through the Panel)? (this way you can see if the PLC can even reach the FTP Server). Link to comment Share on other sites More sharing options...
ldo Posted January 23, 2018 Author Report Share Posted January 23, 2018 Hi, Saragani thanks for the reply. Then, the FTP server is on the internet. I have tried pinging the FTP Server through the ladder element Ping and the answer is ok, furthermore I have tried pinging the FTP Server through the UniApp, even in this case the answer was ok. Indications on what I can do? Thanks again Link to comment Share on other sites More sharing options...
Saragani Posted January 24, 2018 Report Share Posted January 24, 2018 OK. I've got the status codes of the FTP Client: typedef enum FTP_Client_SUCCESS = 0, FTP_Client_IN_PROGRESS = 2, FTP_Client_CONNECTION_ERROR = -1, FTP_Client_LOGIN_ERROR = -2, FTP_Client_LOCAL_FILE_ERROR = -3, FTP_Client_REMOTE_FILE_ERROR = -4, FTP_Client_PERMISSION_ERROR = -5, FTP_Client_UNKNOWN_ERROR = -6 So, -6 means unknown error (and it doesn't look like a connection error). Please make sure you have a connection from your PC to the PLC, then try connecting the PLC to the FTP again, and after it fails, then in UniLogic to go: UniStream Management -> Debug -> Upload log In the destination folder where you chose to upload the log file, you should find a file called UniLog.zip Please upload it here (if it's possible), or send it to our support and ask them to send it to me, or to Noam, and we'll take it from here (The log should give us a clean information about the statuses that the FTP Server returned to the PLC). Thanks. Link to comment Share on other sites More sharing options...
ldo Posted January 24, 2018 Author Report Share Posted January 24, 2018 Hi, I have done what you have indicated to me, Below the requested file. is it correct that the zip file ask me for a password to extract it? Thanks. UniLog.zip Link to comment Share on other sites More sharing options...
Saragani Posted January 24, 2018 Report Share Posted January 24, 2018 "is it correct that the zip file ask me for a password to extract it?" Yes. The logs are for internal / debug use and should be opened by Unitronics R&D only. Link to comment Share on other sites More sharing options...
Saragani Posted January 24, 2018 Report Share Posted January 24, 2018 I see from the logs: unexpected server response to PASS: 530 Login authentication failed Please confirm that the IP, Port, Username and Password are correct, and if they are, then try performing a "Download All" to the PLC. If the problem is still not solved, then can you please connect with FileZilla to the server? Then copy the text from FileZilla and paste it here. You may (and probably should), replace the server address / IP and also the password (replace it with ******) . It can also help if you can supply to us (To the Panel R&D team), a username and password to the server (preferred some temp username and password that you can later delete from the server), so we could debug the server connection and login / authentication, Thanks. Link to comment Share on other sites More sharing options...
ldo Posted January 24, 2018 Author Report Share Posted January 24, 2018 Yes, I confirm that the IP, Port, Username and Password are correct, and I have Download All to the PLC. The confirmation that the IP, Username and Password are correct is also given by the answer of FileZilla that I enclose below. FileZilla answer: Stato: Connessione a xx.xx.xx.xxx:21... Stato: Connessione stabilita, in attesa del messaggio di benvenuto... Stato: Inizializzazione TLS in corso... Stato: Verifica del certificato in corso... Stato: Connessione TLS stabilita. Stato: Accesso effettuato Stato: Lettura elenco cartelle... Stato: Elenco cartella di "/" completato I tried with FileZilla to change username and/or password and in this way i could not connect with the FTP server, so I did the same thing with the PLC FTPclient, but the answer was always the same: general error (-6). Thanks Link to comment Share on other sites More sharing options...
Saragani Posted January 24, 2018 Report Share Posted January 24, 2018 I was hoping to see the commands sent to the server and the replies from the server on the FileZilla output (I remember that they were outputing it in the past. Maybe it doesn't output this because of the TLS connection). Is there a chance to get a temporary username and password for debugging the connection from the PLC? (Sent to our support by email, or by a private message) Thanks, and sorry for the inconvenience. Link to comment Share on other sites More sharing options...
ldo Posted January 25, 2018 Author Report Share Posted January 25, 2018 No problem, Thanks for your interest I have configured FileZilla better, end i got the complete answer of the connection to the FTP Server, that i attach here. Thanks. Complete FileZilla answer: 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpLogonOpData::Send() in state 0 18:07:53 Stato: Connessione a XX.XX.XX.XX:21... 18:07:53 Stato: Connessione stabilita, in attesa del messaggio di benvenuto... 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 18:07:53 Risposta: 220-You are user number 1 of 50 allowed. 18:07:53 Risposta: 220-Local time is now 18:07. Server port: 21. 18:07:53 Risposta: 220-This is a private system - No anonymous login 18:07:53 Risposta: 220-IPv6 connections are also welcome on this server. 18:07:53 Risposta: 220 You will be disconnected after 15 minutes of inactivity. 18:07:53 Trace: CFtpLogonOpData::ParseResponse() in state 1 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpLogonOpData::Send() in state 2 18:07:53 Comando: AUTH TLS 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 234 AUTH TLS OK. 18:07:53 Trace: CFtpLogonOpData::ParseResponse() in state 2 18:07:53 Stato: Inizializzazione TLS in corso... 18:07:53 Trace: CTlsSocketImpl::Handshake() 18:07:53 Trace: CTlsSocketImpl::ContinueHandshake() 18:07:53 Trace: TLS handshake: About to send CLIENT HELLO 18:07:53 Trace: TLS handshake: Sent CLIENT HELLO 18:07:53 Trace: CTlsSocketImpl::OnSend() 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CTlsSocketImpl::ContinueHandshake() 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CTlsSocketImpl::ContinueHandshake() 18:07:53 Trace: TLS handshake: Received SERVER HELLO 18:07:53 Trace: TLS handshake: Processed SERVER HELLO 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CTlsSocketImpl::ContinueHandshake() 18:07:53 Trace: TLS handshake: Received CERTIFICATE 18:07:53 Trace: TLS handshake: Processed CERTIFICATE 18:07:53 Trace: TLS handshake: Received SERVER KEY EXCHANGE 18:07:53 Trace: TLS handshake: Processed SERVER KEY EXCHANGE 18:07:53 Trace: TLS handshake: Received SERVER HELLO DONE 18:07:53 Trace: TLS handshake: Processed SERVER HELLO DONE 18:07:53 Trace: TLS handshake: About to send CLIENT KEY EXCHANGE 18:07:53 Trace: TLS handshake: Sent CLIENT KEY EXCHANGE 18:07:53 Trace: TLS handshake: About to send FINISHED 18:07:53 Trace: TLS handshake: Sent FINISHED 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CTlsSocketImpl::ContinueHandshake() 18:07:53 Trace: TLS handshake: Received NEW SESSION TICKET 18:07:53 Trace: TLS handshake: Processed NEW SESSION TICKET 18:07:53 Trace: TLS handshake: Received FINISHED 18:07:53 Trace: TLS handshake: Processed FINISHED 18:07:53 Trace: TLS Handshake successful 18:07:53 Trace: Protocol: TLS1.2, Key exchange: ECDHE-RSA, Cipher: AES-256-GCM, MAC: AEAD 18:07:53 Stato: Verifica del certificato in corso... 18:07:53 Stato: Connessione TLS stabilita. 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpLogonOpData::Send() in state 5 18:07:53 Comando: USER XXXXXXXXXXXXXXXXXXXXXXX 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 331 XXXXXXXXXXXXXXXXXXXXXXX OK. Password required 18:07:53 Trace: CFtpLogonOpData::ParseResponse() in state 5 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpLogonOpData::Send() in state 5 18:07:53 Comando: PASS **************** 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 230-OK. Current restricted directory is / 18:07:53 Risposta: 230 8 Kbytes used (0%) - authorized: 307200 Kb 18:07:53 Trace: CFtpLogonOpData::ParseResponse() in state 5 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpLogonOpData::Send() in state 6 18:07:53 Comando: SYST 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 215 UNIX Type: L8 18:07:53 Trace: CFtpLogonOpData::ParseResponse() in state 6 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpLogonOpData::Send() in state 7 18:07:53 Comando: FEAT 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 211-Extensions supported: 18:07:53 Risposta: EPRT 18:07:53 Risposta: IDLE 18:07:53 Risposta: MDTM 18:07:53 Risposta: SIZE 18:07:53 Risposta: MFMT 18:07:53 Risposta: REST STREAM 18:07:53 Risposta: MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*; 18:07:53 Risposta: MLSD 18:07:53 Risposta: AUTH TLS 18:07:53 Risposta: PBSZ 18:07:53 Risposta: PROT 18:07:53 Risposta: UTF8 18:07:53 Risposta: TVFS 18:07:53 Risposta: ESTA 18:07:53 Risposta: PASV 18:07:53 Risposta: EPSV 18:07:53 Risposta: SPSV 18:07:53 Risposta: ESTP 18:07:53 Risposta: 211 End. 18:07:53 Trace: CFtpLogonOpData::ParseResponse() in state 7 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpLogonOpData::Send() in state 9 18:07:53 Comando: OPTS UTF8 ON 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 200 OK, UTF-8 enabled 18:07:53 Trace: CFtpLogonOpData::ParseResponse() in state 9 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpLogonOpData::Send() in state 10 18:07:53 Comando: PBSZ 0 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 200 PBSZ=0 18:07:53 Trace: CFtpLogonOpData::ParseResponse() in state 10 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpLogonOpData::Send() in state 11 18:07:53 Comando: PROT P 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 200 Data protection level set to "private" 18:07:53 Trace: CFtpLogonOpData::ParseResponse() in state 11 18:07:53 Stato: Accesso effettuato 18:07:53 Trace: Measured latency of 23 ms 18:07:53 Trace: CFtpControlSocket::ResetOperation(0) 18:07:53 Trace: CControlSocket::ResetOperation(0) 18:07:53 Trace: CFileZillaEnginePrivate::ResetOperation(0) 18:07:53 Stato: Lettura elenco cartelle... 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpListOpData::ListSend() in state 0 18:07:53 Trace: CFtpChangeDirOpData::Send() in state 0 18:07:53 Trace: CFtpChangeDirOpData::Send() in state 1 18:07:53 Comando: PWD 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 257 "/" is your current location 18:07:53 Trace: CFtpChangeDirOpData::ParseResponse() in state 1 18:07:53 Trace: CFtpControlSocket::ResetOperation(0) 18:07:53 Trace: CControlSocket::ResetOperation(0) 18:07:53 Trace: CControlSocket::ParseSubcommandResult(0) 18:07:53 Trace: CFtpListOpData::SubcommandResult() in state 1 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpListOpData::ListSend() in state 2 18:07:53 Trace: CFtpRawTransferOpData::Send() in state 1 18:07:53 Comando: TYPE I 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 200 TYPE is now 8-bit binary 18:07:53 Trace: CFtpRawTransferOpData::ParseResponse() in state 1 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpRawTransferOpData::Send() in state 2 18:07:53 Comando: PASV 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 227 Entering Passive Mode (XX,XX,XX,XXX,XXX,XXX) 18:07:53 Trace: CFtpRawTransferOpData::ParseResponse() in state 2 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpRawTransferOpData::Send() in state 4 18:07:53 Trace: Binding data connection source IP to control connection source IP 192.168.0.100 18:07:53 Comando: MLSD 18:07:53 Trace: CTransferSocket::OnConnect 18:07:53 Trace: CTlsSocketImpl::Handshake() 18:07:53 Trace: Trying to resume existing TLS session. 18:07:53 Trace: CTlsSocketImpl::ContinueHandshake() 18:07:53 Trace: TLS handshake: About to send CLIENT HELLO 18:07:53 Trace: TLS handshake: Sent CLIENT HELLO 18:07:53 Trace: CTlsSocketImpl::OnSend() 18:07:53 Trace: CTlsSocketImpl::OnSend() 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CTlsSocketImpl::ContinueHandshake() 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CTlsSocketImpl::ContinueHandshake() 18:07:53 Trace: TLS handshake: Received SERVER HELLO 18:07:53 Trace: TLS handshake: Processed SERVER HELLO 18:07:53 Trace: TLS handshake: Received FINISHED 18:07:53 Trace: TLS handshake: Processed FINISHED 18:07:53 Trace: TLS handshake: About to send FINISHED 18:07:53 Trace: TLS handshake: Sent FINISHED 18:07:53 Trace: TLS Handshake successful 18:07:53 Trace: TLS Session resumed 18:07:53 Trace: Protocol: TLS1.2, Key exchange: ECDHE-RSA, Cipher: AES-256-GCM, MAC: AEAD 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CTransferSocket::OnConnect 18:07:53 Trace: CFtpControlSocket::OnReceive() 18:07:53 Risposta: 150 Accepted data connection 18:07:53 Trace: CFtpRawTransferOpData::ParseResponse() in state 4 18:07:53 Trace: CControlSocket::SendNextCommand() 18:07:53 Trace: CFtpRawTransferOpData::Send() in state 5 18:07:53 Trace: CTlsSocketImpl::OnRead() 18:07:53 Trace: CTransferSocket::OnReceive(), m_transferMode=0 18:07:53 Elenco: type=cdir;sizd=4096;modify=20180122145504;UNIX.mode=0755;UNIX.uid=1228;UNIX.gid=1227;unique=fd00ga1ccb7; . 18:07:53 Elenco: type=pdir;sizd=4096;modify=20180122145504;UNIX.mode=0755;UNIX.uid=1228;UNIX.gid=1227;unique=fd00ga1ccb7; .. 18:07:53 Elenco: type=file;size=7;modify=20180122145504;UNIX.mode=0600;UNIX.uid=1228;UNIX.gid=1227;unique=fd00ga14bcc; .ftpquota 18:07:53 Elenco: type=file;size=4448;modify=20170426165210;UNIX.mode=0644;UNIX.uid=1228;UNIX.gid=1227;unique=fd00ga16a29; ALLARME VIGIREX_1_20170421010000.zip 18:07:53 Elenco: type=file;size=4479;modify=20170426165217;UNIX.mode=0644;UNIX.uid=1228;UNIX.gid=1227;unique=fd00ga16a2b; ALLARME VIGIREX_2_20170421010000.zip 18:07:53 Elenco: type=dir;sizd=4096;modify=20180116141748;UNIX.mode=0755;UNIX.uid=1228;UNIX.gid=1227;unique=fd00ga27488; DT 18:07:53 Elenco: type=dir;sizd=4096;modify=20180116163713;UNIX.mode=0755;UNIX.uid=1228;UNIX.gid=1227;unique=fd00ga27489; PINO 18:07:54 Trace: CTlsSocketImpl::OnRead() 18:07:54 Trace: CTransferSocket::OnReceive(), m_transferMode=0 18:07:54 Trace: CTransferSocket::TransferEnd(1) 18:07:54 Trace: CFtpControlSocket::TransferEnd() 18:07:54 Trace: CTlsSocketImpl::OnRead() 18:07:54 Trace: CFtpControlSocket::OnReceive() 18:07:54 Risposta: 226-Options: -a -l 18:07:54 Risposta: 226 7 matches total 18:07:54 Trace: CFtpRawTransferOpData::ParseResponse() in state 7 18:07:54 Trace: CFtpControlSocket::ResetOperation(0) 18:07:54 Trace: CControlSocket::ResetOperation(0) 18:07:54 Trace: CControlSocket::ParseSubcommandResult(0) 18:07:54 Trace: CFtpListOpData::SubcommandResult() in state 3 18:07:54 Trace: CFtpControlSocket::ResetOperation(0) 18:07:54 Trace: CControlSocket::ResetOperation(0) 18:07:54 Stato: Elenco cartella di "/" completato 18:07:54 Trace: CFileZillaEnginePrivate::ResetOperation(0) Link to comment Share on other sites More sharing options...
Saragani Posted January 25, 2018 Report Share Posted January 25, 2018 OK. we'll be back from weekend on Sunday. I'll talk with the Panel R&D Team leader to see if we can log the same thing in the Panel (or is it already logged) so we can compare the sequence and maybe see where it fails. Basically, the sequence is the Comando and Risposta. Thanks for your feedback. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now