Category Archives: How to Fix

How to Solve Vue Command Not Work Issue in win7_64

question

After win7_64 installs vue, the vue command execution returns:

errno: -4054,
code: ‘ENOSYS’,
message: ‘function not implemented’,
syscall: ‘uv_os_gethostname’

 

 

 

Solution :

Find the error entry file: 

node_modules\@vue\cli\node_modules\@achrinza\node-ipc\entities\Defaults.js,

Add os.hostname=()=>”localhost”

 

 

> then the vue command is available

 

 

 

refer to:

https://dev.to/napster/fix-vercel-error-a-system-error-occurred-uvosgethostname-returned-enosys-function-not-implemented-5da6

MQTT Host name verification failure (SSL) [How to Solve]

Error Messages:

mosquitto_pub -d -h 192.168.1.10 -p 1883 -t hello -m 123 --cafile ~/cacert.pem
Client null sending CONNECT
Error: host name verification failed.
OpenSSL Error[0]: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Error: Protocol error

 

Solution:

Add an option: –insecure

mosquitto_pub -d -h 192.168.1.10 -p 1883 -t hello -m 123 --cafile ~/cacert.pem --insecure
Client null sending CONNECT
Client null received CONNACK (0)
Client null sending PUBLISH (d0, q0, r0, m1, 'hello', ... (3 bytes))
Client null sending DISCONNECT

Reference:

https://community.home-assistant.io/t/mqtt-host-name-verification-failure-ssl/337356

Centos Failed to Modify the port of SSH: error: Bind to port 27615 on 0.0.0.0 failed: Permission denied.

Error screenshot

problem causes

selinux problem

Solution

Modify the port of sshd in selinux

# Install the modification tool
$ yum -y install policycoreutils-python

# Check the port of sshd in selinux, the output is 22
$ semanage port -l | grep ssh

# New ports
$ semanage port -a -t ssh_port_t -p tcp 27615

$ systemctl status sshd
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2022-10-29 10:10:08 CST; 36min ago
     Docs: man:sshd(8)
           man:sshd_config(5)
 Main PID: 8653 (sshd)
   CGroup: /system.slice/sshd.service
           └─8653 /usr/sbin/sshd -D

Oct 29 10:10:08 centos-linux.shared systemd[1]: Starting OpenSSH server daemon...
Oct 29 10:10:08 centos-linux.shared sshd[8653]: Server listening on 0.0.0.0 port 27615.
Oct 29 10:10:08 centos-linux.shared systemd[1]: Started OpenSSH server daemon.
Oct 29 10:31:44 centos-linux.shared sshd[18735]: Accepted password for root from 10.211.55.2 port 50375 ssh2

failed (13: Permission denied) while reading upstream [How to Solve]

Error Messages:

2022/10/20 18:38:56 [crit] 67121#0: *16996 open() "/app/openresty/nginx/proxy_temp/8/03/0000000038" failed (13: Permission denied) while reading upstream, client: 100.xxx.xxx.92, server: sfimplat.sf-express.com, request: "GET /sfimplat/release/issuesql/query HTTP/1.1", upstream: "http://100.111.xxx.xxx:9080/sfimplat/release/issuesql/query", host: "100.111.136.71", referrer: "http://100.xxx.xxx.xxx/issue/sql/approve"

 

Solution:

Modify the following codes:

vi /usr/local/nginx/conf/nginx.conf

#use nobody;

to

use root;

Restart Nginx and it will be OK!

ImportError: DLL load failed while importing xxx: The specified program could not be found.

Error Message:

Connected to pydev debugger (build 203.7717.81)
======================================================================
Error when loading pyOpenMS libraries!
Libraries could not be found / could not be loaded.
Note: when using the Spyder IDE, this error may be triggered when
the 'Automatic' backend is used. Please change this in Tools ->
Preferences -> IPython -> Graphics to 'Inline'.
To debug this error, please run ldd (on linux) or dependency walker (on windows) on 
C:\ProgramData\Anaconda3\envs\dgl\lib\site-packages\pyopenms\pyopenms.so
======================================================================
======================================================================
python-BaseException
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\ProgramData\Anaconda3\envs\dgl\lib\site-packages\pyopenms\__init__.py", line 80, in <module>
    raise e
  File "C:\ProgramData\Anaconda3\envs\dgl\lib\site-packages\pyopenms\__init__.py", line 43, in <module>
    from .all_modules import *
  File "C:\ProgramData\Anaconda3\envs\dgl\lib\site-packages\pyopenms\all_modules.py", line 1, in <module>
    from .pyopenms_1 import *
ImportError: DLL load failed while importing pyopenms_1: The specified program could not be found.

 

Analyze the causes
https://github.com/OpenMS/OpenMS/issues/4291#issuecomment-1221604911

A library like pyopenms has a self-contained version of pyqt by itself, so if you do an import of another graphical GUI library before importing this library, you will get an error. So some people put import pyopenms in front of import matplotlib.pyplot as plt just fine

For some code tools (such as Pycharm, etc.), the problem is caused by the automatic import of GUI libraries during debug in order to facilitate debugging.

The problem is that different versions of the same library are loaded. Therefore, you just need to make sure that you don’t accidentally provide multiple Qt versions. Unfortunately, this is a bit difficult on Windows, since you don’t have a proper package manager and each PythonWheel is bound to its own private version.

 

Solution:
Find PyQt compatible in the settings and uncheck https://github.com/OpenMS/OpenMS/issues/4110#issuecomment-578613842

  • File | Settings | Build execution and deployment | Python debugger | PyQtCompatible = Unchecked

app: ASSERTION FAILED at D:\Cleaver\rf\test\nRF5_SDK_17.1.0_ddde560\external\freertos\source\tasks.c:2012

FreeRtos creates three tasks

<error> app: ASSERTION FAILED at D:\Cleaver\rf\test\nRF5_SDK_17.1.0_ddde560\external\freertos\source\tasks.c:2012

 

Sometimes it appears in timer.c

Because there is not enough stack space, when creating tasks, allocate a little less

xTaskCreate(aw2016_rgb_control, "AW2016_RGB_CONTROL", configMINIMAL_STACK_SIZE + 100, NULL, 1, &aw2016_rgb_task_handle);

 

How to Solve:

The previous error was configMINIMAL_STACK_SIZE + 200, change it to 100 and there is no more error

error: \*1035 connect() failed (111: Connection refused) while connecting to upstream, client…..

error:1035 connect() failed (111: Connection refused) while connecting to upstream, client: …217, server: .com, request: “POST /api/userLogin HTTP/1.1”, upstream: “http://.1:8443/userLogin”, host: “*.com”

1. Cause

The deployment of the project is on Tencent cloud server, http upgraded to https, using Tencent ssl certificate, Ali’s domain name, during the nginx.conf configuration process, there is a front-end to back-end send request failure problem. The following error occurs.

The nginx.conf configuration is as follows:

server{
	#SSL The default access port number is 443
    listen 443 ssl;
    server_name domain;
    default_type text/html;
    ssl_certificate certificate file path (.crt/.pem);
    ssl_certificate_key private key file path (.key);
    ssl_session_timeout 5m;
    # Please configure according to the following protocols
    ssl_protocols TLSv1.2 TLSv1.3;
    s#Please configure the encryption suite according to the following suite configuration, written following the openssl standard.
     ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
    ssl_prefer_server_ciphers on;

    location/{
        root /usr/share/nginx/html/dist/;
        try_files $uri $uri/ /index.html;
        index index.html;
    }

    location /api/ {
        default_type application/json;
        proxy_pass http://localhost:8443/;
    }
}

2. Solutions

Add a clause to the nginx.conf configuration: proxy_set_header Host $http_host;

server{
	#SSL The default access port number is 443
    listen 443 ssl;
    server_name domain;
    default_type text/html;
    ssl_certificate certificate file path (.crt/.pem);
    ssl_certificate_key private key file path (.key);
    ssl_session_timeout 5m;
    # Please configure according to the following protocols
    ssl_protocols TLSv1.2 TLSv1.3;
    s#Please configure the encryption suite according to the following suite configuration, written following the openssl standard.
     ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
    ssl_prefer_server_ciphers on;

    location/{
        root /usr/share/nginx/html/dist/;
        try_files $uri $uri/ /index.html;
        index index.html;
    }

    location /api/ {
    	# nginx reverse proxy rewrites the host field attribute in the request header
        proxy_set_header Host $http_host;
        default_type application/json;
        proxy_pass http://localhost:8443/;
    }
}

[Solved] failed to connect to server, reason: Unable to establish connection

Prerequisites: Precautions for installing in Windows:

Note:

    1. You need to install the server side, start taosd.exe, and wait for the
10/12 10:45:10.026000 00022304 DND TDengine initialized successfully
10/12 10:46:10.463000 00022216 MND succeed to send telemetry report

Then keep taosd.exe opened. Use the taos command of the taos shell to check whether it is started. If it succeeds, a prompt appears:

Server is Community Edition.

2. Check whether the configuration is modified successfully

taos.cfg

hosts

    Add a line of ipv4 address computer name at the end of the file, eg:
192.168.1.32 nodes1

[Solved] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test

There is a mave aggregation project. The following error is reported when packaging through the maven command:

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test

The packaging command is as follows: clean package

Solution 1:
Click Toggle ‘Skip Tests’ mode in the maven panel in idea tools, and package it again and it works fine.
Solution 2:
Specify skipTests as true in the pom file to skip unit tests

	<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
        </plugins>
    </build>

Solution 3:
Execute the command at the Terminal

mvn install -DskipTests

Solution 4:
Execute the command at the Terminal

mvn install -Dmaven.test.skip=true

Solution 5:
In the springboot project, spring-boot-maven-plugin plugin has been integrated with the maven-surefire-plugin plugin, will automatically run junit test, you need to add the following configuration in the pom

<properties>
 	<!-- skip the test -->
    <skipTests>true</skipTests>
</properties>

Among them, -Dmaven.test.skip=true and -DskipTests have the following roles

  • -DskipTests: does not execute the test cases, but compiles the test case classes to generate the corresponding class files under target/test-classes.
  • -Dmaven.test.skip=true: does not execute the test cases and does not compile the test case classes.

gerapy Run scrapy Program report timeout error [How to Solve]

Recently I’ve been developing projects using scrapy.
scrapy project, using a proxy.
Then it runs locally, everything is fine, the data can be crawled normally.
After deploying it to the online gerapy and running it, it reports an error and the logs show that:

2022-10-08 17:03:24 [scrapy.downloadermiddlewares.retry] ERROR: Gave up retrying <GET https://www.xxx.com/en/product?o=100&p=100> (failed 3 times): User timeout caused connection failure: Getting https://www.xxx.com/en/product?o=100&p=100 took longer than 180.0 seconds..

2022-10-08 17:03:24 [xxx] ERROR: <twisted.python.failure.Failure twisted.internet.error.TimeoutError: User timeout caused connection failure: Getting https://www.xxx.com/en/product?o=100&p=100 took longer than 180.0 seconds..>

2022-10-08 17:03:24 [xxx] ERROR: TimeoutError on https://www.xxx.com/en/product?o=100&p=100

I thought it was a proxy problem, then I removed the proxy and it worked fine locally
After deploying to the online gerapy and running, the error was reported again and the logs showed that:

2022-10-09 10:39:45 [scrapy.downloadermiddlewares.retry] DEBUG: Retrying <GET https://www.xxx.com/en/product?o=100&p=100> (failed 3 times): [<twisted.python.failure.Failure twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fashion: Connection lost.>]

2022-10-09 10:39:56 [scrapy.downloadermiddlewares.retry] ERROR: Gave up retrying <GET https://www.xxx.com/en/product?o=100&p=100> (failed 3 times): [<twisted.python.failure.Failure twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fashion: Connection lost.>]

Find a solution from stackoverflow:

Add a method in spider:

# Citation needed
from scrapy.spidermiddlewares.httperror import HttpError
from twisted.internet.error import DNSLookupError
from twisted.internet.error import TimeoutError


    # How to use
    yield scrapy.Request(url=url, meta={'dont_redirect': True, dont_filter=True, callback=self.parse_list, errback=self.errback_work)


    # Definition Method
    def errback_work(self, failure):
        self.logger.error(repr(failure))
        if failure.check(HttpError):
            response = failure.value.response
            self.logger.error('HttpError on %s', response.url)
        elif failure.check(DNSLookupError):
            request = failure.request
            self.logger.error('DNSLookupError on %s', request.url)
        elif failure.check(TimeoutError):
            request = failure.request
            self.logger.error('TimeoutError on %s', request.url)

After deploying it to the online gerapy and running it again, it still reported errors again.

Looking at the version of scrapy, I found that it was version 2.6.1, so I changed it to version 2.5.1.

pip3 install scrapy==2.5.1

Run it locally and report an error:

AttributeError: module ‘OpenSSL. SSL’ has no attribute ‘SSLv3_ METHOD’

Look at the version of the pyopenssl library:

pip3 show pyopenssl

I find that the version is incorrect.

Then change the library version to 22.0.0

pip3 install pyopenssl==22.0.0

Run it locally again, it is normal!

Then deploy it to online gerapy to run, and it is normal!

JBOSS jBPM 7.73 Startup Error [How to Solve]

Follow this link to download the zip version: jBPM – Open Source Business Automation Toolkit – Getting Started. After decompression to the local location, execute jbpm-server\bin\standalone.bat, which is always interrupted by errors. Finally, find the answer on YouTube. The reason is that there is a system parameter setting problem in jboss.

Solution:

1. Add the maven command path to the PATH environment variable.

2. Set the jvm parameter in the startup command, add -Djboss.as.management.blocking.timeout=2400, this parameter can be modified standalone.bat

:RESTART
  "%JAVA%" %JAVA_OPTS% ^
   "-Dorg.jboss.boot.log.file=%JBOSS_LOG_DIR%\server.log" ^
   "-Dlogging.configuration=file:%JBOSS_CONFIG_DIR%/logging.properties" ^
   "-Dfile.encoding=utf-8"  ^
   "-Djboss.as.management.blocking.timeout=2400" ^

Or modify the standalone\configuration\standalone.xml configuration file and add the system-properties property

   </system-properties>
    ....
    ....
    <property name="jboss.as.management.blocking.timeout" value="2400"/>
   </system-properties>

After modification, the service starts normally,

http://127.0.0.1:8080/business -central

Import sample project

How to Solve Win10 0x8007007E Error (OPC Component)

During the development of OPC client in Win10, the following missing component exception occurs when reading the device.
Message=Fail to retrieve the component with CLSID {28E68F9A-8D75-11D1-8DC3-3C302A000000} in COM class factory because of the following error: 8007007e The specified module could not be found. (Exception from HRESULT:0x8007007E).

Solution:

1. Copy the OPCDAAuto.dll file to the C:\Windows\SysWOW64 directory.
2. Press ” WIN + R ” to enter the CMD command line.
3, type: regsvr32 C:\Windows\SysWOW64\OPCDAAuto.dll, enter.
4, after successful registration, set in the configuration manager for the X86 platform (can not run under 64-bit)
5, regenerate the project solution, it can run normally.