Author Archives: Robins

[Solved] Linux Mongodb Error: # Error: coul-bash: connecting: command not found

1. MongoDB error content and solution
This is an error when entering mongo startup

[root@g3dhkzznakmqafv5-1029528 mongodb]# Error: coul-bash: connecting: command not found
.1:27017 :: caused by :: Connection refused :ction attempt failed: SocketException: Error connecting to 127.0.0
[1]+ Exit 127 connecting to: mongodb://127.0.0.1:27017/?compressors=disabled
connect@src/mongo/shell/mongo.js:374:17
@(connect):2:6
exception: connect failed
exiting with code 1
Change the permission of .sock file.

Next, we check the error report of the MongoDB log

"ctx":"SignalHandler","msg":"Shutdown: going to close listening sockets"}
{"t":{"$date":"2021-11-14T21:50:59.901+08:00"},"s":"I",  "c":"NETWORK",  "id":23017,   "ctx":"listener","msg":"removing socket file","attr":{"path":"/tmp/mongodb-27017.sock"}}
{"t":{"$date":"2021-11-14T21:50:59.901+08:00"},"s":"I",  "c":"NETWORK",  "id":4784905, "ctx":"SignalHandler","msg":"Shutting down the global connection pool"}

Solution:

The above log has said to remove mongodb-27017.sock in the/tmp directory
here, you can switch to the TMP directory to view the mongodb-xxx.sock file
remove the mongodb-27017.sock file, and then restart OK successfully
if you have tried to switch ports, remove all mongodb-xxx.sock files

[Solved] Sqoop Mysqltohive error: Error: java.lang.RuntimeException: java.lang.RuntimeException…

Problem Description
Execute statementbin/sqoop import --connect jdbc:mysql://localhost:3306/gdcmxy --username root --password root --table 2019bigdata --fields-terminated-by '\t' --delete-target-dir --num-mappers 1 --hive-import --hive-database gdcmxy --hive-table 2019bigdata

Error: java.lang.RuntimeException: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

After seeing the error report, it was preliminarily judged that the main problem was the database connection problem. At first, I thought the firewall was not turned off, but considering that hadoo had certainly turned off the firewall before, it should have nothing to do with the firewall.

Cluster environment:

Solution:

Change the localhost of the execution statement to the IP address of the local machine bin/sqoop import -- connect JDBC: mysql://192.168.112.81:3306/gdcmxy --Username root -- password root -- table 2019bigdata -- fields terminated by '\ t' -- delete target dir -- num mappers 1 -- hive import -- hive database gdcmxy -- hive table 2019bigdata

successfully imported

[Solved] Nvml compilation official use case error: collect2: error: ld returned 1 exit status

Question

When running the example of nvml, an error is reported:

/tmp/tmpxft_00001d31_00000000-4_gpu_monitor.o: In the function ‘main’:
gpu_monitor.c:(.text+0x77): undefined reference to ‘nvmlInit_v2’
gpu_monitor.c:(.text+0x93): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0xcd): undefined reference to ‘nvmlDeviceGetCount_v2’
gpu_monitor.c:(.text+0xe9): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x15e): Undefined reference to ‘nvmlDeviceGetHandleByIndex_v2’
gpu_monitor.c:(.text+0x17a): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x1b4): undefined reference to ‘nvmlDeviceGetName’
gpu_monitor.c:(.text+0x1d0): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x208): Undefined reference to ‘nvmlDeviceGetPciInfo_v3’
gpu_monitor.c:(.text+0x224): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x282): undefined reference to ‘nvmlDeviceGetComputeMode’
gpu_monitor.c:(.text+0x2b6): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x318): undefined reference to ‘nvmlDeviceSetComputeMode’
gpu_monitor.c:(.text+0x334): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x379): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x3ce): undefined reference to ‘nvmlDeviceSetComputeMode’
gpu_monitor.c:(.text+0x3ea): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x423): Undefined reference to ‘nvmlDeviceGetPowerUsage’
gpu_monitor.c:(.text+0x43f): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x4a4): undefined reference to ‘nvmlShutdown’
gpu_monitor.c:(.text+0x4c0): undefined reference to ‘nvmlErrorString’
collect2: error: ld returned 1 exit status

Solution:

At the beginning, the above error occurs when compiling with the command nvcc – O example.C example.
compile successfully with the command nvcc – I – L/usr/lib – lnvidia ml example.C – O example

Feign call Error: duplicate name [How to Solve]

 

Description:
The bean ‘personnel.FeignClientSpecification’, defined in null, could not be registered. A bean with that name has already been defined in null and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

Solution 1:
Applicati.yml configuration file is added to allow duplicate names

Solution 2:
Write together the contents of different feign interfaces called by the same microservice


Write the contents of the two interfaces together

[pl.LightningModule] spaCy & pytorch-lightning Error

In pl.lightningmodule, Spacy cannot be used for word segmentation, or an error will be reported

1. Use in the forward process

...
File "spacy/pipeline/trainable_pipe.pyx", line 75, in spacy.pipeline.trainable_pipe.TrainablePipe.pipe
...

It is possible that all objects in the model are automatically transformed into trainable objects within the PL framework. Similarly, if the original pipe is also transformed into trainablepipe, an error will be reported, including an error as shown above

2. Avoid problem 1 and use nlp.pipe

Similarly, the same problem as in forward will be converted to a trainable pipe

3. To avoid problem 1, write Spacy processing outside the model as a function call

The same error will be reported. The error is different from the above. It is a very inexplicable error

Solution:

I didn’t find a good solution, so I had to rewrite the required functions manually, such as stopping words

[Solved] bert_as_service startup error: Tensorflow 2.1.0 is not tested!

Error Messages:

bert_as_service + tensorflow 2.1.0
Tensorflow 2.1.0 is not tested!

So reinstalled the virtual environment

I:?[35mVENTILATOR?[0m:freeze, optimize and export graph, could take a while…
d:\anaconda\envs\tensorflow\lib\site-packages\bert_serving\server\helper.py:176: UserWarning: Tensorflow 2.1.0 is not tested! It may or may not work. Feel free to submit an i
ssue at https://github.com/hanxiao/bert-as-service/issues/
‘Feel free to submit an issue at https://github.com/hanxiao/bert-as-service/issues/’ % tf.version)
E:?[36mGRAPHOPT?[0m:fail to optimize the graph!
Traceback (most recent call last):
File “d:\anaconda\envs\tensorflow\lib\runpy.py”, line 193, in run_module_as_main
“main”, mod_spec)
File “d:\anaconda\envs\tensorflow\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "D:\Anaconda\envs\tensorflow\Scripts\bert-serving-start.exe_main.py", line 9, in
File "d:\anaconda\envs\tensorflow\lib\site-packages\bert_serving\server\cli_init.py", line 4, in main
with BertServer(get_run_args()) as server:
File “d:\anaconda\envs\tensorflow\lib\site-packages\bert_serving\server_init_.py”, line 71, in init
self.graph_path, self.bert_config = pool.apply(optimize_graph, (self.args,))
TypeError: ‘NoneType’ object is not iterable

It can be used by installing tensorflow1.10+python3.6.10

[Solved] SpringBoot Project Start Error: No bean named ‘org.springframework.context.xxxxx.importRegistry‘ available

(1) Problem description

In springboot project, when adding validator dependency for parameter verification, dependency is introduced, and an error is reported when starting the project. The error information is as follows:

"C:\Program Files\Java\jdk1.8.0_211\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:11637,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -javaagent:C:\Users\zhuyb\AppData\Local\JetBrains\IntelliJIdea2021.2\captureAgent\debugger-agent.jar -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_211\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\rt.jar;G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single\zblog-single-web\target\classes;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-starter-web\2.3.0.RELEASE\spring-boot-starter-web-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-starter\2.3.0.RELEASE\spring-boot-starter-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot\2.3.0.RELEASE\spring-boot-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-autoconfigure\2.3.0.RELEASE\spring-boot-autoconfigure-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-starter-logging\2.3.0.RELEASE\spring-boot-starter-logging-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\softwares\MavenRepository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\softwares\MavenRepository\org\apache\logging\log4j\log4j-to-slf4j\2.13.2\log4j-to-slf4j-2.13.2.jar;E:\softwares\MavenRepository\org\apache\logging\log4j\log4j-api\2.13.2\log4j-api-2.13.2.jar;E:\softwares\MavenRepository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;E:\softwares\MavenRepository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;E:\softwares\MavenRepository\org\springframework\spring-core\5.2.6.RELEASE\spring-core-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-jcl\5.2.6.RELEASE\spring-jcl-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\yaml\snakeyaml\1.26\snakeyaml-1.26.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-starter-json\2.3.0.RELEASE\spring-boot-starter-json-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\com\fasterxml\jackson\core\jackson-databind\2.11.0\jackson-databind-2.11.0.jar;E:\softwares\MavenRepository\com\fasterxml\jackson\core\jackson-annotations\2.11.0\jackson-annotations-2.11.0.jar;E:\softwares\MavenRepository\com\fasterxml\jackson\core\jackson-core\2.11.0\jackson-core-2.11.0.jar;E:\softwares\MavenRepository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.11.0\jackson-datatype-jdk8-2.11.0.jar;E:\softwares\MavenRepository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.11.0\jackson-datatype-jsr310-2.11.0.jar;E:\softwares\MavenRepository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.11.0\jackson-module-parameter-names-2.11.0.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-starter-tomcat\2.3.0.RELEASE\spring-boot-starter-tomcat-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\org\apache\tomcat\embed\tomcat-embed-core\9.0.35\tomcat-embed-core-9.0.35.jar;E:\softwares\MavenRepository\org\glassfish\jakarta.el\3.0.3\jakarta.el-3.0.3.jar;E:\softwares\MavenRepository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.35\tomcat-embed-websocket-9.0.35.jar;E:\softwares\MavenRepository\org\springframework\spring-web\5.2.6.RELEASE\spring-web-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-beans\5.2.6.RELEASE\spring-beans-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-webmvc\5.2.6.RELEASE\spring-webmvc-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-aop\5.2.6.RELEASE\spring-aop-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-context\5.2.6.RELEASE\spring-context-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-expression\5.2.6.RELEASE\spring-expression-5.2.6.RELEASE.jar;G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single\zblog-single-service\target\classes;G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single\zblog-single-mapper\target\classes;E:\softwares\MavenRepository\mysql\mysql-connector-java\8.0.20\mysql-connector-java-8.0.20.jar;E:\softwares\MavenRepository\com\google\protobuf\protobuf-java\3.6.1\protobuf-java-3.6.1.jar;E:\softwares\MavenRepository\com\alibaba\druid-spring-boot-starter\1.1.10\druid-spring-boot-starter-1.1.10.jar;E:\softwares\MavenRepository\com\alibaba\druid\1.1.10\druid-1.1.10.jar;E:\softwares\MavenRepository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single\zblog-single-pojo\target\classes;E:\softwares\MavenRepository\com\baomidou\mybatis-plus-boot-starter\3.4.2\mybatis-plus-boot-starter-3.4.2.jar;E:\softwares\MavenRepository\com\baomidou\mybatis-plus\3.4.2\mybatis-plus-3.4.2.jar;E:\softwares\MavenRepository\com\baomidou\mybatis-plus-extension\3.4.2\mybatis-plus-extension-3.4.2.jar;E:\softwares\MavenRepository\com\baomidou\mybatis-plus-core\3.4.2\mybatis-plus-core-3.4.2.jar;E:\softwares\MavenRepository\com\baomidou\mybatis-plus-annotation\3.4.2\mybatis-plus-annotation-3.4.2.jar;E:\softwares\MavenRepository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;E:\softwares\MavenRepository\org\hibernate\validator\hibernate-validator\6.2.0.Final\hibernate-validator-6.2.0.Final.jar;E:\softwares\MavenRepository\jakarta\validation\jakarta.validation-api\2.0.2\jakarta.validation-api-2.0.2.jar;E:\softwares\MavenRepository\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;E:\softwares\MavenRepository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;E:\softwares\MavenRepository\com\github\pagehelper\pagehelper-spring-boot-starter\1.4.0\pagehelper-spring-boot-starter-1.4.0.jar;E:\softwares\MavenRepository\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.2.0\mybatis-spring-boot-starter-2.2.0.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-starter-jdbc\2.3.0.RELEASE\spring-boot-starter-jdbc-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\com\zaxxer\HikariCP\3.4.5\HikariCP-3.4.5.jar;E:\softwares\MavenRepository\org\springframework\spring-jdbc\5.2.6.RELEASE\spring-jdbc-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-tx\5.2.6.RELEASE\spring-tx-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.2.0\mybatis-spring-boot-autoconfigure-2.2.0.jar;E:\softwares\MavenRepository\org\mybatis\mybatis\3.5.7\mybatis-3.5.7.jar;E:\softwares\MavenRepository\org\mybatis\mybatis-spring\2.0.6\mybatis-spring-2.0.6.jar;E:\softwares\MavenRepository\com\github\pagehelper\pagehelper-spring-boot-autoconfigure\1.4.0\pagehelper-spring-boot-autoconfigure-1.4.0.jar;E:\softwares\MavenRepository\com\github\pagehelper\pagehelper\5.3.0\pagehelper-5.3.0.jar;E:\softwares\MavenRepository\com\github\jsqlparser\jsqlparser\4.2\jsqlparser-4.2.jar;G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single\zblog-single-common\target\classes;E:\softwares\MavenRepository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar;E:\softwares\MavenRepository\io\jsonwebtoken\jjwt\0.9.1\jjwt-0.9.1.jar;E:\softwares\MavenRepository\com\alibaba\fastjson\1.2.75\fastjson-1.2.75.jar;E:\softwares\ides\IntelliJ IDEA 2021.2.1\lib\idea_rt.jar" com.gitee.zblog.Application
Connected to the target VM, address: '127.0.0.1:11637', transport: 'socket'

  .   ____          _            __ _ _
 /\\/___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, |////
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.0.RELEASE)

2021-11-13 18:53:30.446  INFO 11376 --- [           main] com.gitee.zblog.Application              : Starting Application on zhuyb with PID 11376 (G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single\zblog-single-web\target\classes started by zhuyb in G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single)
2021-11-13 18:53:30.449  INFO 11376 --- [           main] com.gitee.zblog.Application              : No active profile set, falling back to default profiles: default
2021-11-13 18:53:31.577  INFO 11376 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 6250 (http)
2021-11-13 18:53:31.586  INFO 11376 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-11-13 18:53:31.586  INFO 11376 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.35]
2021-11-13 18:53:31.693  INFO 11376 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-11-13 18:53:31.694  INFO 11376 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1191 ms
2021-11-13 18:53:31.791  INFO 11376 --- [           main] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource
2021-11-13 18:53:31.901  INFO 11376 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} inited
 _ _   |_  _ _|_. ___ _ |    _ 
| | |\/|_)(_| | |_\  |_)||_|_\ 
    /              |         
                        3.4.2 
2021-11-13 18:53:32.800  WARN 11376 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultValidator' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.validation.BootstrapConfiguration.getClockProviderClassName()Ljava/lang/String;
2021-11-13 18:53:32.801  INFO 11376 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closed
2021-11-13 18:53:32.803  INFO 11376 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2021-11-13 18:53:32.812  INFO 11376 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-11-13 18:53:32.817 ERROR 11376 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.hibernate.validator.internal.xml.config.ValidationBootstrapParameters.<init>(ValidationBootstrapParameters.java:65)

The following method did not exist:

    javax.validation.BootstrapConfiguration.getClockProviderClassName()Ljava/lang/String;

The method's class, javax.validation.BootstrapConfiguration, is available from the following locations:

    jar:file:/E:/softwares/MavenRepository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar!/javax/validation/BootstrapConfiguration.class
    jar:file:/E:/softwares/MavenRepository/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar!/javax/validation/BootstrapConfiguration.class

It was loaded from the following location:

    file:/E:/softwares/MavenRepository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of javax.validation.BootstrapConfiguration

2021-11-13 18:53:32.824  WARN 11376 --- [           main] o.s.boot.SpringApplication               : Unable to close ApplicationContext

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:603) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:409) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:245) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:197) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.boot.availability.AvailabilityChangeEvent.publish(AvailabilityChangeEvent.java:81) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.availability.AvailabilityChangeEvent.publish(AvailabilityChangeEvent.java:67) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.doClose(ServletWebServerApplicationContext.java:167) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:978) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:814) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:325) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at com.gitee.zblog.Application.main(Application.java:18) [classes/:na]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:603) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:409) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:91) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:109) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:94) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:76) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:347) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:299) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:431) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	... 28 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:814) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1282) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor.postProcessBeforeInitialization(ConfigurationClassPostProcessor.java:456) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	... 51 common frames omitted

Disconnected from the target VM, address: '127.0.0.1:11637', transport: 'socket'

Process finished with exit code 1

(2) Solution

Error reason: the springboot dependency and validator dependency versions do not match.

In my project, springboot relies on version 2.3.0, while javax validation and Hibernate validator rely on versions 1.1.0.final and 5.4.0 final, respectively.

Solution:

Replace the versions of javax validation and Hibernate validator. In springboot 2.3.0, javax validation 2.0.1.final and Hibernate validator 6.1.5.final are used.

[Solved] iperf Analyze Error: unable to create a new stream: Invalid argument

The root cause of the error reported in the title is that the iperf command code customized by the company is relatively old, so the open source code still needs to be updated in time!

Device: Android p

Problem: when the iperf server is opened on the PC and the iperf client is opened on the Android device, the throughput cannot be tested normally, as shown in the following figure:

The Android device reports an error “unable to create a new stream: invalid argument”. The PC can see that there is a connection at the beginning, and then the connection is closed due to the client.

Solution:

First look at the error report, “Unable to create a new stream” corresponds to “case IECREATESTREAM”. It can be determined that this error occurs in a function of iperf_api, and it is found in the iperf_new_stream() function. It is simple here. Exclude the first few A malloc, the first function mkstemp(), this function is interesting, the actual problem is also here, first introduce this function.

The mkstep function creates a file with a unique file name in the system and opens it. Only the current user can access the temporary file and perform read and write operations. The mkstamp function has only one parameter template, which is a non empty string ending in “XXXXXX”. The mkstemp function will replace “XXXXXX” with a randomly generated string to ensure the uniqueness of the file name.

You can see the common error codes eexist and einval through the man Manual:

1>   EEXIST:   Unable to create a unique temporary file, the content of parameter template is undefined;

2>   Einval: for mkstamp(), the last six characters of template are not XXXXXX;

It is worth mentioning that in glibc 2.0.6 and earlier glibc libraries, the access permission of this file is 0666, that is, all users in UNIX system can access it, which will have a big problem. Therefore, the access permission of this file in glibc libraries after glibc 2.0.7 is adjusted to 0600.

The temporary file created by the mkstemp function cannot be deleted automatically, so after executing the mkstemp function, you need to call the unlink function. The unlink function deletes the directory entry of the file, but the temporary file can also be accessed through the file descriptor until the last open process closes the file, or the temporary file is automatically and completely deleted after the program exits.

The original code snippet of the error is as follows

struct iperf_stream *iperf_new_stream(struct iperf_test *test, int s)
{
    int i;
    struct iperf_stream *sp;
    //The problem is here, the template parameter format is incorrect
    char template[] = "/data/data/iperf3.0.11";
    ......
    /* Create and randomize the buffer */
    sp->buffer_fd = mkstemp(template);
    if (sp->buffer_fd == -1) {
        i_errno = IECREATESTREAM;
        free(sp->result);
        free(sp);
        return NULL;
    }
    if (unlink(template) < 0) {
        i_errno = IECREATESTREAM;
        free(sp->result);
        free(sp);
        return NULL;
    }
    if (ftruncate(sp->buffer_fd, test->settings->blksize) < 0) {
        i_errno = IECREATESTREAM;
        free(sp->result);
        free(sp);
        return NULL;
    }
    ......

It’s clear from here that the problem with the template parameter causes an error in mkstamp() and returns einval. The corresponding Android device executes the iperf command and reports an error of ‘invalid argument’. I was going to make a simple change. After thinking about iperf, everyone is using it. There should be no big problem. I went to GitHub community and found that predecessors have paved the way. I changed it with reference to the submission in the community.

diff --git a/system/core/swiperf/iperf.h b/system/core/swiperf/iperf.h
index f4d394b..2bc0b73 100644
--- a/system/core/swiperf/iperf.h
+++ b/system/core/swiperf/iperf.h
@@ -178,6 +178,7 @@ struct iperf_test
     struct protocol *protocol;
     signed char state;
     char     *server_hostname;                  /* -c option */
     //The latest open source code iperf_test structure itself has tmp_template
+    char     *tmp_template;
     char     *bind_address;                     /* -B option */
     int       server_port;
     int       omit;                             /* duration of omit period (-O flag) */
@@ -252,6 +253,9 @@ struct iperf_test
     char *server_output_text;
     cJSON *json_server_output;

+    /* Store User Defined Path and use it for creating temporary streams */
+    char *user_stream_path;
+
     /* Server output (use on server side only) */
     TAILQ_HEAD(iperf_textlisthead, iperf_textline) server_output_list;

diff --git a/system/core/swiperf/iperf_api.c b/system/core/swiperf/iperf_api.c
index 13269d5..27a92ac 100644
--- a/system/core/swiperf/iperf_api.c
+++ b/system/core/swiperf/iperf_api.c
@@ -27,6 +27,9 @@
 #define _GNU_SOURCE
 #define __USE_GNU

+/* Suppress Warning generated by GCC __attribute__ for write */
+#pragma GCC diagnostic ignored "-Wunused-result"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -235,8 +238,21 @@ iperf_get_test_one_off(struct iperf_test *ipt)
     return ipt->one_off;
 }

-/************** Setter routines for some fields inside iperf_test *************/
+/* Getter routine for user-defined stream-path */
+char *
+iperf_get_stream_path(struct iperf_test *ipt)
+{
+    return ipt->user_stream_path;
+}

+/* Setter routine for user-defined stream-path */
+void
+iperf_set_stream_path(struct iperf_test *ipt, char *_stram_path)
+{
+    ipt->user_stream_path = strdup(_stram_path);
+}
+
+/************** Setter routines for some fields inside iperf_test *************/
 void
 iperf_set_verbose(struct iperf_test *ipt, int verbose)
 {
@@ -596,6 +612,7 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv)
        {"get-server-output", no_argument, NULL, OPT_GET_SERVER_OUTPUT},
         {"debug", no_argument, NULL, 'd'},
         {"help", no_argument, NULL, 'h'},
         //Add the analysis of the corresponding parameters
+        {"stream-path", required_argument, NULL, OPT_STREAM_PATH},
         {NULL, 0, NULL, 0}
     };
     int flag;
@@ -608,6 +625,15 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv)
     server_flag = client_flag = rate_flag = duration_flag = 0;
     while ((flag = getopt_long(argc, argv, "p:f:i:D1VJvsc:ub:t:n:k:l:P:Rw:B:M:N46S:L:ZO:F:A:T:C:dh", longopts, NULL)) != -1) {
         switch (flag) {
+            /*
+             * Set Stream Path to user-defined path
+             * Reason: To work on Android as /tmp is not available on Android
+             * also access to a static /data/local/tmp/ is also restricted for Applications
+             * Only native application path is accessable with complete permissions
+             */
+            case OPT_STREAM_PATH:
+                iperf_set_stream_path(test, optarg);
+                break;
             case 'p':
                 test->server_port = atoi(optarg);
                 break;
@@ -2367,7 +2393,27 @@ iperf_new_stream(struct iperf_test *test, int s)
 {
     int i;
     struct iperf_stream *sp;
-    char template[] = "/data/data/iperf3.0.11";
+    char template[1024];
+    if (test->tmp_template) {
+        snprintf(template, sizeof(template)/sizeof(char), "%s", test->tmp_template);
+    } else {
+        //find the system temporary dir *unix, windows, cygwin support
+        char* tempdir = getenv("TMPDIR");
+        if (tempdir == 0) {
+            tempdir = getenv("TEMP");
+        }
+        if (tempdir == 0) {
+            tempdir = getenv("TMP");
+        }
+        /* Use User Specific Path if available */
+        if (test->user_stream_path != NULL) { //There is a pass to go here
+            tempdir = iperf_get_stream_path(test);
+        }
+        if (tempdir == 0) { // Android devices without parameters, create temporary files under /tmp by default
+            tempdir = "/tmp";
+        }
+        snprintf(template, sizeof(template)/sizeof(char), "%s/iperf3.XXXXXX", tempdir);
+    }

     h_errno = 0;

diff --git a/system/core/swiperf/iperf_api.h b/system/core/swiperf/iperf_api.h
index c019a31..e19492b 100644
--- a/system/core/swiperf/iperf_api.h
+++ b/system/core/swiperf/iperf_api.h
@@ -44,6 +44,8 @@ struct iperf_stream;
 #define OPT_SCTP 1
 #define OPT_LOGFILE 2
 #define OPT_GET_SERVER_OUTPUT 3
+/* Stream Path Edit for Android Compatibility */
+#define OPT_STREAM_PATH 4

 /* states */
 #define TEST_START 1
@@ -87,6 +89,10 @@ int  iperf_get_test_zerocopy( struct iperf_test* ipt );
 int    iperf_get_test_get_server_output( struct iperf_test* ipt );
 char*  iperf_get_test_bind_address ( struct iperf_test* ipt );
 int    iperf_get_test_one_off( struct iperf_test* ipt );
+/* Getter routine for user-defined stream-path */
+char* iperf_get_stream_path( struct iperf_test *ipt );
+/* Setter routine for user-defined stream-path */
+void iperf_set_stream_path( struct iperf_test *ipt, char *_stram_path );

 /* Setter routines for some fields inside iperf_test. */
 void   iperf_set_verbose( struct iperf_test* ipt, int verbose );
diff --git a/system/core/swiperf/iperf_locale.c b/system/core/swiperf/iperf_locale.c
index 30e6290..9fe7ba6 100644
--- a/system/core/swiperf/iperf_locale.c
+++ b/system/core/swiperf/iperf_locale.c
@@ -141,6 +141,7 @@ const char usage_longstr[] = "Usage: iperf [-s|-c host] [options]\n"
                            "  -O, --omit N              omit the first n seconds\n"
                            "  -T, --title str           prefix every output line with this string\n"
                            "  --get-server-output       get results from server\n"
                            //New --stream-path passing parameter, support custom write path
+                           "  --stream-path             use user-defied path to create temporary stream\n"

 #ifdef NOT_YET_SUPPORTED /* still working on these */
 #endif

[Solved] Matplotlib scatter Draw Error: TypeError: ufunc ‘sqrt‘ not supported for the input types…rule ‘‘safe‘‘

Errors are reported as follows:

The solution is as follows:

Original program:
plt.scatter (x, y, ‘R’, label =’original scatter ‘)
modified as:
plt.scatter (x, y, C =’r’, label =’original scatter ‘)

The color setting parameter is set to: C = ‘R’

The problem was successfully resolved as follows:

How to Solve pyqt5 imports module Error

Pyqt5 reports an error when importing the module:

1

ImportError: DLL load failed: Cannot find the specified program

2

ImportError: DLL load failed: Cannot find the specified program

3

ImportError: cannot import name 'QtCore'

The reason for the above error: the versions of pyqt5, pyqt5 SIP and pyqt5 stub modules are not interconnected

The solution is as follows:

    1. Open Win + R for operation, enter CMD to enter the terminal window, and enter it successively in the command line
pip uninstall PyQt5
pip uninstall PyQt5-sip
pip uninstall PyQt5-stubs

And the modules related to pyqt5 (such as pyqt5#u tools) are unloaded, and then input

pip install PyQt5

In this way, the installation already includes the corresponding versions of pyqt5 SIP and pyqt5 stubs. There is no need to install again, and then reinstall the modules related to pyqt5 (just uninstalled), such as PIP install pyqt5_tools

This will run successfully!

[Solved] Mybatis Error: Establishing SSL connection without server‘s identity verification is not recommended.

Mybatis Error: Establishing SSL connection without server‘s identity verification is not recommended.

 

Solution:

(1) You need to explicitly disable SSL by setting usessl = false, or set usessl = true and provide a truststore for server certificate validation
(2) at this time, we only need to set usessl = false on the URL connecting to the database.