Tag Archives: Error collection

[Solved] kafka Error: java.net.UnknownHostException: ls-bptysztw

kafka connect error:

java.net.UnknownHostException: ls-bptysztw

2022-07-20 15:48:28.701  INFO 15924 --- [ntainer#0-0-C-1] org.apache.kafka.clients.Metadata        : [Consumer clientId=consumer-abc-1, groupId=abc] Cluster ID: LFbHxG8qSSu7PyPKXoDD4g
2022-07-20 15:48:28.703  INFO 15924 --- [ntainer#0-0-C-1] o.a.k.c.c.internals.ConsumerCoordinator  : [Consumer clientId=consumer-abc-1, groupId=abc] Discovered group coordinator ls-bptysztw:9092 (id: 2147483647 rack: null)
2022-07-20 15:48:30.990  WARN 15924 --- [ntainer#0-0-C-1] org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-abc-1, groupId=abc] Error connecting to node ls-bptysztw:9092 (id: 2147483647 rack: null)

java.net.UnknownHostException: ls-bptysztw
	at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.8.0_144]
	at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) ~[na:1.8.0_144]
	at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) ~[na:1.8.0_144]
	at java.net.InetAddress.getAllByName0(InetAddress.java:1276) ~[na:1.8.0_144]
	at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[na:1.8.0_144]
	at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[na:1.8.0_144]
	at org.apache.kafka.clients.DefaultHostResolver.resolve(DefaultHostResolver.java:27) ~[kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.ClientUtils.resolve(ClientUtils.java:110) ~[kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.ClusterConnectionStates$NodeConnectionState.currentAddress(ClusterConnectionStates.java:511) ~[kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.ClusterConnectionStates$NodeConnectionState.access$200(ClusterConnectionStates.java:468) ~[kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.ClusterConnectionStates.currentAddress(ClusterConnectionStates.java:173) ~[kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.NetworkClient.initiateConnect(NetworkClient.java:988) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.NetworkClient.ready(NetworkClient.java:301) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.tryConnect(ConsumerNetworkClient.java:575) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$FindCoordinatorResponseHandler.onSuccess(AbstractCoordinator.java:854) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$FindCoordinatorResponseHandler.onSuccess(AbstractCoordinator.java:830) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.RequestFuture$1.onSuccess(RequestFuture.java:206) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.RequestFuture.fireSuccess(RequestFuture.java:169) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.RequestFuture.complete(RequestFuture.java:129) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient$RequestFutureCompletionHandler.fireCompletion(ConsumerNetworkClient.java:602) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.firePendingCompletedRequests(ConsumerNetworkClient.java:412) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:297) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:236) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:215) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureCoordinatorReady(AbstractCoordinator.java:246) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.coordinatorUnknownAndUnready(ConsumerCoordinator.java:459) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:487) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.KafkaConsumer.updateAssignmentMetadataIfNeeded(KafkaConsumer.java:1262) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1231) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1211) [kafka-clients-3.1.1.jar:na]
	at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollConsumer(KafkaMessageListenerContainer.java:1522) [spring-kafka-2.8.7.jar:2.8.7]
	at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doPoll(KafkaMessageListenerContainer.java:1512) [spring-kafka-2.8.7.jar:2.8.7]
	at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollAndInvoke(KafkaMessageListenerContainer.java:1340) [spring-kafka-2.8.7.jar:2.8.7]
	at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:1252) [spring-kafka-2.8.7.jar:2.8.7]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_144]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_144]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144]

analysis

It can be found from the log that ls-bptysztw:9092 is the address information of the host. Because the host cannot recognize the IP corresponding to ls-bptysztw, which leads to an unknownHost exception. Therefore, as long as the host is configured to point to the correct IP, this error will be solved.

Solution:

Configure the C:\Windows\System32\drivers\etc\hosts file

123.123.123.123       ls-bptysztw

[Solved] urllib.error.URLError: <urlopen error [SSL: WRONG_VERSION_NUMBER] wrong version number

There are totally four methods to solve this error

 

Solution:
Method 1: the SSL certificate problem
you can open the URL with the following code

import ssl
 
# This restores the same behavior as before.
context = ssl._create_unverified_context()
response = urllib.request.urlopen("https://no-valid-cert", context=context)

https://no-valid-cert you can change it to the website you want

Method 2: Change https to http, because some versions of python verify the SSL certificate once when you urllib.urlopen an https.

Method 3: Add the following codes:

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

I just add it to the py file when calling commands from the urllib library that comes with python 3.8.0

model = ALBEF(config=config, text_encoder=args.text_encoder, tokenizer=tokenizer, init_deit=True)

That is, when the model is initialized (init_deit), the error occurs when calling return self.sslsocket_class._create in lib/python3.8/http/client.py under python 3.8, but at the beginning of the py file for initializing the model Add these two lines and you’ll be fine

Method 4:
Upgrade your python interpreter version, e.g. 2.7 or 3.7 to 3.8 or even 3.9

[Solved] renren-fast Startup Error: Error creating bean with name ‘scheduleJobController‘

When doing the gulimall mall project, start Ren fast to report an error in the background. The error information is as follows:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'scheduleJobController': Unsatisfied dependency expressed through field 'scheduleJobService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduleJobService': Invocation of init method failed; nested exception is io.renren.common.exception.RRException: 获取定时任务CronTrigger出现异常
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:116)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)

Cause analysis: beans cannot be created or loaded. The problem is generally in configuration

Solution steps:
1. Check dao tier, service tier, controller tier is annotated or not?

2. When the annotation of Dao tier, service tier and controller tier is complete, check whether the corresponding package is added to the package scanning for these annotations. If not, add it (generally check in the spring configuration file)

3. Check the corresponding YML and properties files, or check whether the database SQL is executed normally

The solution to this problem: delete the contents of the current database and re-execute the SQL file

[Solved] nacos Startup Error: Error creating bean with name ‘authFilterRegistration‘ defined in class path resource

Today, an error was suddenly reported when Nacos was started. The error information on the Nacos startup interface is as follows:

 Error creating bean with name 'authFilterRegistration' defined in class path resource
 [com/alibaba/nacos/core/auth/AuthConfig.class]: 
 Bean instantiation via factory method failed; 
 nested exception is org.springframework.beans.BeanInstantiationException:
 Failed to instantiate [org.springframework.boot.web.servlet.FilterRegistrationBean]:
 Factory method 'authFilterRegistration' threw exception;
 nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
 Error creating bean with name 'authFilter':
 Unsatisfied dependency expressed through field 'authManager';
 nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: 
 Error creating bean with name 'nacosAuthManager':
 Unsatisfied dependency expressed through field 'authenticationManager';
 nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
 Error creating bean with name 'nacosAuthConfig': 
 Unsatisfied dependency expressed through field 'userDetailsService';
 nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
 Error creating bean with name 'nacosUserDetailsServiceImpl':
 Unsatisfied dependency expressed through field 'userPersistService'; 
 nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
 Error creating bean with name 'externalUserPersistServiceImpl': 
 Unsatisfied dependency expressed through field 'persistService'; 
 nested exception is org.springframework.beans.factory.BeanCreationException: 
 Error creating bean with name 'externalStoragePersistServiceImpl': 
 Invocation of init method failed; nested exception is java.lang.RuntimeException:
 java.lang.RuntimeException: [db-load-error]load jdbc.properties error

Idea spooling error message:

[NACOS SocketTimeoutException httpGet] currentServerAddr:http://localhost:8848, err : connect timed out

Cause analysis: the project may not load Nacos related files correctly

Solution: delete the existing Nacos folder, decompress or download the Nacos compressed package again, and start startup.cmd. The problem is solved

If an error is reported, it may be that set mode = “” in the startup.cmd file is inappropriate

set BASE_DIR="%BASE_DIR:~0,-5%"

set CUSTOM_SEARCH_LOCATIONS=file:%BASE_DIR%/conf/

set MODE="cluster"
set FUNCTION_MODE="all"
set SERVER=nacos-server
set MODE_INDEX=-1
set FUNCTION_MODE_INDEX=-1
set SERVER_INDEX=-1
set EMBEDDED_STORAGE_INDEX=-1
set EMBEDDED_STORAGE=""

Solution: change set mode = "cluster" to set mode = "standalone".

error starting container: API error (404): network fabric_test not found“

1. The fabric version used is v2.2.4. Test the test network

2. Problem description

When calling the basic chain code, the following error messages are found:
error: Endorsement failure during invoke. Response: status: 500 message: “error in simulation: failed to execute transaction 75a77550b68a7476882e7a512fa0dd4f0accd90e9f1db7e5193c914dd91bb285: could not launch chaincode basic_ 1.0:3cfcf67978d6b3f7c5e0375660c995b21db19c4330946079afc3925ad7306881: error starting container: error starting container: API error (404): network fabric_ test not found”

This fabric_test has different results according to different versions.
the essence is that the name of the started fabric network is wrong, which is inconsistent with the configuration in our. Yaml file and the docker compose

3. The solution is as follows:

Premise: after I have finished the./network up createChannel and the chain code, the chain code will come up. Do not do the following instructions directly after down!!!!!

3.1 first, we execute the following commands:

docker network ls

The display result is

3.2 open the test network/docker/docker-compose-test-net.yaml file
see

you can find that the name here is incorrect and you need to modify it to the docker displayed by docker network ls_ test。
note that in this file

CORE_ VM_ DOCKER_ HOSTCONFIG_ NETWORKMODE=fabric_ Test
there are two places, so we need to change two places.

After modification, it can be called successfully.

[Solved] AttributeError: ‘openvino.inference_engine.ie_api.IENetwork‘ object has no attribute ‘input_info‘

[openvino] Problem Description: attributeerror: ‘openvino. Information’_ engine.ie_ api.IENetwork‘ object has no attribute ‘input_ Info ‘
this is due to the version problem. I use 2020.3.355, which is different from that on station B

next(iter(net.input_info))
Change to
next(iter(net.inputs))

There is also a small pit

n, c, h, w = net.inputs[input_blob].input_data.shape
Change to
n, c, h, w = net.inputs[input_blob].shape

Springboot startup error could not resolve placeholder XXX

An error was reported when launching the springboot project today

Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 
'spring.datasource.druid.initialSize' in value "${spring.datasource.druid.initialSize}"

First, confirm whether the field exists in the configuration file and whether the field name is written correctly. If it is confirmed that there is no error, check whether the configuration file is referenced. Generally, we will configure different configuration files in different environments, so we need to specify which configuration file to use in application.yml

spring:
  profiles: 
    active: druid

During the startup process, which file is used will be output. Note that if there is no output, it means that it has no effect

if you check the above, you can try build – & gt; Rebuild project try to rebuild and I succeed.

How to Fix Tomcat Error: Failed to destroy end point associated with ProtocolHandler[ajp-nio-8009]


Foreground summary: The maven repository that we installed is by default in the M2/Repository on disk C, but Windows users have their operating systems installed on disk C, so it is dangerous to put the Maven repository on disk C, so we need to modify the local repository path. Today the framework of the maven dependent libraries to replace the download address and the location of the store, because before use is a website, download or update the configuration file is particularly slow, is really can’t stand to replace more ali cloud with maven repositories, feel the speed suddenly increased n level, of course, the error is also my errors after running Tomcat after change.

Problem: Because I changed the location of the Maven repository’s Settings.xml, the configuration environment was inconsistent with the default environment variables, causing Tomcat to run incorrectly.
Solutions:1. Open MyEclipse and click Windows-& GT; preferences-> maven-> Add a Maven that has been installed in the D:\Java directory, as: D:\Java\ Maven-3.0.4, and check the attached item. And click the browse button below to open Maven’s global configuration file, such as D:\Java\ Maven-3.0.4 \conf\ fine.xml. (Skip this step if it is already installed)
2. Open MyEclipse and click Windows-& GT; preferences-> maven-> Under User Setting, change the User Setting option to D:\Java\m2\ Repository \ Settings. XML, and click Update Settings. And click the reIndex button below to update the index.
3. Click the Apply button in the configuration window to highlight the configuration window.
4. Finally, open CMD and execute MVN help: System. You will find that all the JARS Maven downloads from the remote library will be placed in the newly modified path D:\Java\m2\ Repository.

c1: Commend line error D8021 :invalid numeric argment ‘/Wno-cpp’

The above error

appears when installing pycocotools under

win10

coco is a labeled image data set, which can be used for target detection, etc. Pycocotools is an API tool about coco

source

git clone https://github.com/pdollar/coco.git

Compile

cd coco/PythonAPI

python setup.py build_ext install

find coco/PythonAPI/setup.py (you can just use everything) and delete the parameters wno-cpp and wno-print-function.

TypeError: Decimal type object is not a JSON serialization solution

The data type calculated when python connects to a database using select sum(a) from b is Decimal. But this format doesn’t fit the json format, so we can cast the data we get. Convert to an integer, and you’ll be able to fit the JSON format.

@app.route('/c1')
def get_cl_data():
    data = utils.get_conn()
    # data = json.dumps({"confirm": data[0], "suspect": data[1], "heal": data[2], "dead": data[3]})
    # print(data)
    return jsonify({"confirm": int(data[0]), "suspect": int(data[1]), "heal": int(data[2]), "dead": int(data[3])})

</ div>