I have installed Node-RED on AWS by using EC2 as mentioned on the below link
https://nodered.org/docs/getting-started/aws#running-on-aws-ec2-with-ubuntu
[{"id":"f3d21721.d1f9e8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"c6d0db3c.878928","type":"debug","z":"f3d21721.d1f9e8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":800,"y":300,"wires":[]},{"id":"c42dcd70.9d4e6","type":"debug","z":"f3d21721.d1f9e8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":120,"wires":[]},{"id":"67d69a31.aae274","type":"function","z":"f3d21721.d1f9e8","name":"","func":"msg.payload={\"group\": {\"hide\": [\"Aptitude_Problem_Solver_Question\"], \"show\": [\"Aptitude_Problem_Solver_Answer\"]}}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":60,"wires":[["2fb1ec43.2fdf74"]]},{"id":"7c06ca65.fe2be4","type":"function","z":"f3d21721.d1f9e8","name":"","func":"msg.payload={\"group\": {\"hide\": [\"Aptitude_Problem_Solver_Answer\"], \"show\": [\"Aptitude_Problem_Solver_Question\"]}}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":400,"wires":[["84c98311.664a3"]]},{"id":"8eb8db70.340368","type":"ui_button","z":"f3d21721.d1f9e8","name":"","group":"b6b128f1.2acd58","order":1,"width":0,"height":0,"passthru":false,"label":"Start / Reset","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":130,"y":400,"wires":[["7c06ca65.fe2be4"]]},{"id":"951971c2.ce42c","type":"ui_form","z":"f3d21721.d1f9e8","name":"","label":"","group":"4261c08a.c706e","order":2,"width":15,"height":1,"options":[{"label":"Enter your Question:","value":"Question ","type":"multiline","required":true,"rows":3}],"formValue":{"Question ":""},"payload":"","submit":"submit","cancel":"","topic":"topic","topicType":"msg","splitLayout":"","x":150,"y":120,"wires":[["c42dcd70.9d4e6","dfc8194a.ed4df8","67d69a31.aae274","cae884a2.0c2038"]]},{"id":"2fb1ec43.2fdf74","type":"ui_ui_control","z":"f3d21721.d1f9e8","name":"","events":"all","x":780,"y":60,"wires":[[]]},{"id":"84c98311.664a3","type":"ui_ui_control","z":"f3d21721.d1f9e8","name":"","events":"all","x":780,"y":400,"wires":[[]]},{"id":"ca131c1c.b7679","type":"ui_template","z":"f3d21721.d1f9e8","group":"4261c08a.c706e","name":"","order":1,"width":0,"height":0,"format":"<style>\n body{\n /*background-image:url('https://www.slashgear.com/wp-content/uploads/2017/06/bokeh_cc0_pixabay.jpg');*/\n background-repeat: no-repeat;\n background-size: cover;\n font-weight:bold;\n }\n .nr-dashboard-cardpanel {\n height:100%;\n }\n .md-toolbar-tools,.md-toolbar{\n font-weight:bold;\n }\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","x":140,"y":300,"wires":[[]]},{"id":"37b92841.76f768","type":"ui_text","z":"f3d21721.d1f9e8","group":"bc732c55.1febe","order":2,"width":15,"height":10,"name":"Solution","label":"","format":"{{msg.payload}}","layout":"row-left","x":780,"y":240,"wires":[]},{"id":"dfc8194a.ed4df8","type":"ui_text","z":"f3d21721.d1f9e8","group":"bc732c55.1febe","order":1,"width":6,"height":2,"name":"","label":"","format":"{{msg.payload}}","layout":"row-center","x":470,"y":180,"wires":[]},{"id":"cae884a2.0c2038","type":"pythonshell in","z":"f3d21721.d1f9e8","name":"","pyfile":"/home/ubuntu/new.py","virtualenv":"","continuous":true,"stdInData":true,"x":530,"y":280,"wires":[["37b92841.76f768","c6d0db3c.878928"]]},{"id":"b6b128f1.2acd58","type":"ui_group","name":"reset","tab":"a8dc433b.28f1","order":1,"disp":false,"width":3,"collapse":false},{"id":"4261c08a.c706e","type":"ui_group","name":"Question","tab":"a8dc433b.28f1","order":2,"disp":false,"width":15,"collapse":false},{"id":"bc732c55.1febe","type":"ui_group","name":"Answer","tab":"a8dc433b.28f1","order":3,"disp":true,"width":21,"collapse":true},{"id":"a8dc433b.28f1","type":"ui_tab","name":"Aptitude Problem Solver","icon":"home","order":1,"disabled":false,"hidden":false}]
I am trying to get input from dashboard and pass it to python script and display the output to screen.
But even the simple python file gives the same error. "exit code: -2, "
The python script is working absolutely fine on the server.
I have installed Node-RED on AWS by using EC2 as mentioned on the below link
https://nodered.org/docs/getting-started/aws#running-on-aws-ec2-with-ubuntu
[{"id":"f3d21721.d1f9e8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"c6d0db3c.878928","type":"debug","z":"f3d21721.d1f9e8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":800,"y":300,"wires":[]},{"id":"c42dcd70.9d4e6","type":"debug","z":"f3d21721.d1f9e8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":120,"wires":[]},{"id":"67d69a31.aae274","type":"function","z":"f3d21721.d1f9e8","name":"","func":"msg.payload={\"group\": {\"hide\": [\"Aptitude_Problem_Solver_Question\"], \"show\": [\"Aptitude_Problem_Solver_Answer\"]}}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":60,"wires":[["2fb1ec43.2fdf74"]]},{"id":"7c06ca65.fe2be4","type":"function","z":"f3d21721.d1f9e8","name":"","func":"msg.payload={\"group\": {\"hide\": [\"Aptitude_Problem_Solver_Answer\"], \"show\": [\"Aptitude_Problem_Solver_Question\"]}}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":400,"wires":[["84c98311.664a3"]]},{"id":"8eb8db70.340368","type":"ui_button","z":"f3d21721.d1f9e8","name":"","group":"b6b128f1.2acd58","order":1,"width":0,"height":0,"passthru":false,"label":"Start / Reset","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":130,"y":400,"wires":[["7c06ca65.fe2be4"]]},{"id":"951971c2.ce42c","type":"ui_form","z":"f3d21721.d1f9e8","name":"","label":"","group":"4261c08a.c706e","order":2,"width":15,"height":1,"options":[{"label":"Enter your Question:","value":"Question ","type":"multiline","required":true,"rows":3}],"formValue":{"Question ":""},"payload":"","submit":"submit","cancel":"","topic":"topic","topicType":"msg","splitLayout":"","x":150,"y":120,"wires":[["c42dcd70.9d4e6","dfc8194a.ed4df8","67d69a31.aae274","cae884a2.0c2038"]]},{"id":"2fb1ec43.2fdf74","type":"ui_ui_control","z":"f3d21721.d1f9e8","name":"","events":"all","x":780,"y":60,"wires":[[]]},{"id":"84c98311.664a3","type":"ui_ui_control","z":"f3d21721.d1f9e8","name":"","events":"all","x":780,"y":400,"wires":[[]]},{"id":"ca131c1c.b7679","type":"ui_template","z":"f3d21721.d1f9e8","group":"4261c08a.c706e","name":"","order":1,"width":0,"height":0,"format":"<style>\n body{\n /*background-image:url('https://www.slashgear.com/wp-content/uploads/2017/06/bokeh_cc0_pixabay.jpg');*/\n background-repeat: no-repeat;\n background-size: cover;\n font-weight:bold;\n }\n .nr-dashboard-cardpanel {\n height:100%;\n }\n .md-toolbar-tools,.md-toolbar{\n font-weight:bold;\n }\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","x":140,"y":300,"wires":[[]]},{"id":"37b92841.76f768","type":"ui_text","z":"f3d21721.d1f9e8","group":"bc732c55.1febe","order":2,"width":15,"height":10,"name":"Solution","label":"","format":"{{msg.payload}}","layout":"row-left","x":780,"y":240,"wires":[]},{"id":"dfc8194a.ed4df8","type":"ui_text","z":"f3d21721.d1f9e8","group":"bc732c55.1febe","order":1,"width":6,"height":2,"name":"","label":"","format":"{{msg.payload}}","layout":"row-center","x":470,"y":180,"wires":[]},{"id":"cae884a2.0c2038","type":"pythonshell in","z":"f3d21721.d1f9e8","name":"","pyfile":"/home/ubuntu/new.py","virtualenv":"","continuous":true,"stdInData":true,"x":530,"y":280,"wires":[["37b92841.76f768","c6d0db3c.878928"]]},{"id":"b6b128f1.2acd58","type":"ui_group","name":"reset","tab":"a8dc433b.28f1","order":1,"disp":false,"width":3,"collapse":false},{"id":"4261c08a.c706e","type":"ui_group","name":"Question","tab":"a8dc433b.28f1","order":2,"disp":false,"width":15,"collapse":false},{"id":"bc732c55.1febe","type":"ui_group","name":"Answer","tab":"a8dc433b.28f1","order":3,"disp":true,"width":21,"collapse":true},{"id":"a8dc433b.28f1","type":"ui_tab","name":"Aptitude Problem Solver","icon":"home","order":1,"disabled":false,"hidden":false}]I am trying to get input from dashboard and pass it to python script and display the output to screen.
But even the simple python file gives the same error. "exit code: -2, "
The python script is working absolutely fine on the server.