- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在尝试连接到 FTPS 服务器(不是 SFTP)。我从 linux 系统连接,所以我尝试了 lftp、ftp-ssl,甚至使用 php 的 ftp_ssl_connect,但它们都不起作用。 (我已经能够使用上述所有或至少部分方法连接到其他 FTPS 服务器)。
我遇到的最具描述性的错误来自 lftp,调试一直到 11:
$ lftplftp :~> open -u my-username ftps://server.netPassword: lftp my-username@server.net:~> debug 99999999999lftp my-username@server.net:~> lsFileCopy(0x717bf0) enters state INITIALFileCopy(0x717bf0) enters state DO_COPY---- dns cache hit---- Connecting to server.net (IP ADDRESS) port 990GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_RSA_AES_128_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_RSA_CAMELLIA_128_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_RSA_AES_256_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_RSA_CAMELLIA_256_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_RSA_3DES_EDE_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_DSS_AES_128_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_DSS_CAMELLIA_128_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_DSS_AES_256_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_DSS_CAMELLIA_256_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_DSS_3DES_EDE_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_DSS_ARCFOUR_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: DHE_PSK_SHA_AES_128_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: DHE_PSK_SHA_AES_256_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: DHE_PSK_SHA_3DES_EDE_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: DHE_PSK_SHA_ARCFOUR_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: SRP_SHA_RSA_AES_128_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: SRP_SHA_RSA_AES_256_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: SRP_SHA_RSA_3DES_EDE_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: SRP_SHA_DSS_AES_128_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: SRP_SHA_DSS_AES_256_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: SRP_SHA_DSS_3DES_EDE_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: RSA_AES_128_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: RSA_CAMELLIA_128_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: RSA_AES_256_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: RSA_CAMELLIA_256_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: RSA_3DES_EDE_CBC_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: RSA_ARCFOUR_SHA1GNUTLS: HSK[acfbb0]: Keeping ciphersuite: RSA_ARCFOUR_MD5GNUTLS: HSK[acfbb0]: Removing ciphersuite: PSK_SHA_AES_128_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: PSK_SHA_AES_256_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: PSK_SHA_3DES_EDE_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: PSK_SHA_ARCFOUR_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: SRP_SHA_AES_128_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: SRP_SHA_AES_256_CBC_SHA1GNUTLS: HSK[acfbb0]: Removing ciphersuite: SRP_SHA_3DES_EDE_CBC_SHA1GNUTLS: EXT[acfbb0]: Sending extension CERT_TYPEGNUTLS: HSK[acfbb0]: CLIENT HELLO was send [88 bytes]GNUTLS: REC[acfbb0]: Sending Packet[0] Handshake(22) with length: 88GNUTLS: ASSERT: gnutls_cipher.c:205GNUTLS: REC[acfbb0]: Sent Packet[1] Handshake(22) with length: 93GNUTLS: ASSERT: gnutls_buffers.c:638GNUTLS: ASSERT: gnutls_record.c:909GNUTLS: ASSERT: gnutls_buffers.c:1152GNUTLS: ASSERT: gnutls_handshake.c:1032GNUTLS: ASSERT: gnutls_handshake.c:2331**** gnutls_handshake: A TLS packet with unexpected length was received.---- Closing control socketls: Fatal error: gnutls_handshake: A TLS packet with unexpected length was received.
使用 PHP 我得到以下结果:
Warning: ftp_login(): SSL/TLS handshake failed in /home/user/ftp.php on line 7Warning: ftp_login(): SSL enabled start the negotiation in /home/user/ftp.php on line 7cannot login
第 6 行:$connect = ftp_ssl_connect("server.net") or die("cannot connect");
第 7 行:$result = ftp_login($connect,"my-username","my-password") or die("cannot login");
使用 ftp-ssl:
$ ftp-ssl -d -z debug server.netSSL_DEBUG_FLAG onConnected to server.net.220-Security Notice220-All activities may be monitored. System use indicates consent to220 monitoring. Information may be given to law enforcement.ftp: setsockopt: Bad file descriptorName (server.net:user): my-username---> AUTH SSL234 SSL enabled start the negotiationwrite to 0x68c190 (102 bytes => 102 (66))0000 - 80 64 01 03 01 00 4b 00-00 00 10 00 00 39 00 00 .d....K......9..0010 - 38 00 00 35 00 00 16 00-00 13 00 00 0a 07 00 c0 8..5............0020 - 00 00 33 00 00 32 00 00-2f 03 00 80 00 00 05 00 ..3..2../.......0030 - 00 04 01 00 80 00 00 15-00 00 12 00 00 09 06 00 ................0040 - 40 00 00 14 00 00 11 00-00 08 00 00 06 04 00 80 @...............0050 - 00 00 03 02 00 80 e9 28-25 ed ea 2d e4 d2 f2 25 .......(%..-...%0060 - 80 e1 2e f1 c3 71 .....qread from 0x68c190 (7 bytes => -1 (FFFFFFFFFFFFFFFF))ftp: SSL_connect error error:00000000:lib(0):func(0):reason(0): Connection reset by peer
如果这篇文章很长,我很抱歉,但我已经谷歌搜索了好几天都没有看到任何答案。只是希望我遗漏的一些调试信息对某人有用。
最佳答案
遇到相同错误时在 debian 上:
---- Closing control socket
ls: Fatal error: gnutls_handshake: An unexpected TLS packet was received.
首先我必须升级 debian 上的 ssl-cert 包:
$ sudo apt-get upgrade ssl-cert
然后我不得不使用 open ftp://not open ftps://:
lftp :~> open ftp://xxx.xxx.xxx.xxx:21
ltfp :~> user foo bar
然后错误变为:
lftp foo@xxx.xxx.xxx.xxxx:~> ls
ls: Fatal error: Certificate verification: Not trusted (XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX)
此选项删除了错误并允许访问:
lftp foo@xxx.xxx.xxx.xxxx:~> set ssl:verify-certificate no
关于php - FTPS 问题 : "A TLS packet with unexpected length was received.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3345438/
一旦在 qconsole Marklogic 中运行以下代码,我就会遇到以下错误 XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax err
我已经在我的包中编写了这个函数。 def partitionIntoDays(ls, number, lookupKey=None): ''' Partitions the location
我只是一个 android 初学者,我已经安装了 Android Studio(版本是 1.0.2),并创建了一个新的空白应用程序,按照名为“构建你的第一个应用程序”的官方教程,我学习到这个页面' h
这只是前几天工作,但我刚刚将我的代码更新到运行乘客 2.2.4 的审查服务器,而我的 2.3.4 rails 应用程序现在无法在那个盒子上启动。 乘客报告: Passenger encountered
我正在尝试使用带有 Angular 2的整页, 将其导入我的 app.module.ts 时出现以下错误。 "(SystemJS) Unexpected token ) at Obje
TFS2015 vNext 构建失败并出现记录器错误(下面附有错误消息)。根据我的调查,这看起来与 CentralLogger - "Microsoft.TeamFoundation.Distribu
计算机科学学校项目。我需要编写一个程序,其中用户声明数组的大小,然后以数字、非递减顺序填充数组,然后声明一个值 x。然后将 X 分配到适当的位置,以便整个数组按数字、非递减顺序排列。然后输出该数组。
在这 2 个方法中,inspect1 显示编译错误“Unexpected bound”而 inspect2 工作正常,为什么? public void inspect1(List u){ S
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
我正在尝试运行以下代码,但遇到了“此时意外”错误。 (echo COPY (SELECT ta.colA as name, ta.colB as user_e, ta.colC as user_n,
我有以下查询: select u.UserName, count(*) as total from Voting v join User u using (UserID) where unique (
我们有以下查询在 MSSQL 中完美运行但在 MySQL 中无法运行: select CONVERT(datetime, dateVal) as DateOccurred, itemID, COUNT
我的代码中存在缩进错误问题。它看起来是正确的...有人能指出我做错了什么吗?我的查询行不断收到错误。 def invoice_details(myDeliveryID): conn = pym
我有以下代码: int a , b , sum; cin>>a>>b; sum=a+b; cout>a>>b>>c; cout<
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
我在一个批处理文件上运行这个命令: for %I in (*.txt *.doc) do copy %I c:\test2 ...它不断返回: I was unexpected at this tim
创建查询时出现错误: 'from' unexpected 我的代码如下: @Override public Admin findByAdmin(Admin admin) {
我正在尝试运行此 python 代码,但我不断收到错误消息“意外缩进”。我不确定怎么了。间距似乎很好。有什么想法吗? services = ['Service1'] for service in
我在名为“circular_dependency”的目录中有一些 python 文件: 导入文件_1.py: from circular_dependency.import_file_2 import
我正在尝试使用 gcc 编译代码并运行可执行文件,但它抛出错误: gcc somefile.c -o somefile 编译成功。但是,当我尝试执行它时: $sh somefile 它导致:语法错误:
我是一名优秀的程序员,十分优秀!