Rundeck 2.5.1 - No matched nodes on locally executed job
I'm working with Rundeck v2.5.1 and I'm trying to configure a job which is executed locally. The job runs an inline script which runs another script. When I run the job (as admin), it seems as though Rundeck doesn't run any of the inline script. Here is the output from the job:
com.dtolabs.rundeck.core.NodesetEmptyException: No matched nodes: MultiNodeSelector{nodenames=[localhost]}
at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy.validateNodeSet(NodeFirstWorkflowStrategy.java:341)
at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy.executeWorkflowImpl(NodeFirstWorkflowStrategy.java:84)
at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflow(BaseWorkflowStrategy.java:182)
at com.dtolabs.rundeck.core.execution.WorkflowExecutionServiceThread.run(WorkflowExecutionServiceThread.java:55)
Exception: class com.dtolabs.rundeck.core.NodesetEmptyException: No matched nodes: MultiNodeSelector{nodenames=[localhost]}
No matched nodes: MultiNodeSelector{nodenames=[localhost]}
also, here is the admin.aclpolicy (/etc/rundeck/admin.aclpolicy)
description: Admin, all access.
context:
project: '.*' # all projects
for:
resource:
- allow: '*' # allow read/create all kinds
adhoc:
- allow: '*' # allow read/running/killing adhoc jobs
job:
- allow: '*' # allow read/write/delete/run/kill of all jobs
node:
- allow: '*' # allow read/run for all nodes
by:
group: admin
---
description: Admin, all access.
context:
application: 'rundeck'
for:
resource:
- allow: '*' # allow create of projects
project:
- allow: '*' # allow view/admin of all projects
storage:
- allow: '*' # allow read/create/update/delete for all /keys/* storage content
by:
group: admin
Rundeck is running on an EC2 instance in a VPC. The instance is running ubuntu 14.04.2 lts. After connecting to the instance via ssh, I can successfully curl Rundeck.
$ curl -I -L localhost:4440
HTTP/1.1 302 Found
Set-Cookie: JSESSIONID=s1uqcqv0n9h0p4t49m8j2sxx;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Location: http://localhost:4440/user/login;jsessionid=s1uqcqv0n9h0p4t49m8j2sxx
Content-Length: 0
Server: Jetty(7.6.0.v20120127)
HTTP/1.1 200 OK
Content-Language: en-US
Content-Type: text/html;charset=UTF-8
Content-Length: 5260
Server: Jetty(7.6.0.v20120127)
I've been looking around here and other groups/places but I haven't really been able to find anything that matches up with what I'm experiencing and the Rundeck version.
Has anyone using Rundeck 2.5.1 seen this type of error before/know how I can get this job running?
<3 mikey
Solution 1:
I just ran in to the exact same problem. I got it working by enabling
Include Server Node: Yes
in your main Resource Model Source
under your project configuration.
Solution 2:
Please monitor /var/log/rundeck/rundeck.audit.log
file for a while to get the right reason. It would give you more clues. Most likely your problem is similar to the one described below.
I've faced this problem with job created from API. The thing with rundeck is that it has separate ACL policy for API tokens, which don't really rely on groups of users issuing API tokens. This was out of common sense and a bit surprising, but nevertheless, i've got it working. If the problem setting is the same (job created from API), then try looking at /etc/rundeck/apitoken.aclpolicy
and make sure that it has allow: [read,run]
for node by api_token_group.
Solution 3:
I had to add Local
to the Node Sources
in Project Settings
.