Centos7 手工创建yugabyte 集群 失败

你好:
我用的是VM 虚拟机,搭建了二个节点(192.168.0.200,192.168.201),网络模式是桥接模式 ,然后在运行 ./bin/yb-master
–master_addresses 192.168.0.200:7100,192.168.0.201:7100
–rpc_bind_addresses 192.168.0.200
–fs_data_dirs “/home/centos/disk1,/home/centos/disk2” \

& /home/centos/disk1/yb-master.out &,直接报发异常,如图:


防火墙都已经关闭了,请问这个要怎么解决

Have you started all the yb-master processes?

Also, we recommend having 3 yb-masters (if using Replication Factor of 3), or 1 yb-master (if using Replication Factor 1).

In your case, you seem to be using 2 yb-masters which is not a recommended setting.

–master_addresses 192.168.0.200:7100,192.168.0.201:7100

你好:
按照您说的方法,我又加了一个节点,还是报同样的错误,搭建了三个节点(192.168.0.200,192.168.201,192.68.0.203),网络模式是桥接模式,./bin/yb-master \

–master_addresses 192.168.0.200:7100,192.168.0.201:7100,192.168.0.203:7100
–rpc_bind_addresses 192.168.0.200
–fs_data_dirs “/home/centos/disk1,/home/centos/disk2”
–replication_factor=3 &

我把./bin/yb-master \

–master_addresses 192.168.0.200:7100,192.168.0.201:7100,192.168.0.203:7100
–rpc_bind_addresses 192.168.0.200
–fs_data_dirs “/home/centos/disk1,/home/centos/disk2”
–replication_factor=3 &

我把,192.168.0.200做 为RPC_BIND 节点,这是打印的日志,我看这里面没有把192.168.0.203加 入到列表里面来如图:

这是192.168.0.201这台机器 报的错:

这是192.168.0.203这台机器报的错:

防火墙都已经关闭了,请问这个要怎么解决,卡在这里三,四天了进展不下去了

I don’t understand much of the text in the message as it is in a different language.

But from the error message, it seems like something else is running on port 7100.

Can you do a?

% sudo netstat -apn | grep 7100

to see if some other process is using port 7100.

你好,Kannan说yb-master正在尝试使用端口7100,但是已经有一个程序在使用那个端口。
你可以使用:
% sudo netstat -apn | grep 7100
看看是什么正在使用端口7100。
如果要使用其他端口,可以尝试使用:
–master_addresses 192.168.0.200:2888,192.168.0.201:2888,192.168.0.203:2888 –rpc_bind_addresses 192.168.0.200:2888

Hello, friend:

Thank you very much for your reply. I still feel that it is not possible after trying your method. It should not be the problem of the port

192.168.200 this machine, three nodes of firewall machine I have permanently shut down, I want to ask, this yugabyte clusters can be built from the virtual machine by hand, I now use is to establish the VM virtual machine environment are respectively (192.168.0.200 192.168.0.201, 192.168.0.203), can you give a detailed manual build cluster documents to me, the more detailed, the better.

Including a few notes, feel the official website document is still a little incomplete,

This is the manually built cluster error graph:

Hi @caozhentakeshi,

A few things to try here:

1. Start with yb-master processes first

As a first step, let’s only focus on bringing up the yb-masters. We can go to the next step once this is working.

2. Check network connectivity

Could you start the yb-master process as you had mentioned above on node 192.168.0.200:

# ssh to 192.168.0.200
./bin/yb-master \
–master_addresses 192.168.0.200:7100,192.168.0.201:7100,192.168.0.203:7100 \
–rpc_bind_addresses 192.168.0.200 \
–fs_data_dirs “/home/centos/disk1,/home/centos/disk2” \
–replication_factor=3 &

Now go to node 7100,192.168.0.201 and try to connect to port 7100 on the first node:

# ssh to 192.168.0.201
telnet 192.168.0.200 7100
  • Is this node able to connect? If connection is refused, its related to networking. Maybe the nodes use a dns name or have an alternate IP address.
  • If ok, then quit the telnet session and start your yb-master.

Repeat this for the third node.

3. Check UI and post logs

Once you have your three masters running, could you check and post a screenshot of http://192.168.0.200:7000 which is the master page?

If this does not work still, could you please upload logs?

Hello, friend:

I checked the network in your way, and the Telnet (192.168.0.201, 192.168.0.203) can be connected through the two nodes (192.168.0.200 7100), which means that the port is not limited, so it is ok, but I am still in

These three nodes (192.168.0.200, 192.168.0.201, 192.168.0.203) were executed above

  • master_addresses 192.168.0.200:7100192168 0.201:7100192168 0.203: \ 7100

  • rpc_bind_addresses 192.168.0.200 \

  • fs_data_dirs “/ home/centos/disk1, / home/centos/disk2” \

  • replication_factor = 3 &
    192.168.0.200 machine node error log:

Log file created at: 2019/08/04 13:48:11
Running on machine: caozhen
Application fingerprint: version 1.3.0.0 build 1 revision a63a4a4413c08275955b170716f3ffff76c0ba15 build_type RELEASE built at 14 Jul 2019 02:31:03 UTC
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I0804 13:48:11.973017 8704 master_main.cc:93] NumCPUs determined to be: 1
I0804 13:48:11.973503 8704 mem_tracker.cc:250] MemTracker: hard memory limit is 0.177691 GB
I0804 13:48:11.973515 8704 mem_tracker.cc:252] MemTracker: soft memory limit is 0.151037 GB
I0804 13:48:11.975070 8704 master_main.cc:114] Initializing master server…
I0804 13:48:11.975306 8704 server_base.cc:438] Could not load existing FS layout: Not found (yb/util/env_posix.cc:1453): /home/centos/disk1/yb-data/master/instance: No such file or directory (error 2)
I0804 13:48:11.975320 8704 server_base.cc:439] Creating new FS layout
I0804 13:48:11.979876 8704 fs_manager.cc:395] Generated new instance metadata in path /home/centos/disk1/yb-data/master/instance:
uuid: “b035f77abea542e2ad70ab6fcc2d7f47”
format_stamp: “Formatted at 2019-08-04 13:48:11 on caozhen”
I0804 13:48:11.984127 8704 fs_manager.cc:395] Generated new instance metadata in path /home/centos/disk2/yb-data/master/instance:
uuid: “b035f77abea542e2ad70ab6fcc2d7f47”
format_stamp: “Formatted at 2019-08-04 13:48:11 on caozhen”
I0804 13:48:11.985364 8704 fs_manager.cc:239] Opened local filesystem: /home/centos/disk1,/home/centos/disk2
uuid: “b035f77abea542e2ad70ab6fcc2d7f47”
format_stamp: “Formatted at 2019-08-04 13:48:11 on caozhen”
I0804 13:48:11.985653 8704 server_base.cc:223] Auto setting FLAGS_num_reactor_threads to 1
I0804 13:48:11.986558 8704 master_main.cc:117] Starting Master server…
I0804 13:48:11.988039 8704 webserver.cc:147] Starting webserver on 0.0.0.0:7000
I0804 13:48:11.988082 8704 webserver.cc:152] Document root: /software/yugabyte-1.3.0.0/www
I0804 13:48:11.988397 8704 webserver.cc:239] Webserver started. Bound to: http://0.0.0.0:7000/
I0804 13:48:11.988589 8704 rpc_server.cc:167] RPC server started. Bound to: 192.168.0.200:7100
I0804 13:48:11.988621 8704 server_base.cc:477] Using private ip address 192.168.0.200
I0804 13:48:11.989104 8717 sys_catalog.cc:260] Creating new SysCatalogTable data
I0804 13:48:11.995273 8717 sys_catalog.cc:310] Determining permanent_uuid for [192.168.0.200:7100]
I0804 13:48:11.997660 8718 server_base.cc:477] Using private ip address 192.168.0.200
I0804 13:48:11.998124 8717 sys_catalog.cc:310] Determining permanent_uuid for [192.168.0.201:7100]
I0804 13:48:11.998572 8712 tcp_stream.cc:292] { local: 192.168.0.200:54819 remote: 192.168.0.201:7100 }: Recv failed: Network error (yb/util/net/socket.cc:590): recvmsg error: Connection refused (error 111)
W0804 13:48:11.998679 8717 consensus_peers.cc:609] Error getting permanent uuid from config peer [192.168.0.201:7100]: Network error (yb/util/net/socket.cc:590): recvmsg error: Connection refused (error 111)
I0804 13:48:12.041188 8717 consensus_peers.cc:622] Retrying to get permanent uuid for remote peer: [192.168.0.201:7100] attempt: 1
W0804 13:48:12.041762 8717 consensus_peers.cc:609] Error getting permanent uuid from config peer [192.168.0.201:7100]: Network error (yb/util/net/socket.cc:590): recvmsg error: Connection refused (error 111)
I0804 13:48:12.112974 8717 consensus_peers.cc:622] Retrying to get permanent uuid for remote peer: [192.168.0.201:7100] attempt: 2
W0804 13:48:12.113616 8717 consensus_peers.cc:609] Error getting permanent uuid from config peer [192.168.0.201:7100]: Network error (yb/util/net/socket.cc:590): recvmsg error: Connection refused (error 111)
I0804 13:48:12.212877 8717 consensus_peers.cc:622] Retrying to get permanent uuid for remote peer: [192.168.0.201:7100] attempt: 3
W0804 13:48:12.213357 8717 consensus_peers.cc:609] Error getting permanent uuid from config peer [192.168.0.201:7100]: Network error (yb/util/net/socket.cc:590): recvmsg error: Connection refused (error 111)
I0804 13:48:12.364890 8717 consensus_peers.cc:622] Retrying to get permanent uuid for remote peer: [192.168.0.201:7100] attempt: 4
W0804 13:48:12.366714 8717 consensus_peers.cc:609] Error getting permanent uuid from config peer [192.168.0.201:7100]: Network error (yb/util/net/socket.cc:590): recvmsg error: Connection refused (error 111)
I0804 13:48:12.651984 8717 consensus_peers.cc:622] Retrying to get permanent uuid for remote peer: [192.168.0.201:7100] attempt: 5
W0804 13:48:12.652726 8717 consensus_peers.cc:609] Error getting permanent uuid from config peer [192.168.0.201:7100]: Network error (yb/util/net/socket.cc:590): recvmsg error: Connection refused (error 111)
I0804 13:48:13.180846 8717 consensus_peers.cc:622] Retrying to get permanent uuid for remote peer: [192.168.0.201:7100] attempt: 6
W0804 13:48:13.181434 8717 consensus_peers.cc:609] Error getting permanent uuid from config peer [192.168.0.201:7100]: Network error (yb/util/net/socket.cc:590): recvmsg error: Connection refused (error 111)

192.168.0.201 machine node error log:

Log file created at: 2019/08/04 13:45:59
Running on machine: caozhen2
Application fingerprint: version 1.3.0.0 build 1 revision a63a4a4413c08275955b170716f3ffff76c0ba15 build_type RELEASE built at 14 Jul 2019 02:31:03 UTC
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I0804 13:45:59.518868 8323 master_main.cc:93] NumCPUs determined to be: 1
I0804 13:45:59.519340 8323 mem_tracker.cc:250] MemTracker: hard memory limit is 0.177691 GB
I0804 13:45:59.519352 8323 mem_tracker.cc:252] MemTracker: soft memory limit is 0.151037 GB
I0804 13:45:59.520879 8323 master_main.cc:114] Initializing master server…
I0804 13:45:59.521857 8323 fs_manager.cc:239] Opened local filesystem: /home/centos/disk1,/home/centos/disk2
uuid: “8f5f328875094a6b9b7e7ca7ee436d12”
format_stamp: “Formatted at 2019-08-04 13:45:49 on caozhen2”
I0804 13:45:59.522068 8323 server_base.cc:223] Auto setting FLAGS_num_reactor_threads to 1
E0804 13:45:59.522922 8323 main_util.cc:22] Network error (yb/util/net/socket.cc:369): Error binding socket to 192.168.0.200:7100: Cannot assign requested address (error 99)
I0804 13:45:59.523097 8323 master.cc:276] Master (stopped) did not start, shutting down all that started…

192.168.0.203 machine node error log:

Log file created at: 2019/08/04 13:46:20
Running on machine: caozhen3
Application fingerprint: version 1.3.0.0 build 1 revision a63a4a4413c08275955b170716f3ffff76c0ba15 build_type RELEASE built at 14 Jul 2019 02:31:03 UTC
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I0804 13:46:20.644186 8665 master_main.cc:93] NumCPUs determined to be: 1
I0804 13:46:20.644618 8665 mem_tracker.cc:250] MemTracker: hard memory limit is 0.177691 GB
I0804 13:46:20.644630 8665 mem_tracker.cc:252] MemTracker: soft memory limit is 0.151037 GB
I0804 13:46:20.646131 8665 master_main.cc:114] Initializing master server…
I0804 13:46:20.646277 8665 server_base.cc:438] Could not load existing FS layout: Not found (yb/util/env_posix.cc:1453): /home/centos/disk1/yb-data/master/instance: No such file or directory (error 2)
I0804 13:46:20.646291 8665 server_base.cc:439] Creating new FS layout
I0804 13:46:20.651819 8665 fs_manager.cc:395] Generated new instance metadata in path /home/centos/disk1/yb-data/master/instance:
uuid: “788d429d80844b65bba757bf9c0337d2”
format_stamp: “Formatted at 2019-08-04 13:46:20 on caozhen3”
I0804 13:46:20.656601 8665 fs_manager.cc:395] Generated new instance metadata in path /home/centos/disk2/yb-data/master/instance:
uuid: “788d429d80844b65bba757bf9c0337d2”
format_stamp: “Formatted at 2019-08-04 13:46:20 on caozhen3”
I0804 13:46:20.658118 8665 fs_manager.cc:239] Opened local filesystem: /home/centos/disk1,/home/centos/disk2
uuid: “788d429d80844b65bba757bf9c0337d2”
format_stamp: “Formatted at 2019-08-04 13:46:20 on caozhen3”
I0804 13:46:20.658428 8665 server_base.cc:223] Auto setting FLAGS_num_reactor_threads to 1
E0804 13:46:20.659356 8665 main_util.cc:22] Network error (yb/util/net/socket.cc:369): Error binding socket to 192.168.0.200:7100: Cannot assign requested address (error 99)
I0804 13:46:20.659503 8665 master.cc:276] Master (stopped) did not start, shutting down all that started…

UI and publish the log:

Hi @caozhentakeshi,

Thanks for posting the details. The issue seems to be here - the master is not starting up on the other two nodes - for some reason it is not able to bind on the ip address and port:

Hi, KARTHIK:
Thank you very much for your letter, in which you mentioned that the primary node did not start the other two nodes - for some reason it could not be bound to the IP address and port. Have you ever encountered such a problem here?

I’d like to ask you how to build a cluster of yudgabtew machines. Can you give me a detailed document, for example, how many node machines should be prepared and what steps should be performed on each machine?

Is there a sequence of execution for each machine? Can I give a document? Thank you very much, my friend.

Hi @caozhentakeshi,

for some reason it could not be bound to the IP address and port. Have you ever encountered such a problem here?

The usual reasons for this are:

  • There may be another process binding to this port. You can check by running:

    $ sudo netstat -anp | grep 7100
    
  • The user you are running as does not have privileges to bind to the desired network interface. You could try to launch a simple webserver (like nginx or flask) on that interface and check if you can bind to that host and port.

As for how to deploy a cluster: