2016-11-21 1 views
0

TLS 인증을받은 경우 FTP 서버에서 파일을 다운로드 할 수 없습니다. TLS 인증을 위해 DefaultFtpsSessionFactory 세션을 사용했습니다. 모든 시간 폴링은 "손수레 발생 중 오류"로 시작됩니다.스프링 통합을 통해 tls 인증을 사용하여 ftp를 통해 파일을 다운로드하는 방법

일반 Java 클래스를 통해 apache.common.net의 FTPSClient를 사용하여 파일을 다운로드 할 수 있지만.

내 XML을 설정 같은 것입니다 : -

<bean id="ftpClientFactory" 
     class="org.springframework.integration.ftp.session.DefaultFtpsSessionFactory"> 
     <property name="host" value="52.172.153.35"/> 
     <property name="port" value="21"/> 
     <property name="username" value=""/> 
     <property name="password" value=""/> 
     <property name="clientMode" value="2"/> 
     <property name="bufferSize" value="100000"/> 

<int-ftp:inbound-channel-adapter id="plannedFtpChannel" 
     session-factory="ftpClientFactory" filename-pattern="*.xls" local-filter="plannedFilter" auto-startup="true" 
     auto-create-local-directory="true" delete-remote-files="false" remote-directory="/planned" local-directory="/DataFiles/planned" > 
     <int:poller fixed-delay="10000"> 
     </int:poller> 
</int-ftp:inbound-channel-adapter> 

나는 점점 오전 오류 같은 : - : 오류 taskScheduler-6, 예외 처리

taskScheduler-6, EOFException는받은 : javax.net.ssl.SSLHandshakeException : 핸드 셰이크 중 원격 호스트 연결이 끊어졌습니다. %% Invalidated : [Session-4, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384] taskScheduler-6, SEND TLSv1.2 경고 : fa 탈, 소개 = handshake_failure

taskScheduler-2 읽어 TLSv1.2 응용 데이터 길이 = 160 패딩 평문 해독 후 : LEN = 160 0000 : B6 BE D8 80 50 63 4A A1 EA 00 DA A8 97 03 9D 39 .... PcJ ........ 9 0010 : 34 35 30 20 54 4C 53 20 73 65 73 73 69 6F 6E 20 450 TLS 세션 0020 : 6F 66 20 64 61 74 61 20 63 6F 6E 6E 65 63 74 69 데이터 연결 0030 : 6F 6E 20 68 61 73 20 6E 6F 74 20 72 65 73 75 6D on은 재개되지 않음 0040 : 65 64 20 6F 72 20 74 68 65 20 73 65 73 73 69 6F ed 또는 섹터 0050 : 6E 20 64 6F 65 73 20 6E 6F 74 20 6D 61 74 63 68n이 일치하지 않음 0060 : 20 74 68 65 20 63 6F 6E 74 72 6F 6C 20 63 6F 6E 제어 콘 0070 : 6E 65 63 74 69 6F 6E 0D 0A 4A BA 0F 0F 95 88 44 섹션 ... J ..... D 0080 : 8E B4 90 D0 02 B1 1C DC 78 E1 76 C1 ED BA 2F 82 ........ xv ../. 0090 : 3A 19 0B FA F2 09 61 6C FB 06 06 06 06 06 06 : ..... al ........ taskScheduler-2 수신 됨 EOFException : 무시됨 taskScheduler-2, closeInternal (거짓) taskScheduler-2, 닫기를 다시 호출합니다. state = 5

여기서는 내가 봤던 한 세션 재사용을 활성화해야합니다. 하지만 그렇게 할 수는 없습니다! 제안 사항.

+0

[방금 삭제 한 다른 질문에 대한 답변] (http://stackoverflow.com/questions/40676862/how-to-connect-through-ftp-with-tls-authentication-in-spring-integration -for-fil), [이 질문/답변] (http://stackoverflow.com/questions/32398754/how-to-connect-to-ftps-server-with-data-connection-using-same-tls- 세션). –

+0

xml과 함께 구성 할 수 없습니다. –

+0

무슨 뜻인지 설명해야합니다. 사용자 지정된 세션 팩토리를 만들어야합니다. –

답변

0

여기서는 사용자 지정된 FTPSClient를 달성하기 위해 DefaultFtpssessionFactory의 getSession() 및 createClient()를 재정의해야합니다. 이 설정으로 잘 작동합니다.

관련 문제