The node requests the API address written by java to report an error error:getaddrinfo ENOTFOUND

1. Questions

The node server requests the java interface with the following code. The local host name in the project is localhost, so it will not report an error, but it will report an error after it is deployed to the formal environment error:getaddrinfo ENOTFOUND www.xxxx.com   www.xxxx.com :8080

var opt = {
        hostname: 'http://www.xxxx.com',
        port: '8080',
        method: 'POST',
        path: path,
        headers: {
            "Content-Type": 'application/json;charset=utf-8',
        }
    }

2. Solution

Because the host name only fills in the actual host name, remove the http:// or HTTPS:// in the host name (fill in the specific path in the path), and you can request normally.

Tomcat Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors

Tomcat reported an error when parsing HTTP request and returned the error to the client. The specific error is as follows:

 org.apache.coyote.http11.AbstractHttp11Processor.process Error parsing HTTP request header
 Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.

The reason for the error is that the amount of data carried by the URL link header file is too large. You only need to modify the server.xml Change maxhttpheadersize to a larger value. It is shown as follows:

Vue: How to Solve error avoided redundant navigation to current location: “/xxx”

The solution of error: avoided redundant navigation to current location: “/ xxx” in the project

error reporting shows that the route is repeated, which has no impact on the function.

resolvent:

Router file index.js Add the following code to the

// Solve the problem that vue-router in the navigation bar of ElementUI reports an error when repeatedly clicking the menu in version 3.0 or above
const originalPush = Router.prototype.push
Router.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}

How to Solve Error: avoided redundant navigation to current location: “index/user”

Error: avoided redundant navigation to current location: “index/user” solution

Problem description solution

Problem description

Using the navigation menu made by element UI, when clicking the same navigation continuously, an error will be reported
the error will not affect the function ( Affect obsessive-compulsive disorder )

As shown in the figure

current address http://localhost : 8080/#/index/user
continuous click – user list
jump to the same address http://localhost : 8080/#/index/user

error report

Solutions

import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
// router folder - >index.js file
//cv the following code to solve the error reporting problem of duplicate routing addresses (once and for all)
const originalPush = VueRouter.prototype.push
   VueRouter.prototype.push = function push(location) {
   return originalPush.call(this, location).catch(err => err)
}

kubernetes Error from server (AlreadyExists): error when creating “kubernetes-dashboard.yaml”: serv

In implementation:

kubectl apply -f kubernetes-dashboard.yaml

report errors

Error from server (AlreadyExists): error when creating “kubernetes- dashboard.yaml “: services “kubernetes-dashboard” already exist

The preliminary judgment is that there is, and the dashboard already exists

use:

kubectl get pod --all-namespaces 

It is found that there is an abnormal imagepullbackoff

Then use

kubectl delete -f kubernetes-dashboard.yaml 

Delete

OK, finish

SpringBoot Error running ‘Application’: Command line is too long.Shorten command line for

1.Error information

Error running 'Application':
Command line is too long.Shorten command line for Application or also for Spring Boot default configuration.

2.Cause of error

Springboot project startup command too long

3. Solutions

Click the project startup configuration item -> short command line option, select the classpath file or Java manifest option -> restart the project

HEXO D Command ERROR Deployer not found: git

Problem description

I have written in the site configuration file:

deploy:
  type: git
  repo: [email protected]:lanlan2017/lanlan2017.github.io.git  # Github pages地址
  branch: master

However, hexo d error:

ERROR Deployer not found: git

Solution

This is because the hexo deployer git </ code> plug-in is not installed. Just enter the following plug-in under the site directory to install it:

npm install hexo-deployer-git --save

Then you can use the hexo - d command to push.

How to Solve Error: cannot open .Git/fetch_HEAD: Permission denied

When using gitoite to manage git library, an error is reported when using the administrator account to perform git pull operation on gitolite admin warehouse

[drpeng@srvser gitolite-admin]$ git pull
error: cannot open .git/FETCH_HEAD: Permission denied

It literally means . Git/fetch_Head this file does not have permission. The permission to enter the. Git folder and view this file is really wrong. That’s a good solution

[drpeng@srvser gitolite-admin]$ cd .git
[drpeng@srvser .git]$ ll -h FETCH_HEAD
Totally 48K
**-rw-r--r--   1 root   root      0 Sep   7 2016 FETCH_HEAD**
[drpeng@srvser .git]$ exit
logout
[root@srvser git]# cd /home/drpeng/git-13/gitolite-admin/.git
[root@srvser .git]# chown -R drpeng.drpeng FETCH_HEAD
[root@srvser .git]# su - drpeng
[root@srvser git]# cd /home/drpeng/git-13/gitolite-admin/
[drpeng@srvser git-13]$ cd gitolite-admin/
[drpeng@srvser gitolite-admin]$ git pull
remote: Counting objects: 509, done.
remote: Compressing objects: 100% (404/404), done.
remote: Total 499 (delta 125), reused 0 (delta 0)
Receiving objects: 100% (499/499), 53.32 KiB, done.
Resolving deltas: 100% (125/125), done.

Above, the problem is solved~

Error: # error PCL requires C++ 14 or above

I’m compiling NDT_ When using the OMP function package, an error was reported: error PCL requires C + + 14 or above, and a bunch of errors were reported later. At first, I thought it was a problem with the PCL version. Later, I turned to other bloggers’ blogs and found that CMakeLists.txt Add the following code to compile

    ADD_COMPILE_OPTIONS(-std=c++11 )
    ADD_COMPILE_OPTIONS(-std=c++14 )
    set( CMAKE_CXX_FLAGS "-std=c++11 -O3" )
    or do not specify that cmkae compile with c++11 features, etc. can be compiled successfully.

How to Solve Redis Cluster Error: (Error) Moved

The solution of data operation error moved with redis cli

Examples of error reporting:

(base) wdh@wdh:~$ redis-cli -h 172.17.0.1 -p 6391
172.17.0.1:6391> get name
(error) MOVED 5798 172.100.0.1:6392
172.17.0.1:6391> 

Cause of error:

No cluster mode connection (connection node command does not add – C parameter)

terms of settlement:

Connect redis cluster nodes with – C parameter: redis cli – C – H 172.17.0.1 – P 6391

(base) wdh@wdh:~$ redis-cli -c -h 172.17.0.1 -p 6391
172.17.0.1:6391> get name
-> Redirected to slot [5798] located at 172.100.0.1:6392
(nil)
172.100.0.1:6392> set name 1
OK
172.100.0.1:6392> get name
"1"
172.100.0.1:6392> 

How to read JS file app.ux Global variables in

Fast application definition in app.ux The global variables in the JS file can be obtained through the quick application of the public method getapp (). For details, please refer to the following example code.

app.ux code:

data: {
      AppData: '123456',
}

JS file:

export default {
      getAppData() {
        return getApp().$def.data.AppData
      }
    }

For more details, please refer to:

Quick application development guidance document: https://developer.huawei.com/consumer/cn/doc/development/quickApp-Guides/quickapp-whitepaper

Quick application script:

https://developer.huawei.com/consumer/cn/doc/development/quickApp-References/quickapp-script


Link to the original text: https://developer.huawei.com/consumer/cn/forum/topic/0204411133432620361?fid=18

Original author: mayism

Hadoop — HDFS data writing process

HDFS write data flow

Suppose there is a local file data.txt First, the HDFS client creates a connection object file system. Then the client requests the namenode to upload the file/user/fzl/ data.txtNameNode After receiving the request, respond to the client and upload the file. The client requests to upload the first block (0-128m), please return to datanode, and then namenode returns datanode1, datanode2, datanode3 nodes (considering node distance, load balancing and other factors), indicating that these three nodes will be used to store data. After receiving the return node, the client creates fsdataoutputstream, and then requests datanode1 to establish a block transmission channel, and datanode1 requests to communicate with Da Tanode2 establishes a channel, datanode2 establishes a channel with datanode3, datanode3 responds to datanode2, datanode2 responds to datanode1, datanode1 responds to fsdataoutputstream successfully (pipeline transmission), and then starts to send data in the form of packet (each transmission of stream is a chunk (512byte), saves a packet (64K) and then transmits the packet object). When transmitting to datanode1, datan Ode1 writes the data file to the disk first, and then transfers it to datanode2 directly from memory. Datanode2 and datanode3 are in turn and so on. In this way, the problem that a datanode fails to write after an error is avoided. After all transfers are completed, a data write operation is completed

The flow chart is as follows:

Node distance calculation

Node distance: the sum of the distances from two nodes to the nearest common ancestor

Figure 2-10: node distance: 3

Rack aware

The first copy is on the node where the client is located. If the client is outside the cluster, randomly select a second replica in a random node of another rack, and the third replica in a random node of the rack where the second replica is located