Possible problems and solutions for salt and Psutil on Windows 2003

Source: Internet
Author: User

Today I installed the salt on Windows 2003 and found that it could not be started, followed by a pit with one, let's go through each one.

Problem One (salt cannot start)

Salt does not start, error results

Solve

This kind of mistake is completely unreasonable, in the belief salt principle, we see if Python can start normally, thus creating new problems.

Problem Two (Python cannot start)

Start the C:\salt\bin\python and the discovery still fails to start. This is strange, I have reason to believe that this may be the salt comes with the python problem. Then download a new package from the Python website Python2.7.12 look, after installation found that the official website of the Python boot normal. Is it the initialization of some environment variables? Back to see the salt of Python can use, miraculously good ~

Solve

Reinstall Python on the official website, and then try python in the salt.

The reason for this is that Windows 2003 was originally loaded with python, but probably because the uninstallation was not complete later, and the various software installations in the middle affected some environment variables, which caused the python in the salt to not start properly.

Question three (lack of MSCVCR100.dll)

Since the Python startup problem has been fixed, then start Salt-minion. This time turn on debug mode, see if it can start normally, can not start and will have detailed information. The execution of the C:\salt\salt-minion-debug.bat, the result of not too long reported this mistake:

Solve

Now that the old man in Windows 2003 has made it clear that we are missing the MSVCR100.dll dynamic link library, find it. This library is vc++2010, so download the Microsoft Visual C + + 2010 Redistributable Package (x86) from Microsoft's official website, and after the installation is complete, start salt-minion without error.

Question four (in Psutil ' from. Import _psutil_windows as Cext ' Error)

Due to the use of Psutil in the project, naturally thought to test the salt comes with the Python third-party psutil can be used normally, the result is regrettable:

What the hell is this? Can not import the reason is too vague, DLL import failed?! which dll?

To error the corresponding directory to see it, that is, C:\salt\bin\lib\site-packages\psutil\, found to import the _psutil_windows package is actually _psutil_windows.pyd this link library. If you fail to import this link library, let's see what the link library links to.

Using Dependency Walker to see the problem:

Solve

Fill in the missing two DLLs (Msvcr90.dll, Msjava.dll)? There are still problems after filling up, see below.

Issue five (at least one module have an unresolved import ... )

After two DLLs are added, an error is also displayed:

Depending on the display in the picture, there is probably a problem with the import or import of Iphlpapi.dll and Kernel32.dll. But these two are systematic, what can Nai?

Regardless of this error, try running the next Python, and then import Psutil, to see if it will error:

It seems to be an old mistake that cannot be avoided.

is salt pre-assembled psutil problematic? Go to C:\salt\bin\scripts\ under, pip uninstall Psutil unload and reload again try, result still not.

It is very strange that the whim should not be high version of the Psutil does not support the lower version of the system caused it? So again unload Psutil, installed a 1.x version of the test, the results can be.

Solve

To install a low version of Psutil, be aware that the functionality of the psutil you are using may not be present in the lower version.

Question Six (can I use the Salt module-dependent WMI?) )

See a description of Windows 2003 from the Salt official web site:

It seems that WMI requires additional installation.

Let's see if WMI can properly import it:

Well, WMI library can be imported normally, the project to use the WMIC (the first input in CMD, will be installed automatically) can also be used normally, happy.

Summarize

On the lower version of the system, there may be a variety of unexpected pits. Make a record again to leave as a memo, also for the future may trample the pit of the classmate learn from experience.

Possible problems and solutions for salt and Psutil on Windows 2003

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.