windows下ftp出現軟體造成連線終止錯誤

yangtingkun發表於2009-09-15

Windows環境下即使目標空間足夠,也可能出現“軟體造成連線終止”的錯誤。

 

 

D:盤下,還有100G的空閒空間,但是ftp一個30G的檔案卻出現了錯誤:

D:\>dir
 
驅動器 D 中的卷沒有標籤。
 
卷的序列號是 08DD-8672

 D:\ 的目錄

2008-12-16  09:10   

          2003-3
2009-09-15  09:41              2003-jiangsuWEB
2009-09-15  08:13              TEMP
2009-09-15  02:13              win2003_1
2007-12-14  15:05             
演示站點
               0
個檔案              0 位元組
               5
個目錄 108,704,612,352 可用位元組

D:\>ftp 172.0.2.11
Connected to 172.0.2.11.
220 ahrac1 FTP server ready.
User (172.0.2.11:(none)): oracle
331 Password required for oracle.
Password:
230 User oracle logged in.
ftp> bin
200 Type set to I.
ftp> prompt
Interactive mode Off .
ftp> mget zhejiang_exp_090914.dmp
200 Type set to I.
200 PORT command successful.
150 Opening BINARY mode data connection for zhejiang_exp_090914.dmp (32544774206
 bytes).
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Tmp32.tmp:
軟體造成連線終止
426 Data connection: Broken pipe.
ftp: 26917061096 bytes received in 2531.88Seconds 10631.28Kbytes/sec.
ftp> quit
221-You have transferred 26917339136 bytes in 0 files.
221-Total traffic for this session was 26917339775 bytes in 1 transfers.
221-Thank you for using the FTP service on ahrac1.
221 Goodbye.

顯然Windows是將ftp快取在C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp目錄中,等到ftp完成的時候,再將快取的臨時檔案複製到目標目錄中。

由於C:盤空間不足導致了上述錯誤的產生。

從這方面講Windows環境下的ftp顯然不如Linux的。

如果磁碟空間足夠,可以設定TMP環境變數到指定目錄:

D:\>SET TMP=D:\TEMP

D:\>ftp 172.0.2.11
Connected to 172.0.2.11.
220 ahrac1 FTP server ready.
User (172.0.2.11:(none)): oracle
331 Password required for oracle.
Password:
230 User oracle logged in.
ftp> bin
200 Type set to I.
ftp> prompt
Interactive mode Off .
ftp> mget zhejiang_exp_090914.dmp
200 Type set to I.
200 PORT command successful.
150 Opening BINARY mode data connection for zhejiang_exp_090914.dmp (32544774206
 bytes).
226 Transfer complete.
ftp: 32544774206 bytes received in 2914.20Seconds 11167.64Kbytes/sec.
ftp> quit
221-You have transferred 32544774206 bytes in 1 files.
221-Total traffic for this session was 32544774836 bytes in 2 transfers.
221-Thank you for using the FTP service on ahrac1.
221 Goodbye.

由於目標目錄和臨時目錄都在D盤,因此D:盤的空閒空間至少要大於目標檔案的2倍。

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-614727/,如需轉載,請註明出處,否則將追究法律責任。

相關文章