Tag Archives: distributed

[Solved] xxl-job Error: xxl-rpc remoting error(connect timed out)

Unable to register due to connection using local network.

 

Error reporting information:

address:  http://192.168.x.xxx:9999/ code: 500 msg: xxl-rpc remoting error(connect timed out), for url: http://192.168.x.xxx:9999/run

 

Solution:

1. Change automatic registration to manual registration
2. Use intranet penetration tool
3. Fill in the manually registered address as the address of Intranet penetration

[Solved] Error contacting service. It is probably not running.

First, check whether more than half of the servers start zookeeper. If yes, use the JPS command and find that the quorumpeermain main class is not started

[atguigu@Hadoop103 zookeeper-3.5.7]$ jps
14850 Jps

The most likely cause: Zookeeper decompression path in the conf folder zoo.cfg (I am here after changing the name) configuration when adding content after the addition of spaces and the creation of myid up and down there are empty lines or left and right spaces, enter the file deleted, and then check the jps

#######################cluster########################## 
server.2=hadoop102:2888:3888 
server.3=hadoop103:2888:3888 
server.4=hadoop104:2888:3888

[Solved] Error contacting service. It is probably not running.

First, check whether more than half of the servers start zookeeper. If yes, use the JPS command and find that the quorumpeermain main class is not started

[atguigu@Hadoop103 zookeeper-3.5.7]$ jps
14850 Jps

The most likely cause: Zookeeper decompression path in the conf folder zoo.cfg (I am here after changing the name) configuration when adding the content after the addition of a space and the creation of myid up and down there are empty lines or left and right spaces, enter the file deleted, and then check the jps

#######################cluster########################## 
server.2=hadoop102:2888:3888 
server.3=hadoop103:2888:3888 
server.4=hadoop104:2888:3888

[Solved] Eureka registry service starts error: Request execution error. Endpoint = defaultendpoint

Eureka registry service starts with an error request execution error. Endpoint = defaultendpoint {serviceurl = ' http://127.0.0.1:8000/eureka/ }

 Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://127.0.0.1:8000/eureka/}, exception=java.net.ConnectException: Connection refused: connect stacktrace=com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect

There are two reasons for the above problems:

The defaultzone attribute in the configuration file does not recognize that when Eureka is started, it will pull the information of other services by default and set it to close to run normally
fetch registry: false

The application.yaml configuration file is as follows

server:
  port: 8000
  # server name
spring:
  application:
    name: eureka-server
# Eureka address information configuration
eureka:
  client:
    service-url:
      defaultZone: http://127.0.0.1:8000/eureka
    register-with-eureka: false # Whether to register your own information to EurekaServer, the default is true
     fetch-registry: false # Whether to pull information about other services, the default is true

Kafka Creates and Writes Logs Error [How to Solve]

Kafka creates and writes logs with an error

Running bin\windows\kafka-server-start.bat config\server.properties reports an error when creating logs, but viewing the directory file has been created successfully. Error reason: no permission.

Solution: modify the folder permissions

Run bin\windows\kafka-server-start.bat config\server.properties to report an error when creating logs, but check that the directory file has been created successfully

Error reporting reason: no permission

Solution: modify folder permissions

Kafkaconsumer calls seek() method error [How to Solve]

When receiving the offset specified by calling the seek method in development, the following error is reported:

java.lang.IllegalStateException: No current assignment for partition xxx

Error reporting means that the partition does not have the offset you specified, but from the perspective of Kafka visualization tool, why is this error reported
originally, subscribe() and assign() are lazy – therefore, you need to make a “virtual call” to poll() before you can use seek().

[Solved] Fatal message conversion error; message rejected; it will be dropped or routed to a dead letter exchan

When rabbitmq is used, the message deserialization fails, with the following exception:
fatal message conversion error; message rejected; It will be dropped or routed to a dead letter exchange, if so configured

after location analysis, the reason is that the serialization conversion jackson2jsonmessageconverter is set on the production side of MQ messages, and the default serialization class is simplemessageconverter. And the deserialization conversion is not set on the consumer side.

Solution:
because the message is a JSON string, use string to receive parameters, and then use JSON tool class to convert it into an object;

import com.alibaba.nacos.client.utils.JSONUtils;
import com.atguigu.rabbit.common.constant.MqConst;
import com.atguigu.yygh.sms.service.SMSService;
import com.atguigu.yygh.vo.sms.SmsVo;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.IOException;

@Component
public class SmsReceiver {

    @Autowired
    private SMSService smsService;

    @RabbitListener(bindings = @QueueBinding(
            value = @Queue(value = MqConst.QUEUE_SMS, durable = "true"),
            exchange = @Exchange(value = MqConst.EXCHANGE_DIRECT_SMS),
            key = {MqConst.ROUTING_SMS}
    ))
    public void send(
            String json,//Receive the transmitted content
            Message message, Channel channel) {
        SmsVo smsVo = null;
        try {
            //Convert the json string into the corresponding object
            //JSONUtils pack name(com.alibaba.nacos.client.utils.JSONUtils)
            smsVo = (SmsVo) JSONUtils.deserializeObject(json, SmsVo.class);
            System.out.println(smsVo);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

KAFKA – ERROR Failed to write meta.properties due to (kafka.server.BrokerMetadataCheckpoint)

 
I set up Kafka source code read environment on Windows10, and encourted with error below, so what is wrong, I am a fresh man to learn kafka

[2021-04-29 19:57:42,957] ERROR Failed to write meta.properties due to (kafka.server.BrokerMetadataCheckpoint)
java.nio.file.AccessDeniedException: C:\Users\a\workspace\kafka\logs
    at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
    at sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:115)
[2021-04-29 19:57:42,973] ERROR [KafkaServer id=0] Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
java.nio.file.AccessDeniedException: C:\Users\a\workspace\kafka\logs
    at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
    at sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:115)

and another ERROR below

[2021-04-29 19:57:43,821] ERROR Error while writing to checkpoint file C:\Users\a\workspace\kafka\logs\recovery-point-offset-checkpoint (kafka.server.LogDirFailureChannel)
java.nio.file.AccessDeniedException: C:\Users\a\workspace\kafka\logs
    at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
    at sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:115)
[2021-04-29 19:57:43,823] ERROR Disk error while writing recovery offsets checkpoint in directory C:\Users\a\workspace\kafka\logs: Error while writing to checkpoint file C:\Users\a\workspace\kafka\logs\recovery-point-offset-checkpoint (kafka.log.LogManager)
[2021-04-29 19:57:43,833] ERROR Error while writing to checkpoint file C:\Users\a\workspace\kafka\logs\log-start-offset-checkpoint (kafka.server.LogDirFailureChannel)
java.nio.file.AccessDeniedException: C:\Users\a\workspace\kafka\logs
    at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
    at sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:115)
[2021-04-29 19:57:43,834] ERROR Disk error while writing log start offsets checkpoint in directory C:\Users\a\workspace\kafka\logs: Error while writing to checkpoint file C:\Users\a\workspace\kafka\logs\log-start-offset-checkpoint (kafka.log.LogManager)

I downgraded to the Kafka 2.8.1 version (Index of /kafka/2.8.1) and after that everything is working perfectly.
Share
Improve this answer

This is a common error when log retention happens.
Kafka doesn’t have good support for windows filesystem.
You can use WSL2 or Docker to work around these limitations – 

This seems to be a bug affecting some Kafka versions. Try installing kafka_2.12-2.8.1.tgz version. It will solve your problem.

I have tried using Kafka kafka_2.12-3.0.0.tgz and the same issue occurred. Seems 2.12-3.0.0 have issues with windows.
Try to downgrade the version to kafka_2.12-2.8.1.tgz. This resolved all issues and working fine.

tar: Error opening archive: Failed to open ‘/Users/xxx/Library/Caches/Homebrew/downloads/348a16e

When installing brew install graphviz, there was a problem with:
tar: Error opening archive: Failed to open ‘/Users/xxx/Library/Caches/Homebrew/downloads/348a16e5fedb24cb14fe4fd5c72caa96074c7b4e21ce4d2f7a89eb4b638c830f–gd-2.3.2.arm64_big_sur.bottle.tar.gz’
Error: Failure while executing; tar --extract --no-same-owner --file /Users/xxx/Library/Caches/Homebrew/downloads/348a16e5fedb24cb14fe4fd5c72caa96074c7b4e21ce4d2f7a89eb4b638c830f--gd-2.3.2.arm64_big_sur.bottle.tar.gz --directory /private/tmp/d20210927-26485-nzi2qo exited with 1. Here’s the output:
tar: Error opening archive: Failed to open ‘/Users/xxx/Library/Caches/Homebrew/downloads/348a16e5fedb24cb14fe4fd5c72caa96074c7b4e21ce4d2f7a89eb4b638c830f–gd-2.3.2.arm64_big_sur.bottle.tar.gz

A closer look reveals that there was a problem installing the dependency at this step: the

So, the solution: install the dependency brew install gd separately

Once done, just install graphviz again, and if the same type of error occurs again during this process, continue installing the dependency where the error occurred.

[Solved] Openfeign Error: error: Failed to parse Date value…

1 date conversion problem

1. Error reporting

error: Failed to parse Date value '2021-09-13 23:59:59': Cannot parse date "2021-09-13 23:59:59": while it seems to fit format 'yyyy-MM-dd'T'HH:mm:ss.SSSZ', parsing fails (leniency?null))

2. solution

Add the annotation of date format deserialization on the field attribute @ jsonformat (pattern = "yyyy MM DD HH: mm: SS")

	/**
     * the end of time
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date endDate;