-
Notifications
You must be signed in to change notification settings - Fork 363
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
Unable to run any jobs - Cannot read property 'setEncoding' of undefined #133
Comments
Thank you for this issue report. I have never seen anything like this before, and cannot fathom how it is possibly crashing at that point in the code. That is completely bizarre. From the stack trace it looks like you are using the Shell Plugin. Can you share the shell script code you are trying to run? I am trying to determine if there is something weird about your shell syntax that is causing a crash at this spot. Thanks. |
Hi The script I run is:
I am running a docker version on my mac and it works great - with the same script The AWS EC2 instance I am running Centos on, has been hardened, but node had raised no errors while installing, nor did Cronicle as far as I can see |
That really makes no sense. That's the world's simplest shell script 😆 It's so strange, because I use both AWS and CentOS. I've been running Cronicle on AWS instances with CentOS 7 in live production for 3 years, and I've never seen anything like this. It's so odd. It looks like something has gone haywire with the STDIN / STDOUT pipes between the two processes. Cronicle does a child process exec to the Shell Plugin script, and it is somehow not able to connect up the pipes. I'm really scratching my head on this one.
What do you mean by "hardened" may I ask? |
As part of the build I run this script this ansible script on the server: https://github.com/MindPointGroup/RHEL7-CIS It locks down a whole load of settings on the server, there is a good chance this is what is causing the problem, however going through the settings it applies, I cannot see where or how it is causing the problem Chris |
Ah, interesting. I've never used such a hardening script before, so I don't know what this is doing. However, I could take a guess... The way the Cronicle Shell Plugin works is, it takes your raw shell code from the UI, and writes it to a temporary file (the temp dir it uses is whatever Node's os.tmpdir() returns, usually |
That'll be it - my /tmp directory is setup to prevent any code being executed in it. I'll look into relaxing that rule |
Is it possible to point the cronicle script to use a directory other than /tmp? Thanks! |
I believe you can set an environment variable to do this. Cronicle queries the Node.js os.tmpdir() function to get the temp dir path, and I believe that just reads it from the You might be able to specify it in the Cronicle configuration file here: job_env |
Sorry for digging up an old thread - but I just bumped into this error (which looks the same as #220 ), and it turns out the issue was that my custom plugin files had insufficient permissions for cronicle to read. |
@danwild Thank you for letting me know about this detail. I will try to reproduce this and come up with a more graceful error condition in a future release. |
Summary
I have created installed a new single server instance of Cronicle, however when I run any job it failes with the following message:
Steps to reproduce the problem
I installed cronicle as per the installation documentation and tried to run a test job
Your Setup
As per installation instructions
Operating system and version?
Centos 7.5.1804
Node.js version?
10.12.0
Cronicle software version?
Are you using a multi-server setup, or just a single server?
Single server
Are you using the filesystem as back-end storage, or S3/Couchbase?
Filesystem
Can you reproduce the crash consistently?
Yes
Log Excerpts
The text was updated successfully, but these errors were encountered: