Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The transporter module 'sftp' could not be found. Tried (sftp, transporters.transporter_sftp) #163

Open
kennywyland opened this issue Jan 23, 2014 · 2 comments

Comments

@kennywyland
Copy link

<servers>
    <server name="sftp push frontend" transporter="sftp" maxConnections="5">
        <host>xxx.xxx.xxx.xxx</host>
        <username>root</username>
        <url>http://xxx.xxx.xxx.xxx/</url>
    </server>
</servers>

# python /root/fileconveyor/fileconveyor/arbitrator.py 
/root/fileconveyor/fileconveyor/filter.py:10: DeprecationWarning: the sets module is deprecated
  from sets import Set, ImmutableSet
2014-01-23 00:07:46,331 - Arbitrator                - WARNING  - File Conveyor is initializing.
2014-01-23 00:07:46,337 - Arbitrator                - WARNING  - Loaded config file.
2014-01-23 00:07:46,340 - Arbitrator                - ERROR    - The transporter module 'sftp' could not be found. Tried (sftp, transporters.transporter_sftp)
TransporterAvailabilityTestError Consult the log file for details

The files in the fileconveyor directories are all owned and grouped by root (and I am logged in as root), they are 644 (although I also tried 755 just in case there was an executable issue with the subdirectories).

I don't understand why it isn't finding the transporter_sftp.py module. I've looked through other issues with this same error, but none of their fixes work for me.

I installed using:

pip install -e git+https://github.com/wimleers/fileconveyor@master#egg=fileconveyor

@kennywyland
Copy link
Author

I was able to use the symlink_or_copy transporter, but still not able to use the sftp transporter.

@kennywyland
Copy link
Author

I'm an experienced dev, but I know nothing about python, django, etc. However, it looks to me like the transporter_sftp simply doesn't work at all with the current version of SFTPStorage.

I was able to get the sftp transporter recognized after I yum installed python-paramiko, and then the next error message I received was that the SFTPStorage init method expects only 1 param, but 4 were given. I dug into the SFTPStorage code and it looks like it grabs all of its configuration variables from a class called django.conf.settings, but that's not at all how the sftp transporter expects to be sending those variables.

Traceback (most recent call last):
  File "/root/src/fileconveyor/fileconveyor/arbitrator.py", line 1185, in <module>
    run_file_conveyor()
  File "/root/src/fileconveyor/fileconveyor/arbitrator.py", line 1168, in run_file_conveyor
    arbitrator = Arbitrator(os.path.join(FILE_CONVEYOR_PATH, "config.xml"), restart)
  File "/root/src/fileconveyor/fileconveyor/arbitrator.py", line 151, in __init__
    transporter = self.__create_transporter(server)
  File "/root/src/fileconveyor/fileconveyor/arbitrator.py", line 928, in __create_transporter
    transporter = transporter_class(settings, self.transporter_callback, self.transporter_error_callback, "Arbitrator")
  File "/root/src/fileconveyor/fileconveyor/transporters/transporter_sftp.py", line 35, in __init__
    self.storage = SFTPStorage(location, self.settings["url"], key)
TypeError: __init__() takes exactly 1 argument (4 given)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant