- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
NIFI ExecuteStreamCommand error pymongo
- Labels:
-
Apache NiFi
Created on
‎12-20-2019
12:37 AM
- last edited on
‎12-20-2019
01:33 AM
by
VidyaSargur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Iwant to execute .py from nifi, I am able to do that but when saving data in mongo from the script (using pymongo) I got an error:
Executable command python3 ended in an error: Traceback (most recent call last):
'MYpath/MY.py', in line 104, in <module>
mycol.insert(document)
If I execute this .py in command is working fine.
Command Arguments Property
MYpath/MY.py;1000000000
python3
true
path
;
200
Created on ‎12-24-2019 03:27 AM - edited ‎12-24-2019 03:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First of all, you are getting an error inside the python file. So we can eliminate several causes (e.g. not being able to access the file, or not being able to find the file).
Secondly, I believe you are able to run the file from the command line, that would eliminate a problem in the file itself, or with the general logic and setup.
This leaves two likely suspects:
1. You are running from a different place (for instance a different node)
2. You are running with different rights (for instance a different user) or less authentication (for instance no kerberos ticket)
Step 1 can be tested easily by manually going to all Nifi nodes and running the command from the command line.
Step 2 might be tested by running something like !whoami in python from the command line, and from nifi and inspecting the results.
If this does not help, try to get some more info out of python on what goes wrong.
- Dennis Jaheruddin
If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.
Created on ‎12-24-2019 03:27 AM - edited ‎12-24-2019 03:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First of all, you are getting an error inside the python file. So we can eliminate several causes (e.g. not being able to access the file, or not being able to find the file).
Secondly, I believe you are able to run the file from the command line, that would eliminate a problem in the file itself, or with the general logic and setup.
This leaves two likely suspects:
1. You are running from a different place (for instance a different node)
2. You are running with different rights (for instance a different user) or less authentication (for instance no kerberos ticket)
Step 1 can be tested easily by manually going to all Nifi nodes and running the command from the command line.
Step 2 might be tested by running something like !whoami in python from the command line, and from nifi and inspecting the results.
If this does not help, try to get some more info out of python on what goes wrong.
- Dennis Jaheruddin
If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.
