Skip to content
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

Cannot get property 'nodeService' on null object #2

Closed
richhl opened this issue Mar 13, 2016 · 7 comments
Closed

Cannot get property 'nodeService' on null object #2

richhl opened this issue Mar 13, 2016 · 7 comments
Labels

Comments

@richhl
Copy link

richhl commented Mar 13, 2016

got this error while creating the project. have follwed your instructions selecting ansible model, executor and file copier.

text shown at web error page:

Request: /resources/createProjectPost?fcopy.0.config.keystoragepath=&fcopy=[0.config.keystoragepath:, 0:[config.keystoragepath:, config:[keystoragepath:, authentication:privateKey, keypath:, passwordstoragepath:], type:jsch-scp, config.authentication:privateKey, config.keypath:, config.passwordstoragepath:], 0.type:jsch-scp, 0.config.authentication:privateKey, 2.config.interpreter:, 2:[config.interpreter:, config:[interpreter:, filepath:, directory:, command:], type:script-copy, config.filepath:, config.directory:, config.command:], 2.type:script-copy, 0.config.keypath:, 0.config.passwordstoragepath:, 2.config.filepath:, 2.config.directory:, 2.config.command:, 1.type:com.batix.rundeck.AnsibleFileCopier, 1:[type:com.batix.rundeck.AnsibleFileCopier], 3.type:stub, 3:[type:stub]]&orig.nodeexec.0.config.passwordstoragepath=&orig=[nodeexec.0.config.passwordstoragepath:, nodeexec:[0.config.passwordstoragepath:, 0:[config.passwordstoragepath:, config:[passwordstoragepath:, authentication:, keypath:, keystoragepath:], config.authentication:, config.keypath:, config.keystoragepath:], 0.config.authentication:, 1.config.executable:/bin/bash, 1:[config.executable:/bin/bash, config:[executable:/bin/bash]], 0.config.keypath:, 2.config.command:, 2:[config.command:, config:[command:, interpreter:, directory:], config.interpreter:, config.directory:], 0.config.keystoragepath:, 2.config.interpreter:, 2.config.directory:], nodeexec.0.config.authentication:, fcopy.0.config.authentication:, fcopy:[0.config.authentication:, 0:[config.authentication:, config:[authentication:, keystoragepath:, keypath:, passwordstoragepath:], config.keystoragepath:, config.keypath:, config.passwordstoragepath:], 0.config.keystoragepath:, 2.config.command:, 2:[config.command:, config:[command:, interpreter:, directory:, filepath:], config.interpreter:, config.directory:, config.filepath:], 2.config.interpreter:, 0.config.keypath:, 0.config.passwordstoragepath:, 2.config.directory:, 2.config.filepath:], nodeexec.1.config.executable:/bin/bash, fcopy.0.config.keystoragepath:, fcopy.2.config.command:, fcopy.2.config.interpreter:, fcopy.0.config.keypath:, nodeexec.0.config.keypath:, fcopy.0.config.passwordstoragepath:, nodeexec.2.config.command:, nodeexec.0.config.keystoragepath:, fcopy.2.config.directory:, nodeexec.2.config.interpreter:, fcopy.2.config.filepath:, nodeexec.2.config.directory:]&nodeexec.2.config.directory=&nodeexec=[2.config.directory:, 2:[config.directory:, config:[directory:, interpreter:, command:], config.interpreter:, type:script-exec, config.command:], 0.config.keystoragepath:, 0:[config.keystoragepath:, config:[keystoragepath:, passwordstoragepath:, keypath:, authentication:privateKey], type:jsch-ssh, config.passwordstoragepath:, config.keypath:, config.authentication:privateKey], 3.type:stub, 3:[type:stub], 2.config.interpreter:, 0.type:jsch-ssh, 0.config.passwordstoragepath:, 0.config.keypath:, 1.config.executable:/bin/bash, 1:[config.executable:/bin/bash, config:[executable:/bin/bash], type:com.batix.rundeck.AnsibleNodeExecutor], 0.config.authentication:privateKey, 2.type:script-exec, 1.type:com.batix.rundeck.AnsibleNodeExecutor, 2.config.command:]&orig.nodeexec.0.config.authentication=&nodeexec.0.config.keystoragepath=&newproject=Ansible_TFG_Deployments&orig.fcopy.0.config.authentication=&orig.nodeexec.1.config.executable=/bin/bash&fcopy.0.type=jsch-scp&description=&fcopy.0.config.authentication=privateKey&nodeexec.3.type=stub&fcopy.2.config.interpreter=&fcopy.2.type=script-copy&index=1&orig.fcopy.0.config.keystoragepath=&plugin.1.type=com.batix.rundeck.AnsibleResourceModelSourceFactory&plugin=[1.type:com.batix.rundeck.AnsibleResourceModelSourceFactory, 1:[type:com.batix.rundeck.AnsibleResourceModelSourceFactory, saved:true, config.gatherFacts:true, config:[gatherFacts:true]], 1.saved:true, 1.config.gatherFacts:true]&fcopy.0.config.keypath=&fcopy.0.config.passwordstoragepath=&defaultNodeExec=1&nodeexec.2.config.interpreter=&orig.fcopy.2.config.command=&plugin.1.saved=true&create=Create&nodeexec.0.type=jsch-ssh&fcopy.2.config.filepath=&orig.fcopy.2.config.interpreter=&prefix=plugin.1.&nodeexec.0.config.passwordstoragepath=&nodeexec.0.config.keypath=&defaultFileCopy=1&orig.fcopy.0.config.keypath=&orig.nodeexec.0.config.keypath=&orig.fcopy.0.config.passwordstoragepath=&fcopy.2.config.directory=&nodeexec.1.config.executable=/bin/bash&SYNCHRONIZER_TOKEN=9c41755213c83ed083edb3e8144bbeaab2d4d58d9f3937f8aafb4f058f439a78&fcopy.2.config.command=&orig.nodeexec.2.config.command=&fcopy.1.type=com.batix.rundeck.AnsibleFileCopier&plugin.1.config.gatherFacts=true&nodeexec.0.config.authentication=privateKey&nodeexec.2.type=script-exec&SYNCHRONIZER_URI=/resources/createProject&orig.nodeexec.0.config.keystoragepath=&fcopy.3.type=stub&orig.fcopy.2.config.directory=&nodeexec.1.type=com.batix.rundeck.AnsibleNodeExecutor&nodeexec.2.config.command=&orig.nodeexec.2.config.interpreter=&orig.fcopy.2.config.filepath=&orig.nodeexec.2.config.directory=&33fbff4f_sel=/bin/bash
Message: Cannot get property 'nodeService' on null object
Caused by: Cannot get property 'nodeService' on null object
Class: FrameworkController
At Line: [862]
Code Snippet:

@frozenice
Copy link
Contributor

Please don't post pictures of stacktraces, it's a bit unreadable, some information is missing and I can't copy the text. Use normal text and wrap it with Backticks (`, or use "Insert code" from the GitHub toolbar).

Is this a fresh Rundeck install? Are you using other plugins?

Can you spot related errors in the logfiles (e.g. rundeck.log and service.log under /var/log/rundeck/)?

@richhl
Copy link
Author

richhl commented Mar 14, 2016

Fresh Rundeck install.

$>cat /etc/debian_version
7.9

$>uname -a
Linux xxxxxxxx 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux

$>java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-1~deb7u1)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

$>ls /var/lib/rundeck/libext/
ansible-plugin-1.0.0.jar
cache
rundeck-copyfile-plugin-2.6.4.jar
rundeck-flow-control-plugin-2.6.4.jar
rundeck-git-plugin-2.6.4.jar
rundeck-jasypt-encryption-plugin-2.6.4.jar
rundeck-job-state-plugin-2.6.4.jar
rundeck-localexec-plugin-2.6.4.jar
rundeck-orchestrator-plugin-2.6.4.jar
rundeck-script-plugin-2.6.4.jar
rundeck-stub-plugin-2.6.4.jar

$>cat /var/log/rundeck/rundeck.log | grep -b4 Exception
1135-2016-03-13 17:10:21,879 [main] INFO grails.app.conf.BootStrap - using rdeck.base config property: /var/lib/rundeck 1251-2016-03-13 17:10:21,895 [main] INFO grails.app.conf.BootStrap - loaded configuration: /etc/rundeck/framework.properties 1372-2016-03-13 17:10:22,074 [main] INFO grails.app.conf.BootStrap - RSS feeds disabled 1456-2016-03-13 17:10:22,167 [main] INFO grails.app.conf.BootStrap - Rundeck is ACTIVE: executions can be run. 1563:2016-03-13 17:45:27,443 [qtp193837291-57] ERROR org.codehaus.groovy.grails.web.errors.GrailsExceptionResolver - NullPointerException occurred when processing request: [POST] /resources/createProject 1762-Cannot get property 'nodeService' on null object. Stacktrace follows: 1832:java.lang.NullPointerException: Cannot get property 'nodeService' on null object 1913- at rundeck.controllers.FrameworkController$_createProjectPost_closure18.doCall(FrameworkController.groovy:868) 2025- at rundeck.controllers.FrameworkController.createProjectPost(FrameworkController.groovy:862) 2119- at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565) 2194- at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1360)

service.log throws same exception than rundeck.log

thx and sorry for the no legible images :)

@frozenice
Copy link
Contributor

Tanks for the detailed follow-up! :) I'll try to reproduce as soon as I can.

@frozenice
Copy link
Contributor

I couldn't reproduce this issue in a clean VM.

  • same Debian
  • Kernel: 3.2.73-2+deb7u3
  • same Java
  • fresh Rundeck 2.6.4-1 via .deb file
  • same ansible-plugin-1.0.0.jar
  • fresh Ansible 2.0.1.0 via pip
  • just one line in /etc/ansible/hosts:
localhost ansible_user=root ansible_ssh_pass=...
  • just this in /etc/ansible/ansible.cfg:
[defaults]
host_key_checking=false
  • installed sshpass to make Ansible work with the simple config

The only thing I then needed to do was: chown rundeck /var/lib/rundeck so the .ansible dir could be created when Ansible is run under the rundeck user.

I was able to create a new "full-Ansible" project and execute AdHoc commands.

Can your Rundeck user run Ansible? Check with something like su rundeck -s /bin/bash -c "ansible all -m ping".
Is there something special about your Ansible configuration / inventory?
Did you change something special in Rundeck?
Can you create a project with the default model source / executor / copier?
Can you reproduce it with a clean server and if so, what did you do differently than my steps?

@frozenice
Copy link
Contributor

@richhl any new info on this?

@richhl
Copy link
Author

richhl commented Mar 21, 2016

thx @frozenice it works once executed chown rundeck /var/lib/rundeck

maybe worthwhile to add this to README.

@frozenice
Copy link
Contributor

Great! I added some pitfalls to the README.

frozenice added a commit that referenced this issue Oct 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants