Author Archives: Robins

[Solved] flicksql cdc mysql to kafka Connect Error: org.apache.flink.table.api.ValidationException…

Error Messages: org.apache.flink.table.api.ValidationException: Could not find any factory for identifier 'debezium-json' that implements 'org.apache.flink.table.factories.SerializationFormatFactory' in the classpath.


Check if there is any package that I forgot to import
I didn’t import the flink-json package here

        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-json</artifactId>
            <version>${flink.version}</version>
        </dependency>

The import is successful and Kafka can be connected normally~

[Solved] GDAL+OPENCV often reports errors when processing remote sensing impacts

I found that every time I use the opencv package to process remote sensing images, it often reports an error, even though it has become uint format.
This time I found out that some of them only support three channels, my binary image is one channel, the error of storing the result is because I need to save the result of 1 channel, mine is three channels
so it is necessary to convert 1 channel to 3 channels back and forth ` img1 = np.array(b1)

# img2 = np.dtype(img1, np.uint8)
img = np.expand_dims(img1, axis=2)
img = np.concatenate((img, img, img), axis=-1)

gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)



ret, binary = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY)

contours, hierarchy = cv2.findContours(binary, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
# contours = cv2.findContours(img)
dilate = cv2.fillPoly(img, [contours[1]],(255,15,15))
cv2.imshow("filled binary", dilate)`

 

How to Solve Remote Desktop Protocol 0xd06 Error

My environment:

Target computer win11 virtual machine vm16.2.0 (win10 in the virtual machine is copied from the original computer)

The original computer is win10 virtual machine vm15.5.0

Error reporting process:

Connect the win10 system in the virtual machine with the remote desktop connection tool mstsc provided by win11. The error is as follows:

The session will be disconnected due to a protocol error. Please reconnect to the remote computer
error code: 0xd06
extended error code: 0x0

Solution:

After a series of searches, no solution was found on the Internet. After careful consideration, considering that the win10 system in the virtual machine is copied from another original computer and the original computer uses the vm15.5.0 version of the virtual machine, it may be that the driver has a problem.

Solution:

Uninstall the display driver of win10 system in the virtual machine.

Ubuntu18.04 Install ROS Error: rosdep update [How to Solve]

In the installation of ros for rosdep update often reported errors, there is a way to 100% success, solved by modifying the download source files, a total of 5 files, here is a record.

1) open sources_list.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py

1.1 add a line between lines 310 and 311

url = 'https://ghproxy.com/'+url

After adding, it is shown in the following figure.

1.2 Modify line 72 and add after the equal sign

'https://ghproxy.com/' + 

After modification, it is shown in the following figure.

After modification, save and exit.

2) open gbpdistro_support.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/gbpdistro_support.py

2.1 Modify line 36 to add

'https://ghproxy.com/' + 

After modification, it is shown in the following figure.

2.2 modify 204 lines and add the same contents as 2.1

After modification, see the following figure.

After modification, save and exit.

3) open rep3.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/rep3.py

Modify line 39 and add the same content as 2.1, namely

'https://ghproxy.com/' + 

After modification, it is shown in the following figure.

After modification, save and exit.

(4) open __init__.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdistro/__init__.py

Line 68, add the same as 2.1, namely

'https://ghproxy.com/' + 

After modification, it is shown in the following figure.

After modification, save and exit.

5 open github.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdistro/manifest_provider/github.py

Amend line 68 to add

'https://ghproxy.com/' + 

After modification, it is shown in the following figure.

After modification, save and exit.

After all the modifications are saved, execute rosdep update. After the update is completed, see the following figure:

[Solved] Nginx Startup Error: directive is not allowed here in

Problem scenario

In the Linux system, the conf folder is provided in the nginx installation package by default and the configuration file of nginx.conf includes the configuration articles in this folder by default.

I use the windows system this time, and also configures the include folder through the example. However, for the convenience of the figure, the include folder and the folder of nginx.conf file are consistent.

Analyze and solve:

Nginx error log prompt:

“worker_processes” directive is not allowed here in D:/nginx-1.22.0/conf/nginx. conf:3

After deleting the worker_processes instruction, an error is reported that other instructions are not allowed.

Later, it was found that the use of wildcards in include led to the inclusion of yourself. You can modify the include method.

[Solved] Mac Terminal error: command not found: telnet

When a new Mac computer is purchased, an error is reported when the telnet command is used at the terminal: command not found: telnet. This is because telnet is not installed at the terminal.

Solution:

brew install telnet

If homebrew is not installed on the terminal, install homebrew first

 /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )”

Then install telnet

 brew install telnet

[Solved] Parsing error: No Babel config file detected for XXX

Parsing error: No Babel config file detected for XXX

In projects created with Vue scaffolding, the first line of each file in the project will have a red wavy line.

Solution:
find the package.json file in the project file, add "requireConfigFile": false in parserOptions, and you can solve the problem of red wavy lines.

 "parserOptions": {
      "parser": "@babel/eslint-parser",
      "requireConfigFile":false
    },

Through the above operations, the problem can be solved!

[Solved] error“:“element click intercepted“,“message“:“element click intercepted“

Error reporting: Selenium project can run locally, and there is no graphical use case execution error on Jenkins deployed in CentOS virtual machine: element click intercepted

Troubleshooting ① first check whether the browser and driver versions match

Browser driver download address: http://chromedriver.storage.googleapis.com/index.html

Troubleshooting ② check whether there are chrome processes that have not been closed. If there are, you need to kill them in batches

 kill -9  $(pgrep chrome) 

Troubleshooting ③ if the driver version matches, report and correct the error. Add the following code, with the focus on adding window size

chrome_options = Options()
chrome_options.add_argument('--headless')     # To open the browser, comment out the line of code
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument("--window-size=1920,1080")  # Error reported when adapting jenkins build{"error":"element not interactable"}
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome(chrome_options=chrome_options)

Build successful

[Solved] SpringBoot Date Convert Error: JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime`

1. When data of type localdate in Java is tested on swagger, the format when input in the format of json is 2018-07-09. It should be noted that 07 and 09 are two digits, not one digit.

2. If the date is of LocalDate type, JacksonAutoConfiguration will automatically process whether the foreground transmits the date in string format to the background or the background returns the date in format to the front end.

3. If the date is of LocalDateTime type, we need to process it from the front end to the back end and from the back end to the front end. Because the configuration in the following YML does not apply to Java 8 date types, such as LocalDate and LocalDateTime, it only applies to fields of date or DateTime type.

#Date Formatting
spring:
  jackson:
    date-format: yyyy-MM-dd HH:mm:ss

Solution: add LocalDateTimeConfig configuration class

/**
 * LocalDateTime
 */
@Configuration
public class LocalDateTimeGlobalConfig {
    private static final String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss";

    /**
     *Configuring LocalDateTime type serialization and deserialization
     */
    @Bean
    public Jackson2ObjectMapperBuilderCustomizer jsonCustomizer() {
        /*return new Jackson2ObjectMapperBuilderCustomizer() {
            @Override
            public void customize(Jackson2ObjectMapperBuilder jacksonObjectMapperBuilder) {
                jacksonObjectMapperBuilder.serializers(new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DATE_TIME_PATTERN)));
                jacksonObjectMapperBuilder.deserializers(new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DATE_TIME_PATTERN)));
            }
        };*/
        //This approach is equivalent to the above
        return builder -> {
            builder.serializers(new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DATE_TIME_PATTERN)));
            builder.deserializers(new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DATE_TIME_PATTERN)));
        };
    }
}

[Solved] Vue Error: Error in v-on handler (Promise/async): “[object object]“

[Solved] Vue Error: Error in v-on handler (Promise/async): “[object object]“

Solution:

Use try_ catch package async… await function

  /**
   * export
   */
  async download () { // export
    try {
      const { parkName } = this.formInline
      const res:any = await exportInvoice({ parkName })
      this.downSteam(res)
    } catch (_) {}
  }

[Solved] openssl error: libcrypto.so.1.0.0: cannot open shared object file: Error 40

Problem Description: start to execute OpenSSL and report an error:

openssl

openssl: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

Then find the corresponding file through the search instruction, and soft connect it

find/-name libcrypto.so.1.0.0    find files
/opt/acb/lib/libcrypto.so.1.0.0   search the outcome
ln -s libcrypto.so.1.0.0 /usr/lib64/  soft connect

However, it is found that the implementation of OpenSSL still reports errors, as follows

openssl
openssl: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: Error 40

Check libcrypto.so.1.0.0 that reported error, and find that libcrypto.so.1.0.0 is also a soft connection

lrwxrwxrwx 1 splunk root      15 Jan  9  2020 libssl.so -> libssl.so.1.0.0
-r-xr-xr-x 2 splunk root  485304 Jan  9  2020 libssl.so.1.0.0

The solution is to connect the source file directly and solve the problem

ln -s libcrypto.so /usr/lib64/libcrypto.so.1.0.0