The trust relationship between this workstation and the primary domain failed.

361 views
Skip to first unread message

CalgarySaltUser

unread,
Apr 18, 2015, 12:44:11 AM4/18/15
to salt-...@googlegroups.com
I'm running a masterless minion on windows and no matter what SLS I try to execute, I get the following trust relationship error. The user I'm running with has admin permissions,


$ /cygdrive/c/salt/salt-call --local state.sls test
[INFO    ] Loading fresh modules for state activity
[INFO    ] Fetching file from saltenv 'base', ** skipped ** latest already in cache 'salt://test.sls'
[INFO    ] Running state [c:\tomcat\base] at time 05:37:23.563000
[INFO    ] Executing state file.recurse for c:\tomcat\base
[ERROR   ] An exception occurred in this state: Traceback (most recent call last):
  File "salt/state.py", line 1531, in call
  File "salt/states/file.py", line 2192, in recurse
  File "salt/states/file.py", line 2100, in manage_directory
  File "salt/states/file.py", line 1683, in directory
  File "salt/modules/file.py", line 2679, in check_perms
  File "salt/modules/win_file.py", line 863, in stats
  File "salt/modules/win_file.py", line 281, in gid_to_group
  File "salt/modules/win_file.py", line 467, in uid_to_user
error: (1789, 'LookupAccountSid', 'The trust relationship between this workstation and the primary domain failed.')

[INFO    ] Completed state [c:\tomcat\base] at time 05:37:23.612000
[INFO    ] Executing command ['attrib', '-R', 'c:\\salt\\var\\cache\\salt\\minion\\sls.p'] in directory 'C:\\cygwin64\\home\\kad'
local:
----------
          ID: c:\tomcat\base
    Function: file.recurse
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "salt/state.py", line 1531, in call
                File "salt/states/file.py", line 2192, in recurse
                File "salt/states/file.py", line 2100, in manage_directory
                File "salt/states/file.py", line 1683, in directory
                File "salt/modules/file.py", line 2679, in check_perms
                File "salt/modules/win_file.py", line 863, in stats
                File "salt/modules/win_file.py", line 281, in gid_to_group
                File "salt/modules/win_file.py", line 467, in uid_to_user
              error: (1789, 'LookupAccountSid', 'The trust relationship between this workstation and the primary domain failed.')
     Started: 05:37:23.563000
    Duration: 49.0 ms
     Changes:

Summary
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1

Markus Kramer

unread,
Apr 18, 2015, 4:24:40 AM4/18/15
to salt-...@googlegroups.com
Can you please try
salt-call --local --return local state.sls test

CalgarySaltUser

unread,
Apr 18, 2015, 8:56:53 AM4/18/15
to salt-...@googlegroups.com
Hey thanks for getting back. I received the same error and here is the output:


kad@APS1LGIT0000QLP ~
$ /cygdrive/c/salt/salt-call --local --return local state.sls test
[INFO    ] Loading fresh modules for state activity
[INFO    ] Fetching file from saltenv 'base', ** skipped ** latest already in cache 'salt://test.sls'
[INFO    ] Running state [c:\tomcat\base] at time 13:54:36.370000
[INFO    ] Executing state file.recurse for c:\tomcat\base
[ERROR   ] An exception occurred in this state: Traceback (most recent call last):
  File "salt/state.py", line 1531, in call
  File "salt/states/file.py", line 2192, in recurse
  File "salt/states/file.py", line 2100, in manage_directory
  File "salt/states/file.py", line 1683, in directory
  File "salt/modules/file.py", line 2679, in check_perms
  File "salt/modules/win_file.py", line 863, in stats
  File "salt/modules/win_file.py", line 281, in gid_to_group
  File "salt/modules/win_file.py", line 467, in uid_to_user
error: (1789, 'LookupAccountSid', 'The trust relationship between this workstation and the primary domain failed.')

[INFO    ] Completed state [c:\tomcat\base] at time 13:54:38.704000
[INFO    ] Executing command ['attrib', '-R', 'c:\\salt\\var\\cache\\salt\\minion\\sls.p'] in directory 'C:\\cygwin64\\home\\kad'
{'fun_args': ['test'], 'jid': '20150418135429513000', 'return': {'file_|-c:\\tomcat\\base_|-c:\\tomcat\\base_|-recurse': {'comment': 'An exception occurred in this state: Traceback (most recent call last):\n  File "salt/state.py", line 1531, in call\n  File "salt/states/file.py", line 2192, in recurse\n  File "salt/states/file.py", line 2100, in manage_directory\n  File "salt/states/file.py", line 1683, in directory\n  File "salt/modules/file.py", line 2679, in check_perms\n  File "salt/modules/win_file.py", line 863, in stats\n  File "salt/modules/win_file.py", line 281, in gid_to_group\n  File "salt/modules/win_file.py", line 467, in uid_to_user\nerror: (1789, \'LookupAccountSid\', \'The trust relationship between this workstation and the primary domain failed.\')\n', 'name': 'c:\\tomcat\\base', 'start_time': '13:54:36.370000', 'result': False, 'duration': 2334.0, '__run_num__': 0, 'changes': {}}}, 'retcode': 2, 'success': True, 'fun': 'state.sls', 'id': 'ekDevWindows', 'out': 'highstate'}
local:
----------
          ID: c:\tomcat\base
    Function: file.recurse
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "salt/state.py", line 1531, in call
                File "salt/states/file.py", line 2192, in recurse
                File "salt/states/file.py", line 2100, in manage_directory
                File "salt/states/file.py", line 1683, in directory
                File "salt/modules/file.py", line 2679, in check_perms
                File "salt/modules/win_file.py", line 863, in stats
                File "salt/modules/win_file.py", line 281, in gid_to_group
                File "salt/modules/win_file.py", line 467, in uid_to_user
              error: (1789, 'LookupAccountSid', 'The trust relationship between this workstation and the primary domain failed.')
     Started: 13:54:36.370000
    Duration: 2334.0 ms
     Changes:

Summary
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1

kad@APS1LGIT0000QLP ~
$

Sam Lai

unread,
Apr 18, 2015, 9:03:44 AM4/18/15
to salt-...@googlegroups.com
This looks like the machine was/is connected to a Windows domain, but
for some reason, the machine cannot authenticate properly with it.
Salt uses the Windows APIs to look up user information, and for
machines that are connected to a domain, it will contact a domain
controller to do so.

You will need to fix the domain relationship first. Can you logon
using a domain user?
> --
> 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.

markus...@posteo.de

unread,
Apr 18, 2015, 9:13:30 AM4/18/15
to salt-...@googlegroups.com
That helped me once.
I'm sorry that it does not help you.
Unfortunately, I have no other idea, but you could attach the content of test.sls and the output of whoami.
--
You received this message because you are subscribed to a topic in the Google Groups "Salt-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/salt-users/CTJ0KIeRKEQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to salt-users+...@googlegroups.com.

CalgarySaltUser

unread,
Apr 18, 2015, 10:09:01 AM4/18/15
to salt-...@googlegroups.com
This was the hint I needed. I'm connecting from home on a work laptop and wasn't connected to the work network. Once I connected to the work network, my trust relationship was restored and the errors ceased. Thanks again!
Reply all
Reply to author
Forward
0 new messages