salt-minion refuses to run on ubuntu 16.04 due to something wrong with python











up vote
0
down vote

favorite












I've done a reinstall of python



sudo apt-get install --reinstall python


That didn't fix it. Then I noticed pip wasn't even working, so I tried



for pkg in `dpkg --get-selections | egrep -v 'deinstall' | egrep python | awk '{print $1}'`; do  apt-get -y --force-yes install --reinstall $pkg ; done


which I got over here. That got me back to a working python2.7.12 and a working pip, but when I try running salt-minion again, I get:



root@box:~# salt-minion -l debug
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] Configuration file path: /etc/salt/minion
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
[INFO ] Setting up the Salt Minion "box.mydomain.tld"
[DEBUG ] Marking 'base64_encode' as a jinja filter
[DEBUG ] Marking 'base64_decode' as a jinja filter
[DEBUG ] Marking 'md5' as a jinja filter
[DEBUG ] Marking 'sha256' as a jinja filter
[DEBUG ] Marking 'sha512' as a jinja filter
[DEBUG ] Marking 'hmac' as a jinja filter
[DEBUG ] Marking 'random_hash' as a jinja filter
[DEBUG ] Marking 'rand_str' as a jinja filter
[DEBUG ] Marking 'file_hashsum' as a jinja filter
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 146, in minion_process
minion.start()
File "/usr/lib/python2.7/dist-packages/salt/cli/daemons.py", line 343, in start
super(Minion, self).start()
File "/usr/lib/python2.7/dist-packages/salt/utils/parsers.py", line 1044, in start
self.prepare()
File "/usr/lib/python2.7/dist-packages/salt/cli/daemons.py", line 311, in prepare
import salt.minion
File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 81, in <module>
import salt.pillar
File "/usr/lib/python2.7/dist-packages/salt/pillar/__init__.py", line 20, in <module>
import salt.fileclient
File "/usr/lib/python2.7/dist-packages/salt/fileclient.py", line 32, in <module>
import salt.utils.http
File "/usr/lib/python2.7/dist-packages/salt/utils/http.py", line 80, in <module>
import requests
File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 53, in <module>
from .packages.urllib3.contrib import pyopenssl
File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 54, in <module>
import OpenSSL.SSL
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 12, in <module>
from cryptography import x509
File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/__init__.py", line 8, in <module>
from cryptography.x509.base import (
File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/base.py", line 16, in <module>
from cryptography.x509.extensions import Extension, ExtensionType
File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/extensions.py", line 24, in <module>
from cryptography.x509.general_name import GeneralName, IPAddress, OtherName
File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/general_name.py", line 18, in <module>
from cryptography.x509.name import Name
File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/name.py", line 28, in <module>
_ASN1_TYPE_TO_ENUM = dict((i.value, i) for i in _ASN1Type)
TypeError: 'type' object is not iterable


I realize after troubleshooting a lot that I have both python2.7.12 and python 3.5.2 installed. I saw this tip on a bug about the cryptography module for python, so I tried



pip install enum34


but that didn't make difference either.



I'd really like to get salt-minion running on this box. Can someone recommend a way to fix my python installation?










share|improve this question


























    up vote
    0
    down vote

    favorite












    I've done a reinstall of python



    sudo apt-get install --reinstall python


    That didn't fix it. Then I noticed pip wasn't even working, so I tried



    for pkg in `dpkg --get-selections | egrep -v 'deinstall' | egrep python | awk '{print $1}'`; do  apt-get -y --force-yes install --reinstall $pkg ; done


    which I got over here. That got me back to a working python2.7.12 and a working pip, but when I try running salt-minion again, I get:



    root@box:~# salt-minion -l debug
    [DEBUG ] Reading configuration from /etc/salt/minion
    [DEBUG ] Configuration file path: /etc/salt/minion
    [WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
    [INFO ] Setting up the Salt Minion "box.mydomain.tld"
    [DEBUG ] Marking 'base64_encode' as a jinja filter
    [DEBUG ] Marking 'base64_decode' as a jinja filter
    [DEBUG ] Marking 'md5' as a jinja filter
    [DEBUG ] Marking 'sha256' as a jinja filter
    [DEBUG ] Marking 'sha512' as a jinja filter
    [DEBUG ] Marking 'hmac' as a jinja filter
    [DEBUG ] Marking 'random_hash' as a jinja filter
    [DEBUG ] Marking 'rand_str' as a jinja filter
    [DEBUG ] Marking 'file_hashsum' as a jinja filter
    Process Process-1:
    Traceback (most recent call last):
    File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
    File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
    File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 146, in minion_process
    minion.start()
    File "/usr/lib/python2.7/dist-packages/salt/cli/daemons.py", line 343, in start
    super(Minion, self).start()
    File "/usr/lib/python2.7/dist-packages/salt/utils/parsers.py", line 1044, in start
    self.prepare()
    File "/usr/lib/python2.7/dist-packages/salt/cli/daemons.py", line 311, in prepare
    import salt.minion
    File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 81, in <module>
    import salt.pillar
    File "/usr/lib/python2.7/dist-packages/salt/pillar/__init__.py", line 20, in <module>
    import salt.fileclient
    File "/usr/lib/python2.7/dist-packages/salt/fileclient.py", line 32, in <module>
    import salt.utils.http
    File "/usr/lib/python2.7/dist-packages/salt/utils/http.py", line 80, in <module>
    import requests
    File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 53, in <module>
    from .packages.urllib3.contrib import pyopenssl
    File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 54, in <module>
    import OpenSSL.SSL
    File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
    File "/usr/local/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 12, in <module>
    from cryptography import x509
    File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/__init__.py", line 8, in <module>
    from cryptography.x509.base import (
    File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/base.py", line 16, in <module>
    from cryptography.x509.extensions import Extension, ExtensionType
    File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/extensions.py", line 24, in <module>
    from cryptography.x509.general_name import GeneralName, IPAddress, OtherName
    File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/general_name.py", line 18, in <module>
    from cryptography.x509.name import Name
    File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/name.py", line 28, in <module>
    _ASN1_TYPE_TO_ENUM = dict((i.value, i) for i in _ASN1Type)
    TypeError: 'type' object is not iterable


    I realize after troubleshooting a lot that I have both python2.7.12 and python 3.5.2 installed. I saw this tip on a bug about the cryptography module for python, so I tried



    pip install enum34


    but that didn't make difference either.



    I'd really like to get salt-minion running on this box. Can someone recommend a way to fix my python installation?










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I've done a reinstall of python



      sudo apt-get install --reinstall python


      That didn't fix it. Then I noticed pip wasn't even working, so I tried



      for pkg in `dpkg --get-selections | egrep -v 'deinstall' | egrep python | awk '{print $1}'`; do  apt-get -y --force-yes install --reinstall $pkg ; done


      which I got over here. That got me back to a working python2.7.12 and a working pip, but when I try running salt-minion again, I get:



      root@box:~# salt-minion -l debug
      [DEBUG ] Reading configuration from /etc/salt/minion
      [DEBUG ] Configuration file path: /etc/salt/minion
      [WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
      [INFO ] Setting up the Salt Minion "box.mydomain.tld"
      [DEBUG ] Marking 'base64_encode' as a jinja filter
      [DEBUG ] Marking 'base64_decode' as a jinja filter
      [DEBUG ] Marking 'md5' as a jinja filter
      [DEBUG ] Marking 'sha256' as a jinja filter
      [DEBUG ] Marking 'sha512' as a jinja filter
      [DEBUG ] Marking 'hmac' as a jinja filter
      [DEBUG ] Marking 'random_hash' as a jinja filter
      [DEBUG ] Marking 'rand_str' as a jinja filter
      [DEBUG ] Marking 'file_hashsum' as a jinja filter
      Process Process-1:
      Traceback (most recent call last):
      File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
      self.run()
      File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
      self._target(*self._args, **self._kwargs)
      File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 146, in minion_process
      minion.start()
      File "/usr/lib/python2.7/dist-packages/salt/cli/daemons.py", line 343, in start
      super(Minion, self).start()
      File "/usr/lib/python2.7/dist-packages/salt/utils/parsers.py", line 1044, in start
      self.prepare()
      File "/usr/lib/python2.7/dist-packages/salt/cli/daemons.py", line 311, in prepare
      import salt.minion
      File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 81, in <module>
      import salt.pillar
      File "/usr/lib/python2.7/dist-packages/salt/pillar/__init__.py", line 20, in <module>
      import salt.fileclient
      File "/usr/lib/python2.7/dist-packages/salt/fileclient.py", line 32, in <module>
      import salt.utils.http
      File "/usr/lib/python2.7/dist-packages/salt/utils/http.py", line 80, in <module>
      import requests
      File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 53, in <module>
      from .packages.urllib3.contrib import pyopenssl
      File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 54, in <module>
      import OpenSSL.SSL
      File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
      from OpenSSL import crypto, SSL
      File "/usr/local/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 12, in <module>
      from cryptography import x509
      File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/__init__.py", line 8, in <module>
      from cryptography.x509.base import (
      File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/base.py", line 16, in <module>
      from cryptography.x509.extensions import Extension, ExtensionType
      File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/extensions.py", line 24, in <module>
      from cryptography.x509.general_name import GeneralName, IPAddress, OtherName
      File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/general_name.py", line 18, in <module>
      from cryptography.x509.name import Name
      File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/name.py", line 28, in <module>
      _ASN1_TYPE_TO_ENUM = dict((i.value, i) for i in _ASN1Type)
      TypeError: 'type' object is not iterable


      I realize after troubleshooting a lot that I have both python2.7.12 and python 3.5.2 installed. I saw this tip on a bug about the cryptography module for python, so I tried



      pip install enum34


      but that didn't make difference either.



      I'd really like to get salt-minion running on this box. Can someone recommend a way to fix my python installation?










      share|improve this question













      I've done a reinstall of python



      sudo apt-get install --reinstall python


      That didn't fix it. Then I noticed pip wasn't even working, so I tried



      for pkg in `dpkg --get-selections | egrep -v 'deinstall' | egrep python | awk '{print $1}'`; do  apt-get -y --force-yes install --reinstall $pkg ; done


      which I got over here. That got me back to a working python2.7.12 and a working pip, but when I try running salt-minion again, I get:



      root@box:~# salt-minion -l debug
      [DEBUG ] Reading configuration from /etc/salt/minion
      [DEBUG ] Configuration file path: /etc/salt/minion
      [WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
      [INFO ] Setting up the Salt Minion "box.mydomain.tld"
      [DEBUG ] Marking 'base64_encode' as a jinja filter
      [DEBUG ] Marking 'base64_decode' as a jinja filter
      [DEBUG ] Marking 'md5' as a jinja filter
      [DEBUG ] Marking 'sha256' as a jinja filter
      [DEBUG ] Marking 'sha512' as a jinja filter
      [DEBUG ] Marking 'hmac' as a jinja filter
      [DEBUG ] Marking 'random_hash' as a jinja filter
      [DEBUG ] Marking 'rand_str' as a jinja filter
      [DEBUG ] Marking 'file_hashsum' as a jinja filter
      Process Process-1:
      Traceback (most recent call last):
      File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
      self.run()
      File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
      self._target(*self._args, **self._kwargs)
      File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 146, in minion_process
      minion.start()
      File "/usr/lib/python2.7/dist-packages/salt/cli/daemons.py", line 343, in start
      super(Minion, self).start()
      File "/usr/lib/python2.7/dist-packages/salt/utils/parsers.py", line 1044, in start
      self.prepare()
      File "/usr/lib/python2.7/dist-packages/salt/cli/daemons.py", line 311, in prepare
      import salt.minion
      File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 81, in <module>
      import salt.pillar
      File "/usr/lib/python2.7/dist-packages/salt/pillar/__init__.py", line 20, in <module>
      import salt.fileclient
      File "/usr/lib/python2.7/dist-packages/salt/fileclient.py", line 32, in <module>
      import salt.utils.http
      File "/usr/lib/python2.7/dist-packages/salt/utils/http.py", line 80, in <module>
      import requests
      File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 53, in <module>
      from .packages.urllib3.contrib import pyopenssl
      File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 54, in <module>
      import OpenSSL.SSL
      File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
      from OpenSSL import crypto, SSL
      File "/usr/local/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 12, in <module>
      from cryptography import x509
      File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/__init__.py", line 8, in <module>
      from cryptography.x509.base import (
      File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/base.py", line 16, in <module>
      from cryptography.x509.extensions import Extension, ExtensionType
      File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/extensions.py", line 24, in <module>
      from cryptography.x509.general_name import GeneralName, IPAddress, OtherName
      File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/general_name.py", line 18, in <module>
      from cryptography.x509.name import Name
      File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/name.py", line 28, in <module>
      _ASN1_TYPE_TO_ENUM = dict((i.value, i) for i in _ASN1Type)
      TypeError: 'type' object is not iterable


      I realize after troubleshooting a lot that I have both python2.7.12 and python 3.5.2 installed. I saw this tip on a bug about the cryptography module for python, so I tried



      pip install enum34


      but that didn't make difference either.



      I'd really like to get salt-minion running on this box. Can someone recommend a way to fix my python installation?







      python python-2.7 ubuntu-16.04 salt-stack






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 5 at 7:08









      phpguru

      1,9161924




      1,9161924





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53149784%2fsalt-minion-refuses-to-run-on-ubuntu-16-04-due-to-something-wrong-with-python%23new-answer', 'question_page');
          }
          );

          Post as a guest





































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53149784%2fsalt-minion-refuses-to-run-on-ubuntu-16-04-due-to-something-wrong-with-python%23new-answer', 'question_page');
          }
          );

          Post as a guest




















































































          這個網誌中的熱門文章

          Tangent Lines Diagram Along Smooth Curve

          Yusuf al-Mu'taman ibn Hud

          Zucchini