How to debug salt-ssh problems.

451 views
Skip to first unread message

Jeffery Tang

unread,
Nov 2, 2015, 4:55:52 PM11/2/15
to Salt-users
I'm trying to use salt-ssh for a deployment and I'm running into some problems, the big problem, is that I can't figure out what's going wrong.  The actual salt-call on the other end never sends any error output and doesn't seem to log anything.   How can I figure out what's going on my minions?  Sometimes, I can figure out the salt-call command being run and run that manually on the minion, but that doesn't always yield more information.

Colton Myers

unread,
Nov 13, 2015, 1:19:46 PM11/13/15
to salt-...@googlegroups.com
This is one area that I want to improve upon a lot. Right now we can't really see any of the logs from the salt-call call on the minion end, which makes debugging very difficult.

My process to date is to use debug log on the salt-ssh command, fetch the salt-call command out of that debug log, and run it manually on the minion in question, with -ldebug so I can see the debug logs on the minion side. That usually gets me to where I need to go. But know that this is definitely on our radar.

If you give me more information about what you're trying to do I could potentially help spot problems for you.

--
Colton Myers
Core Engineer, SaltStack
@basepi on Twitter/Github/IRC

> On Nov 2, 2015, at 2:55 PM, Jeffery Tang <jet...@signpost.com> wrote:
>
> I'm trying to use salt-ssh for a deployment and I'm running into some problems, the big problem, is that I can't figure out what's going wrong. The actual salt-call on the other end never sends any error output and doesn't seem to log anything. How can I figure out what's going on my minions? Sometimes, I can figure out the salt-call command being run and run that manually on the minion, but that doesn't always yield more information.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Salt-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

signature.asc

Thomas Güttler

unread,
May 2, 2016, 3:58:03 AM5/2/16
to Salt-users
Any progress on this topic?

How to debug salt-ssh?

I see these tracebacks a lot:

{{{

salt-ssh foohost state.sls monitoring test=True
[ERROR   ] JSON Render failed for:
[CRITICAL] Unable to import msgpack or msgpack_pure python modules
Traceback (most recent call last):
  File "/tmp/.root_dcdf8c_salt/salt-call", line 4, in <module>
    salt_call()
  File "/tmp/.root_dcdf8c_salt/salt/scripts.py", line 331, in salt_call
    client.run()
  File "/tmp/.root_dcdf8c_salt/salt/cli/call.py", line 53, in run
    caller.run()
  File "/tmp/.root_dcdf8c_salt/salt/cli/caller.py", line 148, in run
    self.opts)
  File "/tmp/.root_dcdf8c_salt/salt/output/__init__.py", line 86, in display_output
    display_data = try_printout(data, out, opts)
  File "/tmp/.root_dcdf8c_salt/salt/output/__init__.py", line 46, in try_printout
    return get_printout('raw', opts)(data).rstrip()
  File "/tmp/.root_dcdf8c_salt/salt/output/json_out.py", line 57, in output
    return json.dumps(data, default=repr, indent=4)
  File "/usr/lib64/python2.7/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/usr/lib64/python2.7/json/encoder.py", line 203, in encode
    chunks = list(chunks)
  File "/usr/lib64/python2.7/json/encoder.py", line 428, in _iterencode
    for chunk in _iterencode_dict(o, _current_indent_level):
  File "/usr/lib64/python2.7/json/encoder.py", line 402, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib64/python2.7/json/encoder.py", line 402, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib64/python2.7/json/encoder.py", line 402, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib64/python2.7/json/encoder.py", line 402, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib64/python2.7/json/encoder.py", line 384, in _iterencode_dict
    yield _encoder(value)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xfc in position 477: invalid start byte
[ERROR   ] No JSON object could be decoded
Reply all
Reply to author
Forward
0 new messages