Category Archives: How to Fix

Reasons for being rejected immediately after telnet

Reasons for being rejected immediately after telnet

The phenomenon is that
22.188, telnet 22.122 can be connected, as follows

22.152, telnet 22.122 error, as follows

at first thought it was a problem of 22.122 network rules, and was rejected by 122.
Later, through the Internet,
means that the application was rejected instead of the server configuration.
Then I shut down the 22.152 application, telnet again, and the problem was solved.

To solve the problem of NPM run eject error in react

To solve the problem of NPM run eject error in react

Recently, I began to learn react. I used create react app to initialize a react project. Then I found that I wanted to configure webpack manually, but I didn’t know where it was. I found that I was using BD to configure webpack package.json There’s a bunch of code in the

 "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },

NPM run eject will copy all dependent files and corresponding dependencies ( webpack , Babel ) to your project. It's a single operation. Once eject , you can't go back. If you want to go back to the normal project, you have to Re NPM install create react app - G

It was found that the following error was reported when executing NPM run eject :

checked online, which means that the problem here is that the scaffold adds . Gitgnore files, but there is no local warehouse, which can be used normally according to the following order

git init
git add .
git commit -m 'init'

Then execute NPM run eject again, and the execution is successful.
after the execution is completed, it is found that package.json It's like this:

  "scripts": {
    "start": "node scripts/start.js",
    "build": "node scripts/build.js",
    "test": "node scripts/test.js"
  },

The last line of code was deleted by the system itself, not by me!

That's all for today

Reprint should be marked, thank you!

JDK disable tlsv1.0

Some web servers need to disable some protocols after deployment. Let’s take tlsv1.0 as an example to talk about how to disable them.

Find the JRE directory in your JDK installation directory and JRE/lib/security in the JRE directory/ java.security File, and then in the file

jdk.tls.disabledAlgorithms=SSLv3 , RC4, md5withrsa, DH keysize & lt; 768, add tlsv1.0.

Please transfer a valid prop path to form item!

The main error is when setting prop for El form item

The name of the loop prop in El form item should be consistent with the name of the attribute in the form list, so as to ensure the consistency of components.

 

<template v-for="(person,index) in temp">
    <el-form-item prop="name">
        <el-input v-model="person.name"></el-input>
    </el-form-item>
    <el-button @click="removeDomain(index)" size="small">-</el-button>
</template>

Property value is person.name

prop=’name’

Error: Error endorsing chaincode: rpc error: code = 2 desc = Error installing chaincode code test_cc

Error: Error endorsing chaincode: rpc error: code = 2 desc = Error installing chaincode code test_ cc:1.0(chaincode /var/hyperledger/production/chaincodes/test_ cc.1.0 exits)

The storage location of chain code in peer is/var/hyperledger/production/chaincodes. After installing a chain code, you can delete the chain code here and deploy it again. In addition, what is stored in the/var/hyperledger/production/ledgersdata directory is the ledger data/var/hyperledger/production/ledgersdata/chains/chains/triangle channel

TLS error: error: RPC error: code = unavailable desc = transport is closing

If you want to turn on TLS, you just need to set the TLS attribute of orderer, peer, CLI and Ca to true, and configure the file address such as certificate and key. These are the following attributes:

CORE_ PEER_ TLS_ ENABLED=trueCORE_ PEER_ TLS_ CERT_ FILE=xxx/tls/ server.crtCORE_ PEER_ TLS_ KEY_ FILE=xxx/tls/ server.keyCORE_ PEER_ TLS_ ROOTCERT_ FILE=xxx/tls/ ca.crt
After that, start the container to enter the CLI. It should be noted that after the TLS mode is turned on, the command to create a channel is different from that when the TLS mode is not turned on. When the TLS mode is not turned on, the command to create a channel is as follows:

peer channel create -o orderer.scf.com:7050 -c mychannel -t 50 -f ./channel-artifacts/ mychannel.tx
After opening TLS, the TLS parameter and the certificate file address of the sorting service should be added when creating the channel

peer channel create -o orderer.scf.com:7050 -c mychannel -t 50 –tls –cafile /opt/gopath/src/ github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/scf .com/orderers/ orderer.scf.com/msp/tlscacerts/tlsca . scf.com – cert.pem -f ./channel-artifacts/ mychannel.tx
If you still use the command when TLS is not turned on to create a channel, the following error will be reported in the CLI:

2019-04-11 17:31:48.661 UTC [grpc] Printf -> DEBU 010 transport: http2 Client.notifyError got notified that the client transport was broken unexpected EOF.
2019-04-11 17:31:48.667 UTC [grpc] Printf -> DEBU 011 transport: http2 Client.notifyError got notified that the client transport was broken unexpected EOF.
2019-04-11 17:31:48.668 UTC [grpc] Printf -> DEBU 012 transport: http2 Client.notifyError got notified that the client transport was broken read tcp 172.18.0.10:59602-> 172.18.0.2:7050: read: connection reset by peer

orderer.scf.com | 2019-04-11 17:31:48.654 UTC [grpc] Printf -> DEBU 3da grpc: Server.Serve failed to complete security handshake from “172.18.0.10:59598”: tls: first record does not look like a TLS handshake
Next, the commands for peer to add channel, install chain code and query are the same as when TLS is not turned on. However, when instantiating chain code and calling invoke, you need to add parameters such as TLS in the command as when creating channel, otherwise the above error will be reported.

In other words, if TLS mode is enabled, as long as communication with orderer is involved, two parameters – TLS and – cafile need to be added to the command line parameters. Cafile parameter corresponds to the corresponding file of orderer module.

Grpc client access server prompt: RPC error: code = unimplemented desc = unknown service possible reasons

Possible causes of specific errors and Solutions

Specific error

{"file":"/cmd/channel/xxx/prepay.go","level":"error","line":220,"msg":"xxx.DoPrepayGRPC error: xxx2Client.CreateOrder: rpc error: code = Unimplemented desc = unknown service xxx_global.xxx2","pid":63405,"requestid":"2_1615862450_86","sdkid":"xxx_global","time":"2021-03-16T10:40:50+08:00"}

Possible causes

1. The service called by the client is inconsistent with the service protocol of grpc;
2. When proto is consistent, the package name of proto is changed in the process of application generation.

Solution

1. You need to check whether the proto used by the client is consistent with that used by the service;
2. Check whether the package name of proto has changed.

Did not encounter other reasons leading to this error, know the students are welcome to leave a message in the comments area ha~

Configuring NFS server in Linux

1、 Install services for NFS

sudo apt-get install nfs-kernel-server rpcbind

(by the way, you can start the SSH service sudo apt get install openssh server)

2、 NFS profile

Open profile

sudo vim /etc/exports

Add server folder path

/home/zwz/linux/nfs *(rw,sync,no_root_squash)

As above, my path is/home/ZWZ/Linux/NFS

3、 Restart NFS service

sudo /etc/init.d/nfs-kernel-server restart

4、 Experimental test

1. Copy files to the NFS folder (such as zimage)
2. The client can use the corresponding NFS command to try.

Idea access denied for user ‘xxx’ @ ‘localhost’ solution

Solutions to access denied for user ‘xxx’ @’localhost ‘problem

Key to error reporting

java.sql.SQLException : access denied for user ‘xxx’ @’localhost ‘(using password: Yes). Note that XXX here is not root, root is a permission problem

Solution

Change the user name for the configuration file

You can choose any name you like

And then 🆗 It’s over

Cause analysis

The framework did not get the correct user name of datasource, which is related to the configuration. When such a framework constructs an instance of abstractdriverbaseddatasource, the user name it gets is always the current machine name, that is, XXX. The underlying reason is not clear.