Tag Archives: windows

[Win 10] Docker Error: error during connect: In the default daemon configuration on Windows

error during connect: In the default daemon configuration on Windows, 
the docker client must be run with elevated privileges to connect.: 
Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json: 
open //./pipe/docker_engine: The system cannot find the file specified.

solution: 

cd "C:\Program Files\Docker\Docker"
DockerCli.exe -SwitchDaemon

[Solved] getObject: FAILED RequestCoreException: cURL resource: Resource id #78; cURL error: SSL certificate

Reason:

The reason for this problem is that curl.cainfo is not configured, which is located in php.ini.

Solution:

Since the reasons for the errors are stated, it is much easier to solve them, as follows:

1. Download cacert

Download address: https://curl.haxx.se/ca/cacert.pem

2. Modify php.ini and restart

curl.cainfo="real_path/cacert.pem"

matters needing attention:

Needs to be turned on php_curl、php_openSSL extension;

[Solved] Error when vscode activates Python virtual environment

After executing Python – M venv myvenv to create a python virtual environment, the following error is reported when executing the script

The file D:\Tools\Python37\Scripts\Activate.ps1 could not be loaded, because running scripts is disabled on this system.

The reason is that windows prohibits unsigned scripts from running. You can solve this problem by executing the command set executionpolicy remotesigned in PowerShell.

Hololens2 reported an error. Microsoft.windows.system is missing

Assets\Microsoft.MixedReality.WebRTC.Unity\Scripts\Media\LocalVideoSource.cs(234,89): error CS0234: The type or namespace name ‘ProcessorArchitecture’ does not exist in the namespace ‘Microsoft.Windows.System’ (are you missing an assembly reference?)

Click the error reporting line to enter the code:

Method 1: modify the official code pre instruction   UNITY_ Wsa changed to   UNITY_ UWP

Method 2: directly delete the official judgment, and the code judges whether it is hololens1    , Return according to your judgment   True or false

  I use   Method two!

Redis Startup Error: Creating Server TCP listening socket 127.0.0.1:6379: bind: No error

Today, the redis service started in the window and reported an error:
Creating server TCP listening socket 127.0.0.1:6379: bind no error

The reason is that redis did not shut down normally after it was started;

The solution is as follows: enter the following commands in order to connect successfully

redis-cli.exe
shutdown
exit

Redis closes normally, exits, and then re-enter the command to start
redis-server.exe redis.windows.conf

OK!

Loadlibrary failed with error 126 workaround

The environment is windows10, the computer has dual network cards, and the independent graphics card is AMD radeon RX 640. The phenomenon is that opening some software will prompt “loaded library failed with error 126”

Solution:

    install the latest AMD radeon graphics card driver on the official website, search the “atio6axx. DLL” file with everything software, and copy the file to the “C: \ windows \ system32” directory. Right click the start icon in the lower left corner of the window desktop and select “windows PowerShell (administrator)”. Enter the command line and enter the command “copy atio6axx. DLL. DLL”
    it is said on the Internet to disable the independent graphics card, which is not recommended. This is not equivalent to buying an independent graphics card for nothing

Linux accesses the shared directory of windows, pysmb (parameter remote)_Name (defined)

Scheme I

net use this command is only available under windows.

Scheme II

sudo mount -t cifs -o username=administrator,password=password //remote_ share_ server_ ip/share_ Dir./data
this command must use root permission. It cannot be implemented for applications that cannot use root permission. If there is no sudo, an error will be reported:
mount: only root can use "-- options" option

Programme III

Python package pysmb

def check_unc_source(self, unc_path, username, password):
    conn = SMBConnection(username, password, '', remote_name, is_direct_tcp=True)
    result = conn.connect('remote_share_server_ip', 445)
    with open("local_file", "wb") as local_file:
        conn.retrieveFile("share_dir", "file", local_file)

The 4th parameter of SMBConnection, remote_name:

The NetBIOS machine name of the remote server.
On windows, you can find out the machine name by right-clicking on the “My Computer” and selecting “Properties”.
This parameter must be the same as what has been configured on the remote server, or else the connection will be rejected.

You can actually fill in the IP address of the server where the Windows remote shared directory is located, i.e. the same as the first parameter remote_share_server_ip of conn.connect, if it is empty, an error will be reported:
smb.smb_structs.OperationFailure: Failed to retrieve [file] on share_dir: Unable to connect to shared device

Solve the problem that WSL occupies too much C disk

It can be installed to other disks

Download Ubuntu installation package

Manually download Windows Subsystem for Linux (WSL) Distros | Microsoft Docs

Change the suffix (zip) and unzip it to another disk.

Open Ubuntu *. Exe and install it

Something went wrong

one

Error 0x800701bc WSL 2 ??????????????????

two  

Error 0x80370102

The first problem is that the windows service required by WSL is not enabled

Solution

Start the corresponding service in settings

The following services need to be enabled: 1. Hyper-V     2. Virtual machine platform       3. Windows subsystem for Linux

PS: windows11 setting steps,   Application – & gt; Optional function (pull to the bottom) – & gt; More windows services

The second problem is that the required files are not installed when wsl1 is upgraded to wsl2

Solution

Download the installation package and install it.

https://wslstorestorage.blob.core.windows.net/wslblob/wsl_ update_ x64.msi

When installing in other paths, the boot subsystem is the root user. If you don’t want to start WSL, the default is the root user. You can follow the steps below.

1. Add a new user,

sudo add username

2. Grant permission (nothing can be done without permission)

sudo usermod -a -G adm username

sudo usermod -a -G sudo username

3. Default user configuration for Ubuntu

.\ubuntu2004.exe config --default-user username

If the author enters PowerShell under the installation directory, the absolute path can be used for configuration without entering the installation directory.

pyvista error: root:GLEW could Missing GL version settlement method

Project scenario:

Windows10 + python3.6 + pyvista0.31.3

Problem Description:

Problem Description: after upgrading the windows system, a strange error suddenly appeared in the well run code about pyvista visualization ply file some time ago:

ERROR:root:GLEW could not be initialized: Missing GL version

Cause analysis:

After upgrading windows, some things have been added to the environment variable path, resulting in the environment variable being too long, exceeding the maximum length of 1023 characters, and the following environment variables have been truncated.


Solution:

Find a way to shorten the path of the environment variable, delete some paths that are not used very much, or use RapidEE environment variable editing tool to optimize

[Solved] Kafka Error: Discovered coordinator XXXXX:9092 (id: 2147483647 rack: null) for group itstyle.

Error information:

Discovered coordinator DESKTOP-NRTTBDM:9092 (id: 2147483647 rack: null) for group itstyle.

reason:

The host of Kafka running on windows is the machine name, not the IP address

So it will lead to error reporting

Desktop-nrttbdm is the host name of the server where the Kafka instance is located
and 9092 is the port of Kafka, that is, the connection address of Kafka.

Solution

Modify the hosts file directly

The windows hosts file is located in

C:\Windows\System32\drivers\etc\hosts

Open it with administrator’s permission and append the corresponding relationship between IP and host name

Add the

172.18.0.52 DESKTOP-NRTTBDM

Restart the service again

Problem solved!