SFTP communications not working on Bots

320 views
Skip to first unread message

Gerhard Peters

unread,
Oct 11, 2017, 9:53:04 AM10/11/17
to Bots Open Source EDI Translator

I have bots setup on Windows 2012 and everything is working fine but now need to use sftp for communicating with a VAN. When doing a test run I get 1 errors in processes ImportError: Dependency failure: communicationtype "sftp" requires python library "pycrypto".

I managed to install pycrypto using the command below and also have installed paramiko as per this here htp://botsdocs.readthedocs.io/en/latest/installation.html

pip install pycrypto




Any help is appreciated 

Tom Westrick

unread,
Oct 11, 2017, 10:22:42 AM10/11/17
to bots...@googlegroups.com
Have you restarted the web server process? If not, it might need to be restarted to reload the python modules.

Also, let me know once you get that error fixed if you have issues with GXS. I had to create a special SFTP script for them.

-Tom

--
You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to botsmail+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/botsmail.
For more options, visit https://groups.google.com/d/optout.

hjebbers

unread,
Oct 11, 2017, 10:24:20 AM10/11/17
to Bots Open Source EDI Translator
when I try to install pycrypto I get:
 error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27

kind regards,
henk-jan

hjebbers

unread,
Oct 11, 2017, 10:28:28 AM10/11/17
to Bots Open Source EDI Translator
this page has instructions for dowloading MScompiler first:
https://securityblog.gr/3282/how-to-install-pycrypto-on-windows/

there are also binary builds for pycrypto available.


kind regards,
henk-jan

On Wednesday, October 11, 2017 at 9:53:04 AM UTC-4, Gerhard Peters wrote:

hjebbers

unread,
Oct 11, 2017, 10:35:03 AM10/11/17
to Bots Open Source EDI Translator
hi Gerha,
this is a link to binary installer for pycrypto (works over here)
http://www.voidspace.org.uk/python/modules.shtml#pycrypto

(check python version - 2.6 or 2.7 - and 32/64 bit version)


kind regards,
henk-jan

On Wednesday, October 11, 2017 at 9:53:04 AM UTC-4, Gerhard Peters wrote:

Gerhard Peters

unread,
Oct 11, 2017, 11:28:39 AM10/11/17
to Bots Open Source EDI Translator
I already installed the Microsoft Visual C++ 9.0 which solved the first problem. I installed the PyCrypto 2.6 for Python 2.7 64bit form the link provided and still the same problem. I have Python 64bit installed for bots

Gerhard Peters

unread,
Oct 11, 2017, 11:29:54 AM10/11/17
to Bots Open Source EDI Translator
I also restarted the webserver as well rebooted the server. Still the same problem

Gerhard Peters

unread,
Oct 11, 2017, 1:03:11 PM10/11/17
to Bots Open Source EDI Translator
Followed this link one more time and it does not work https://securityblog.gr/3282/how-to-install-pycrypto-on-windows/

Tom Westrick

unread,
Oct 11, 2017, 1:36:41 PM10/11/17
to bots...@googlegroups.com
Huh. I am running Bots on Win 2012 R2 with not problems. I've installed it on two different servers actually.

I installed C++ from https://www.microsoft.com/en-us/download/details.aspx?id=44266 and paramiko using pip install paramiko.

-Tom

On Wed, Oct 11, 2017 at 1:03 PM, Gerhard Peters <gerha...@gmail.com> wrote:
Followed this link one more time and it does not work https://securityblog.gr/3282/how-to-install-pycrypto-on-windows/

--

Gerhard Peters

unread,
Oct 11, 2017, 3:15:51 PM10/11/17
to Bots Open Source EDI Translator
Tom,
Are you using SFTP? Everything else works fine for us too except for connecting to GXS using SFTP

Tom Westrick

unread,
Oct 11, 2017, 3:22:15 PM10/11/17
to bots...@googlegroups.com
I am using SFTP. Once you get paramiko working, see this post about having a custom communication script for GXS. My code is attached to that post too.



Tom Westrick
Systems Architect
GA Richards Group
Office: 616-243-2800

On Wed, Oct 11, 2017 at 3:15 PM, Gerhard Peters <gerha...@gmail.com> wrote:
Tom,
Are you using SFTP? Everything else works fine for us too except for connecting to GXS using SFTP

--

Gerhard Peters

unread,
Oct 11, 2017, 4:02:25 PM10/11/17
to Bots Open Source EDI Translator
I uninstall Paramiko and then get this "ImportError: Dependency failure: communicationtype "sftp" requires python library "paramiko".

I reinstalled (version 2.3.1) and then I'm back at this error "ImportError: Dependency failure: communicationtype "sftp" requires python library "pycrypto".

What version of Paramiko do you have installed? Is there a way to install an older version to see if that will work?

Tom Westrick

unread,
Oct 11, 2017, 4:12:40 PM10/11/17
to bots...@googlegroups.com
Did you just try pip install pycrypto? Then you might also need to install ecdsa as newer versions of paramiko require it, pip install ecdsa.

Versions
paramiko - 1.15.2
pycrypto - 2.6.1
ecdsa - 0.13

-Tom

--

Gerhard Peters

unread,
Oct 11, 2017, 5:17:11 PM10/11/17
to Bots Open Source EDI Translator
Installed ecdsa still not working

Uninstalled all 3 and got the following when uninstalling pycrypto 

PS C:\python27\scripts> pip uninstall pycrypto
DEPRECATION
: Uninstalling a distutils installed project (pycrypto) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling pycrypto-2.6:
  c
:\python27\lib\site-packages\pycrypto-2.6-py2.7.egg-info
Proceed (y/n)? y
 
Successfully uninstalled pycrypto-2.6

Then tried to install all 3 again 

When reinstalling pycrypto again I got this
 PS C:\python27\scripts> pip install pycrypto
Requirement already satisfied (use --upgrade to upgrade): pycrypto in c:\python27\lib\site-packages
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

After reinstalling all 3 still the same results

ImportError: Dependency failure: communicationtype "sftp" requires python library "pycrypto".

What else can I try? I can give RDP access to the server if anyone wants to have a look

Tom Westrick

unread,
Oct 12, 2017, 8:36:01 AM10/12/17
to bots...@googlegroups.com
Did you try upgrading pycrypto to 2.6.1? It appears to be the most current. Maybe by upgrading it will also fix the issue of not re-installing after un-installing?

-Tom

--

Gerhard Peters

unread,
Oct 12, 2017, 11:35:35 AM10/12/17
to Bots Open Source EDI Translator
I deployed a new VM in AWS and have it working now on the new AWS server but now have an Authentication failed. Tom this may be related to the GXS issue you mentioned before. Should I start a new topic?

Here is the screenshot. Keep in mind that we will be connecting to more than one sftp 


Gerhard Peters

unread,
Oct 12, 2017, 11:40:07 AM10/12/17
to Bots Open Source EDI Translator
Tom,
I just also tried CommerceHUB sftp and there it works. So it must be GXS. So the script you have what do I need to do to test that. I will leave a reply there

Gerhard Peters

unread,
Oct 12, 2017, 5:55:15 PM10/12/17
to Bots Open Source EDI Translator
No matter what I try I can't get the authentication to work. When I connect to GXS with an WinSCP FTP client form that same server it works. I guess it could still be possible that AWS is blocking something.

Is there a log file in Bots that I could check where it may give me more details?

Tom Westrick

unread,
Oct 13, 2017, 8:30:17 AM10/13/17
to bots...@googlegroups.com
All the log files are in botssys\logging. Do you have detailed errors turned on in your bots.ini file (log_file_level, debug, log_console_level, log_file_level)?

Does your GXS channel settings look something like this?

Inline image 1


Tom Westrick
Systems Architect
GA Richards Group
Office: 616-243-2800

On Thu, Oct 12, 2017 at 5:55 PM, Gerhard Peters <gerha...@gmail.com> wrote:
No matter what I try I can't get the authentication to work. When I connect to GXS with an WinSCP FTP client form that same server it works. I guess it could still be possible that AWS is blocking something.

Is there a log file in Bots that I could check where it may give me more details?

--

Gerhard Peters

unread,
Oct 13, 2017, 10:35:05 AM10/13/17
to Bots Open Source EDI Translator
Lesson learned and note to myself. NEVER COPY AND PASTE PASSWORDS (again)

For the records here are the notes form Hank-Jan to enable logging 

To enable logging

in config/bots.ini:

- set debug to True

- set ftpdebug to 1 (or 2, which gives evven moree detailed information)

run again

in botssys/logging a file is created that contains the extended logging information (file sftp.log)


I got: INF [20171013-10:20:04.601] thr=1   paramiko.transport: Authentication (password) failed.

I manually typed the password. I was missing one letter at the start of the password

Tom Westrick

unread,
Oct 13, 2017, 1:08:17 PM10/13/17
to Bots Open Source EDI Translator
LOL, nice. Glad you figured it out!

-Tom
Reply all
Reply to author
Forward
0 new messages