I am new to salt and have setup a master with 2 remote minions. All works perfectly well until after some time the master loses the connections from the minions. I think the TCP connection is getting drop by something in the salt stack. Debug shows nothing re connections being lost on either master or minion.
Is there a config setting to force the minions to reconnect?
Minion Report:
Salt Version:
Salt: 2017.7.4
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.5
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.13 (default, Nov 24 2017, 17:33:09)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 17.0.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.6
System Versions:
dist: debian 9.1
locale: UTF-8
machine: armv6l
release: 4.9.59+
system: Linux
version: debian 9.1
Master report:
Salt Version:
Salt: 2017.7.4
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.10
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.5
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.12 (default, Dec 4 2017, 14:50:18)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 17.0.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.6
System Versions:
dist: Ubuntu 16.04 xenial
locale: UTF-8
machine: x86_64
release: 4.4.0-104-generic
system: Linux
version: Ubuntu 16.04 xenial
salt-minion log after connection lost on master:
2018-03-02 09:35:27,072 [salt.utils.verify:525 ][WARNING ][10481] Insecure logging configuration detected! Sensitive data may be logged.
2018-03-02 09:35:28,973 [py.warnings :69 ][WARNING ][10481] /usr/local/lib/python2.7/dist-packages/salt/minion.py:802: DeprecationWarning:
zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
zmq.eventloop.ioloop.install()
salt-master log (UTC)
2018-03-01 22:57:03,312 [py.warnings :69 ][WARNING ][97734] /usr/local/lib/python2.7/dist-packages
/salt/utils/async.py:56: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now w
orks with default tornado and asyncio eventloops.
self.io_loop = LOOP_CLASS()
Related
I am getting the below error when trying to execute the robotframework test scripts.
Parent suite setup failed:
SessionNotCreatedException: Message: Error: NS_BINDING_ABORTED
Stacktrace:
#checkLoadingState#chrome://remote/content/shared/Navigate.jsm:209:28
onStateChange#chrome://remote/content/shared/Navigate.jsm:254:28
Tests.Suites.Layer2.Dhl.Dhl Session | FAIL |
Suite setup failed:
SessionNotCreatedException: Message: Error: NS_BINDING_ABORTED
Stacktrace:
#checkLoadingState#chrome://remote/content/shared/Navigate.jsm:209:28
onStateChange#chrome://remote/content/shared/Navigate.jsm:254:28
Below are the list of files installed:
I installed python 3.10.5
C:\aoswebtest>pip list
Package Version
async-generator 1.10
attrs 21.4.0
bcrypt 3.2.2
certifi 2022.5.18.1
cffi 1.15.0
cryptography 36.0.1
et-xmlfile 1.1.0
h11 0.13.0
idna 3.3
openpyxl 3.0.9
outcome 1.1.0
paramiko 2.11.0
pip 22.0.4
pycparser 2.21
pydevd 2.7.0
PyNaCl 1.5.0
pyOpenSSL 22.0.0
PyYAML 6.0
robotframework 4.1.3
robotframework-pythonlibcore 3.0.0
robotframework-seleniumlibrary 6.0.0
robotframework-sshlibrary 3.8.0
scapy 2.4.5
scp 0.14.4
selenium 4.1.0
setuptools 58.1.0
six 1.16.0
sniffio 1.2.0
sortedcontainers 2.4.0
trio 0.20.0
trio-websocket 0.9.2
urllib3 1.26.9
webcolors 1.11.1
wsproto 1.1.0
xlrd 2.0.1
Can you anyone help my with this?
I have the same error. I used my pc and run selenium with firefox then it works fine. But when I copy code and run other pc, it shows error NS_BINDING_ABORTED.
I fix it by: downgrade firefox version(from 103.x.x -> 92.x.x)
During the execution of the state, the manager "Chocolate" installs the package RealVNC (Program Files\Real VNC)
Next, I create a key in the registry.
I want the keys to be created only if the VNC installation was successful.
I have tried
Require:
- pkg: realvnc
Watch:
- file: C:\Program Files\Real VNC\vncserver.exe
Both options tell me that the target is not found
Sls
realvncsetup:
chocolatey.installed:
- name: realvnc
reg1:
reg.present:
- name: HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\vncserver
- vname: EnableAnalytics
- vdata: "0"
- vtype: REG_SZ
- watch:
- file: "C:\\Program Files\\RealVNC\\VNC Server"
Error
ID: reg1
Function: reg.present
Name: HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\vncserver
Result: False
Comment: The following requisites were not found:
require:
file: C:\Program Files\RealVNC\VNC Server
Started: 12:39:20.183205
Duration: 0.0 ms
Changes:
salt --versions
Salt Version:
Salt: 3002.1
Dependency Versions:
cffi: 1.12.2
cherrypy: unknown
dateutil: 2.7.3
docker-py: 3.4.1
gitdb: 2.0.5
gitpython: 2.1.11
Jinja2: 2.10
libgit2: 0.27.7
M2Crypto: Not Installed
Mako: 1.0.7
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: 1.3.10
pycparser: 2.19
pycrypto: 2.6.1
pycryptodome: 3.6.1
pygit2: 0.27.4
Python: 3.7.3 (default, Jul 25 2020, 13:03:44)
python-gnupg: 0.4.4
PyYAML: 3.13
PyZMQ: 17.1.2
smmap: 2.0.5
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist: debian 10 buster
locale: UTF-8
machine: x86_64
release: 4.19.0-6-amd64
system: Linux
version: Debian GNU/Linux 10 buster
The requisites that we mention, such as require, watch, etc. should be references to other states that are "scheduled" to run on the targets.
About watch
Even though the path is created by installing the "realvnc" package, there is no Salt state to handle the path. That is why it is showing the error.
Quoting from documentation for watch:
A watch requisite is used to add additional behavior when there are changes in other states.
So if you want to watch on a file, then there should be a state that "handles" the file using the file module.
About require
Also, while specifying require you are referring to pkg module, so Saltstack would look for pkg.installed for realvnc. Whereas you are using chocolatey.installed.
So with below modifications it should work fine.
chocolatey-install-realvnc:
chocolatey.installed:
- name: realvnc
# Use the appropriate path that should exist when realvnc is installed
check-progfiles-path:
file.exists:
- name: 'C:\Program Files\Real VNC\vncserver.exe'
# You can use either or both for require as you see fit
create-registry-entry:
reg.present:
- name: HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\vncserver
- vname: EnableAnalytics
- vdata: "0"
- vtype: REG_SZ
- require:
- file: 'C:\Program Files\Real VNC\vncserver.exe'
- chocolatey: realvnc
Trying to run sls but the salt tells me the function is not available
My sls. Must create a mongodump file
create-dump:
module.run:
- name: docker.run
- m_name: mongo
- cmd: 'mongodump --out=/Mongodump
when i'm run salt minion state.sls sls
i see:
ID: create-dump
Function: module.run
Name: docker.run
Result: False
Comment: Module function docker.run is not available
Started: 06:03:40.273781
Duration: 728.234 ms
Changes:
--Versions
Salt Version:
Salt: 3000
Dependency Versions:
cffi: 1.9.1
cherrypy: 3.5.0
dateutil: 2.5.3
docker-py: 4.3.1
gitdb: 2.0.0
gitpython: 2.1.1
Jinja2: 2.8
libgit2: 0.24.5
M2Crypto: Not Installed
Mako: 1.0.6
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: 1.3.7
pycparser: 2.17
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.24.2
Python: 3.5.3 (default, Jul 9 2020, 13:00:10)
python-gnupg: 0.3.9
PyYAML: 3.12
PyZMQ: 16.0.2
smmap: 2.0.1
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.2.1
System Versions:
dist: debian 9.6
locale: UTF-8
machine: x86_64
release: 4.9.0-8-amd64
system: Linux
version: debian 9.6
tried pip3 uninstall docker - not work
If i'm reboot server docker-py downgrade to 1.10.6 version
Make sure python-docker is installed on the minion.
I am trying to install a library pycryptodome on the salt master using pip and post installation version report doesn't show it correctly. However what i notice is the the version of the new installation get updated against pycrypto and not pycryptodome.
Do i need to reload anything. Or is there another way to install it ?
Below the version report.
ro#salt:~$ sudo salt --versions-report
Salt Version:
Salt: 3000.2
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.4.2
docker-py: Not Installed
gitdb: 0.6.4
gitpython: 1.0.1
Jinja2: 2.8
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.2
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.5.2 (default, Apr 16 2020, 17:47:17)
python-gnupg: 0.3.8
PyYAML: 3.11
PyZMQ: 15.2.0
smmap: 0.9.0
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
locale: ANSI_X3.4-1968
machine: x86_64
release: 4.4.0-178-generic
system: Linux
version: Ubuntu 16.04 xenial
Below report is after pip3 installation of pycryptodome. You can notice the version of pycrypto changed to 3.9.7 from 2.6.1
ro#salt:~$ salt --versions-report
Salt Version:
Salt: 3000.2
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.4.2
docker-py: Not Installed
gitdb: 0.6.4
gitpython: 1.0.1
Jinja2: 2.8
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.2
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 3.9.7
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.5.2 (default, Apr 16 2020, 17:47:17)
python-gnupg: 0.3.8
PyYAML: 3.11
PyZMQ: 15.2.0
smmap: 0.9.0
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
locale: ANSI_X3.4-1968
machine: x86_64
release: 4.4.0-178-generic
system: Linux
version: Ubuntu 16.04 xenial
ro#salt:~$
I was able to solve this problem with help from my colleague. The documentation for pycryptodome says that its drop-in replacement for pycrypto which is the reason it displays that way. Installing pycryptodomex will recognize pycryptodome as a standalone package.
ro#salt:~$ sudo salt --versions-report
Salt Version:
Salt: 3000.2
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.4.2
docker-py: Not Installed
gitdb: 0.6.4
gitpython: 1.0.1
Jinja2: 2.8
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.2
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: 3.9.7
pygit2: Not Installed
Python: 3.5.2 (default, Apr 16 2020, 17:47:17)
python-gnupg: 0.3.8
PyYAML: 3.11
PyZMQ: 15.2.0
smmap: 0.9.0
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
locale: UTF-8
machine: x86_64
release: 4.4.0-178-generic
system: Linux
version: Ubuntu 16.04 xenial
I am working with the "gitfs" feature of SaltStack in order to execute a state file.
The state file uses the "include" feature to embed other two state files from the repository.
My repository has the following hierarchy:
salt
- dir1
- dir3 / init.sls
- dir4 / init.sls
- dir2
- dir5 / init.sls
My master file is as below:
. . .
fileserver_backend:
- git
gitfs_remotes:
- https://username#bitbucket.org/path/to/repo.git
. . .
The salt/dir1/dir3/init.sls contains the following:
include:
- salt/dir2/dir5/init.sls
- salt/dir1/dir4/init.sls
. . .
On restarting salt-master and then executing
salt-run fileserver.file_list saltenv=base backend=git
shows me all the files from the repository.
But on running
salt '' state.apply salt.dir1.dir3 -l debug
I am getting the following error:
[ERROR ] Data passed to highstate outputter is not a valid highstate return: {'<minion-id>': ['Specified SLS salt/dir2/dir5/init.sls in saltenv base is not available on the salt master or through a configured fileserver', 'Specified SLS salt/dir1/dir4/init.sls in saltenv base is not available on the salt master or through a configured fileserver']}
My system configurations are as follows:
$ salt --versions-report
Salt Version:
Salt: 2016.3.3
Dependency Versions:
cffi: Not Installed
cherrypy: 3.2.2
dateutil: 1.5
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 0.9.1
msgpack-pure: Not Installed
msgpack-python: 0.3.0
mysql-python: 1.2.3
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 14.0.1
RAET: Not Installed
smmap: 0.8.2
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: Ubuntu 14.04 trusty
machine: x86_64
release: 3.13.0-91-generic
system: Linux
version: Ubuntu 14.04 trusty
The repository gets cached into the "/var/cache/salt/master/gitfs/refs/base/salt" path on restarting salt-master.
But I found "dir2/dir5/init/sls" instead of "dir2/dir5/init.sls"
What could be the reason for this issue?
The issue is most likely in your include declaration. Salt's include module treats SLS files similar to Python modules. For example, you would reference a SLS file foo/bar/baz.sls as foo.bar.baz.
Also, the init.sls file receives special treatment and enables you to treat an entire directory as a module. For example, foo.bar.baz would include either foo/bar/baz.sls or foo/bar/baz/init.sls (depending on which of them actually exists).
In conclusion, your include statement should look like this:
include:
- salt.dir2.dir5
- salt.dir1.dir4