Bug 777940 (SOA-469) - FTPNotify problems with passive mode
Summary: FTPNotify problems with passive mode
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-469
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: JBossESB
Version: 4.2 GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.2 CP01
Assignee: Mark Little
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-19 22:44 UTC by Len DiMaggio
Modified: 2008-04-01 18:22 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-01 18:22:28 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-469 0 None None None Never

Description Len DiMaggio 2008-03-19 22:44:16 UTC
project_key: SOA

Be sure to check with more than one FTP server (pureFTPd and vsFTPd)

Comment 1 Len DiMaggio 2008-03-20 14:41:16 UTC
Notes on FTP servers

vsFTPd - in /etc/vsftpd/vsftpd.conf

      # To set passive only mode
      pasv_enable=YES 
      pasv_min_port=30000
      pasv_max_port=60000

      # To set active only mode
      pasv_enable=no

---------

pureFTPd

     To set passive only mode:  -p30000:50000

      To force active mode:   -N



Comment 2 Mark Little 2008-03-23 01:32:06 UTC
Link: Added: This issue depends JBESB-1616


Comment 3 Len DiMaggio 2008-04-01 17:51:55 UTC
We also have a doc change to make:

		       <!-- send notification to FTP server by way of file transfer -->
                       <target class="NotifyFTP">
		         <ftp URL="ftp://username:passwd@servername/tmp" filename="foo.txt" passive="true"/>
		       </target>

The passive="true|false"   clause is new.



Comment 4 Len DiMaggio 2008-04-01 17:54:19 UTC
Mark found a problem: The FTP Notify in the GA bits always assumes server is in active mode

Steps to recreate the failure:

a. Set client firewall port range to permit traffic on ports 10-20, server port 21, 30000-60000 open
   Set FTP server to active only mode (for pureFTPd - force active mode with -N CLI option)
   Run notifications QS
   It should fail as server will attempt to open data connection back to client on a random unprivileged port (active mode)

b. Set client firewall port range to permit traffic on ports 30K-60K, server port 21, 30000-60000 open
   Set FTP server to active only mode (for pureFTPd - force active mode with -N CLI option)
   Run notifications QS
   It will succeed - server opens data connection back to client (active mode) - use netstat to confirm ports in use by FTP

server.log for step a:

21:39:28,500 WARN [ActionProcessingPipeline] No reply to address defined for reply message! To: JMSEpr [ PortReference < <wsa:Address jms://127.0.0.1:1099/queue/quickstart_notifications_esb/&gt;, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1099/&gt;, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] MessageID: ID:JBM-61444 RelatesTo: jms:correlationID#ID:JBM-61952
21:39:28,733 INFO [STDOUT] ConsoleNotifier 2008/03/19 09:39:28.733<Hello from ESB-unaware JMS Client>
21:39:30,207 ERROR [NotificationList] Can't instantiate target <target class="NotifyFTP">
                         <ftp URL="ftp://jboss:blahblah@blah.boston.redhat.com/remote/dir" filename="notification.txt"/>
                       </target>
org.jboss.soa.esb.notification.NotificationException: Could not complete FTP notification
        at org.jboss.soa.esb.notification.NotifyFTP.sendNotification(NotifyFTP.java:207)
        at org.jboss.soa.esb.notification.NotificationList.notifyAll(NotificationList.java:164)
        at org.jboss.soa.esb.actions.Notifier.notifyOK(Notifier.java:93)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processSuccess(ActionProcessorMethodInfo.java:165)
        at org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.processSuccess(OverriddenActionLifecycleProcessor.java:108)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.notifySuccess(ActionProcessingPipeline.java:610)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:384)
        at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:566)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.jboss.soa.esb.util.RemoteFileSystemException: com.enterprisedt.net.ftp.FTPException: Could not open data connection to port 43675: No route to host
        at org.jboss.internal.soa.esb.util.EdtFtpImpl.uploadFile(EdtFtpImpl.java:629)
        at org.jboss.soa.esb.notification.NotifyFTP.sendNotification(NotifyFTP.java:203)
        ... 14 more
Caused by: com.enterprisedt.net.ftp.FTPException: Could not open data connection to port 43675: No route to host
        at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:902)
        at com.enterprisedt.net.ftp.FTPClient.initPut(FTPClient.java:1649)
        at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:1704)
        at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:1479)
        at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:1465)
        at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:1443)
        at org.jboss.internal.soa.esb.util.EdtFtpImpl.uploadFile(EdtFtpImpl.java:620)
        ... 15 more 

Comment 5 Len DiMaggio 2008-04-01 18:22:28 UTC
Verified in CP01 - still need to add the passive= clause to the docs.


Note You need to log in before you can comment on or make changes to this bug.