salt icon indicating copy to clipboard operation
salt copied to clipboard

Invalid SALT_API_END_POINT

Open ghost opened this issue 10 years ago • 2 comments

Description of Issue/Question

When running salt commands using RUNDECK salt step plugin, i can see the error :

Execution failed: 26: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [vmSaltMinion: ARGUMENTS_INVALID: http://172.18.1.2:8000 is not a valid endpoint.]}, Node failures: {vmSaltMinion=[ARGUMENTS_INVALID: http://172.18.1.2:8000 is not a valid endpoint.]}, status: failed]

when i run the same test.ping command using curl it is successful as shown below:

root@vmSaltMaster:/home/openstack# curl -ksi http://172.18.1.2:8000 -H "Accept: application/x-yaml" -H "X-Auth-Token: 26d0c3486d91a50db3dc15e4b3529d19169daae8" -d client='local' -d tgt='*' -d fun='test.ping' HTTP/1.1 200 OK Content-Length: 52 Access-Control-Expose-Headers: GET, POST Access-Control-Allow-Credentials: true Vary: Accept-Encoding Server: CherryPy/6.0.2.post-20160629 Allow: GET, HEAD, POST Cache-Control: private Date: Wed, 29 Jun 2016 15:16:33 GMT Access-Control-Allow-Origin: * Content-Type: application/x-yaml Set-Cookie: session_id=26d0c3486d91a50db3dc15e4b3529d19169daae8; expires=Thu, 30 Jun 2016 01:16:33 GMT; Path=/

return:

  • vmNetAppMinion: true vmSaltMinion: true

Setup

(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)

I am using http and port 4440 on rundeck and my SALT_API_ENDPOINT is http://172.18.1.2:8000

Steps to Reproduce Issue

(Include debug logs if possible and relevant.)

Debug logs from /var/log/rundeck/rundeck.log file shows :

2016-06-29 17:20:21,344 [qtp1000407791-57] INFO grails.app.services.rundeck.services.ScheduledExecutionService - scheduling immediate job run: TEMP:admin:1:6 2016-06-29 17:20:21,592 [Thread-130] ERROR com.dtolabs.rundeck.core.execution.workflow.steps.node.NodeStepPluginAdapter - Error executing node step. org.rundeck.plugin.salt.validation.SaltStepValidationException: http://172.18.1.2:8000 is not a valid endpoint. at org.rundeck.plugin.salt.SaltApiNodeStepPlugin.validate(SaltApiNodeStepPlugin.java:364) at org.rundeck.plugin.salt.SaltApiNodeStepPlugin.executeNodeStep(SaltApiNodeStepPlugin.java:222) at com.dtolabs.rundeck.core.execution.workflow.steps.node.NodeStepPluginAdapter.executeNodeStep(NodeStepPluginAdapter.java:106) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeNodeStep(ExecutionServiceImpl.java:149) at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:116) at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:58) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.dispatchToNodes(ExecutionServiceImpl.java:177) at com.dtolabs.rundeck.core.execution.workflow.steps.NodeDispatchStepExecutor.executeWorkflowStep(NodeDispatchStepExecutor.java:66) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeStep(ExecutionServiceImpl.java:116) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWFItem(BaseWorkflowStrategy.java:225) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflowItemsForNodeSet(BaseWorkflowStrategy.java:303) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflowItemsForNodeSet(BaseWorkflowStrategy.java:258) at com.dtolabs.rundeck.core.execution.workflow.StepFirstWorkflowStrategy.executeWorkflowImpl(StepFirstWorkflowStrategy.java:79) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflow(BaseWorkflowStrategy.java:182) at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy$DispatchedWorkflow.dispatch(NodeFirstWorkflowStrategy.java:383) at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:118) at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:64) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.dispatchToNodes(ExecutionServiceImpl.java:196) at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy.executeWFSectionNodeDispatch(NodeFirstWorkflowStrategy.java:189) at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy.executeWorkflowImpl(NodeFirstWorkflowStrategy.java:110) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflow(BaseWorkflowStrategy.java:182) at com.dtolabs.rundeck.core.execution.WorkflowExecutionServiceThread.run(WorkflowExecutionServiceThread.java:55) 2016-06-29 17:20:21,599 [quartzScheduler_Worker-2] ERROR grails.app.services.rundeck.services.ExecutionUtilService - Execution failed: 6: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [vmSaltMinion: ARGUMENTS_INVALID: http://172.18.1.2:8000 is not a valid endpoint.]}, Node failures: {vmSaltMinion=[ARGUMENTS_INVALID: http://172.18.1.2:8000 is not a valid endpoint.]}, status: failed]

Debug logs from the salt master server /var/log/salt/master :

root@vmSaltMaster:/etc/rundeck# cat /var/log/salt/master 2016-06-25 22:43:49,572 [salt.master ][WARNING ][6238] Authentication failure of type "user" occurred. 2016-06-25 23:04:24,670 [salt.cli.daemons ][INFO ][15423] Setting up the Salt Master 2016-06-29 15:39:15,222 [salt.master ][WARNING ][2341] Authentication failure of type "eauth" occurred. 2016-06-29 15:40:48,828 [salt.master ][WARNING ][2340] Authentication failure of type "eauth" occurred. 2016-06-29 15:43:36,327 [salt.master ][WARNING ][2343] Authentication failure of type "eauth" occurred. 2016-06-29 15:44:13,941 [salt.master ][WARNING ][2339] Authentication failure of type "eauth" occurred. 2016-06-29 15:46:20,330 [salt.master ][WARNING ][2341] Authentication failure of type "eauth" occurred.

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

root@vmSaltMaster:/home/openstack# salt --versions-report Salt: 2015.5.3 Python: 2.7.6 (default, Jun 22 2015, 17:58:13) Jinja2: 2.7.2 M2Crypto: 0.21.1 msgpack-python: 0.3.0 msgpack-pure: Not Installed pycrypto: 2.6.1 libnacl: Not Installed PyYAML: 3.10 ioflo: Not Installed PyZMQ: 14.0.1 RAET: Not Installed ZMQ: 4.0.4 Mako: Not Installed Tornado: Not Installed Debian source package: 2015.5.3+ds-1trusty1 root@vmSaltMaster:/home/openstack#

ghost avatar Jun 29 '16 15:06 ghost

I'm experiencing a similar issue. Do you recall what was done to rectify this?

joeydouglas avatar Jun 12 '17 20:06 joeydouglas

Yes, the current rundeck release doesn't support http, instead it's completely operational only with https SSL certificate and this certificate should be public. I was able to fix the issue with a http v2 patch which allowed me to send requests from rundeck to salt api.

ghost avatar Jun 13 '17 20:06 ghost