Wrote a test example of mycat connection PGSQL, mycat can normal boot, but the connection has been an error,
Mycat log file error message:
The 2018-08-16 17:10:31. ERROR 212 [$_NIOREACTOR - 15 - RW] (io.mycat.net.FrontendConnection.loadDataInfileEnd (271) FrontendConnection. Java:) - the load data ERROR
Java. Lang. NullPointerException
The at IO. Mycat. Server. Handler. ServerLoadDataInfileHandler. End (ServerLoadDataInfileHandler. Java: 622) ~ [mycat - server - 1.6 - the jar:?]
At io.mycat.net.FrontendConnection.loadDataInfileEnd FrontendConnection. Java: (269) ~ [Mycat - server - 1.6 - the jar:?]
At io.mycat.net.FrontendConnection.rawHandle FrontendConnection. Java: (469) ~ [Mycat - server - 1.6 - the jar:?]
At io.mycat.net.FrontendConnection.handle FrontendConnection. Java: (460) ~ [Mycat - server - 1.6 - the jar:?]
At io.mycat.net.AbstractConnection.onReadData AbstractConnection. Java: (321) ~ [Mycat - server - 1.6 - the jar:?]
At io.mycat.net.NIOSocketWR.asynRead NIOSocketWR. Java: (190) ~ [Mycat - server - 1.6 - the jar:?]
At io.mycat.net.AbstractConnection.asynRead AbstractConnection. Java: (273) ~ [Mycat - server - 1.6 - the jar:?]
At io.mycat.net.FrontendConnection.register FrontendConnection. Java: (444) ~ [Mycat - server - 1.6 - the jar:?]
At io.mycat.net.NIOReactor$RW.register NIOReactor. Java: (160) ~ [Mycat - server - 1.6 - the jar:?]
At io.mycat.net.NIOReactor$RW.run NIOReactor. Java: (92) ~ [Mycat - server - 1.6 - the jar:?]
The at Java. Lang. Thread. The run (Thread. Java: 748) [? : 1.8.0 comes with _151]
The 2018-08-16 17:10:32. 424 INFO/Timer1
CodePudding user response:
Schema. The XML configuration:<? The XML version="1.0"?>
1. The balance="0", all read operations are sent to the currently available writeHost,
2. The balance="1", all read operations are random sent to readHost,
3. Balance="2", all read operations are random in writeHost, readhost on distribution,
- & gt;
1. WriteType="0", all write operations are sent to the available writeHost,
2. WriteType="1", all write operations are random send to readHost,
3. WriteType="2", all write operations are random in writeHost readhost points on
-- -- & gt;
Rule. The XML configuration
<? The XML version="1.0" encoding="utf-8"?>
- you may not use this file except in the compliance with the License. - you
May obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software -
Distributed under the License is distributed on an "AS is" BASIS, - WITHOUT
WARRANTIES OR the CONDITIONS OF ANY KIND, either express OR implied) - See the
License for the specific language governing permissions and limitations -
Under the License. - & gt;
CodePudding user response:
I also encountered this problem, could you tell me how to solve?