2 Replies Latest reply on Jul 12, 2012 3:57 PM by bvoleti

    ERROR [AbstractFileGateway] Unable to rename file ... May be

    clewis

      Hi,

      I'm trying to set up an SFTP gateway using JBoss ESB 4.4.GA running on JBoss AS 4.2.2. I started by modifying the helloworld_ftp_action quickstart to use SFTP instead of FTP. I started with the following configuration:

      <ftp-provider name="FTPprovider" hostname="" >
      <ftp-bus busid="myFTPChannel" >
      <ftp-message-filter
      username=""
      password=""
      directory="."
      protocol="sftp"
      input-suffix=".dat"
      work-suffix=".esbWorking"
      post-delete="false"
      post-suffix=".COMPLETE"
      error-delete="false"
      error-suffix=".HAS_ERROR"
      />
      </ftp-bus>
      </ftp-provider>

      I've also tried:

      <ftp-provider name="FTPprovider" hostname="" >
      <ftp-bus busid="myFTPChannel" >
      <ftp-message-filter
      username=""
      password=""
      directory="."
      protocol="sftp"
      input-suffix=".dat"
      />
      </ftp-bus>
      </ftp-provider>

      The server starts successfully, polls the directory, and tries to read in the files in the directory, but it always returns the following error:

      15:16:14,304 ERROR [AbstractFileGateway] Unable to rename file 'C:\jboss-4.2.2\bin\test.dat' to it's working name 'test.dat.esbInProcess'. May be a contention issue with another listener. You should avoid having multiple listeners polling on the same file subset. Ignoring this file for now!

      This is the only file based listener, the other listener is JMS, as in the quickstart. As you can see, in the first example, the work-suffix is .esbWorking and in the second example its not defined, however, the error message says .esbInProcess.

      Using the helloworld_ftp_action quickstart with the sftp modifications listed above produces the error. Any ideas why this is happening? Do I not have the configuration correct for sftp?

      thanks,

      Carl

        • 1. Re: ERROR [AbstractFileGateway] Unable to rename file ... Ma
          clewis

          OK, I resolved the problem I was having. My ftp account is setup to look at a particular directory, so I was putting files in the root of that directory, and referencing it as ".". If I create a sub directory and put my files in there instead everything works fine. So, I guess you can't use "." to reference the root directory. I Changed the configuration to the following and its working now:

          <ftp-provider name="FTPprovider" hostname="myhost" >
          <ftp-bus busid="myFTPChannel" >
          <ftp-message-filter
          username="myuser"
          password="mypass"
          directory="test-folder"
          protocol="sftp"
          input-suffix=".dat"
          work-suffix=".esbWorking"
          post-delete="false"
          post-suffix=".COMPLETE"
          error-delete="false"
          error-suffix=".HAS_ERROR"
          />
          </ftp-bus>
          </ftp-provider>

          • 2. Re: ERROR [AbstractFileGateway] Unable to rename file ... Ma
            bvoleti

            Hi Carl,

            I'm trying similar implementation transfering a file from FS using ESB as SFTP to another FS.

            Can you please send me the your esb.xml

             

            thank you,

            Bala