yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
9.04k stars 1.08k forks source link

[yugabyted] Create a local single node, restart and find that the node status is abnormal #24955

Open duge996 opened 1 week ago

duge996 commented 1 week ago

Jira Link: DB-14092

Description

./bin/yugabyted start --advertise_address=127.0.0.1 --base_dir=/opt/raid0/boost/yugabyte/data
./bin/yugabyted  status  --base_dir=/opt/raid0/boost/yugabyte/data

+----------------------------------------------------------------------------------------------------------+ | yugabyted | +----------------------------------------------------------------------------------------------------------+ | Status : Running. | | Replication Factor : 1 | | YugabyteDB UI : http://127.0.0.1:15433 | | JDBC : jdbc:postgresql://127.0.0.1:5433/yugabyte?user=yugabyte&password=yugabyte | | YSQL : bin/ysqlsh -U yugabyte -d yugabyte | | YCQL : bin/ycqlsh -u cassandra | | Data Dir : /opt/raid0/boost/yugabyte/data/data | | Log Dir : /opt/raid0/boost/yugabyte/data/logs | | Universe UUID : 6588695d-5eca-4041-bb50-16472aff6622 | +----------------------------------------------------------------------------------------------------------+

./bin/yugabyted  stop --base_dir=/opt/raid0/boost/yugabyte/data 
./bin/yugabyted start --advertise_address=127.0.0.1 --base_dir=/opt/raid0/boost/yugabyte/data
./bin/yugabyted  status  --base_dir=/opt/raid0/boost/yugabyte/data

+----------------------------------------------------------------------------------------------------------+ | yugabyted | +----------------------------------------------------------------------------------------------------------+ | Status : | | Replication Factor : None | | YugabyteDB UI : http://127.0.0.1:15433 | | JDBC : jdbc:postgresql://127.0.0.1:5433/yugabyte?user=yugabyte&password=yugabyte | | YSQL : bin/ysqlsh -U yugabyte -d yugabyte | | YCQL : bin/ycqlsh -u cassandra | | Data Dir : /opt/raid0/boost/yugabyte/data/data | | Log Dir : /opt/raid0/boost/yugabyte/data/logs | | Universe UUID : 7f424bd6-4887-4cc0-aa75-7d4f48a22fb4 | +----------------------------------------------------------------------------------------------------------+

cat data/logs/yugabyted.log

[yugabyted start] 2024-11-18 18:42:13,985 INFO: | 0.0s | master started running with PID 48032. [yugabyted start] 2024-11-18 18:42:13,986 INFO: | 0.0s | Node was a member of some cluster before. Skipping master setup [yugabyted start] 2024-11-18 18:42:13,986 INFO: | 0.0s | Got full master addrs list: [u'127.0.0.1:7100'] [yugabyted start] 2024-11-18 18:42:13,986 INFO: | 0.0s | Old master flag is: [u'--tserver_master_addrs=127.0.0.1:7100'] and new master flag is: --tserver_master_addrs=127.0.0.1:7100 [yugabyted start] 2024-11-18 18:42:13,986 INFO: | 0.0s | About to start tserver with cmd /opt/raid0/boost/yugabyte/bin/yb-tserver --stop_on_parent_termination --undefok=stop_on_parent_termination --fs_data_dirs=/op t/raid0/boost/yugabyte/data/data --webserver_interface=127.0.0.1 --metrics_snapshotter_tserver_metrics_whitelist=handler_latency_yb_tserver_TabletServerService_Read_count,handler_latency_yb_tserver_TabletServerServi ce_Write_count,handler_latency_yb_tserver_TabletServerService_Read_sum,handler_latency_yb_tserver_TabletServerService_Write_sum,disk_usage,cpu_usage,node_up --yb_num_shards_per_tserver=1 --ysql_num_shards_per_tserve r=1 --placement_cloud=cloud1 --placement_region=datacenter1 --placement_zone=rack1 --rpc_bind_addresses=127.0.0.1:9100 --server_broadcast_addresses=127.0.0.1:9100 --cql_proxy_bind_address=127.0.0.1:9042 --server_dum p_info_path=/opt/raid0/boost/yugabyte/data/data/tserver-info --start_pgsql_proxy --pgsql_proxy_bind_address=127.0.0.1:5433 --tserver_enable_metrics_snapshotter=true --metrics_snapshotter_interval_ms=11000 --webserve r_port=9000 --default_memory_limit_to_ram_ratio=0.6 --instance_uuid_override=54809ebb62d94756a6cebc0e479fcfd5 --start_redis_proxy=false --placement_uuid=fda16925-e4df-405f-8564-780977bdf83f --tserver_master_addrs=12 7.0.0.1:7100 [yugabyted start] 2024-11-18 18:42:13,989 INFO: | 0.0s | tserver started running with PID 48033. [yugabyted start] 2024-11-18 18:42:13,989 INFO: | 0.0s | Node was a member of some cluster before. Skipping tserver setup [yugabyted start] 2024-11-18 18:42:14,071 INFO: | 0.1s | Found directory /opt/raid0/boost/yugabyte/bin for file yugabyted-ui [yugabyted start] 2024-11-18 18:42:14,072 INFO: | 0.1s | About to start yugabyted-ui with cmd /opt/raid0/boost/yugabyte/bin/yugabyted-ui -database_host=127.0.0.1 -master_ui_port=7000 -tserver_ui_port=9000 -warnings =ntp/chrony|transparent_hugepages|insecure [yugabyted start] 2024-11-18 18:42:14,075 INFO: | 0.1s | yugabyted-ui started running with PID 48117. [yugabyted start] 2024-11-18 18:42:14,177 INFO: | 0.2s | Master address list updated, new list: [yugabyted start] 2024-11-18 18:42:14,225 INFO: | 0.3s | run_process: cmd: [u'/opt/raid0/boost/yugabyte/bin/yb-admin', u'--master_addresses', u'', u'get_universe_config'] [yugabyted start] 2024-11-18 18:42:14,301 INFO: | 0.3s | run_process returned 1: OUT >>

<< ERR >> Illegal state (yb/client/client-internal.cc:2596): Unable to establish connection to leader master at []. Please verify the addresses and check if server is up, or if you're missing --certs_dir_name.

: Could not locate the leader master: Unable to determine master addresses

<< [yugabyted start] 2024-11-18 18:42:14,379 INFO: | 0.4s | thread-uml: current masters [u''] [yugabyted start] 2024-11-18 18:42:14,380 INFO: | 0.4s | thread-uml: Unable to query for all masters list, keeping masters list: [u''] [yugabyted start] 2024-11-18 18:42:14,794 INFO: | 0.8s | Callhome failed: HTTP Error 405: Method Not Allowed [yugabyted start] 2024-11-18 18:42:14,799 INFO: | 0.8s | Callhome failed: HTTP Error 405: Method Not Allowed [yugabyted start] 2024-11-18 18:43:14,417 INFO: | 60.5s | thread-uml: current masters [u''] [yugabyted start] 2024-11-18 18:43:14,418 INFO: | 60.5s | thread-uml: Unable to query for all masters list, keeping masters list: [u''] [yugabyted start] 2024-11-18 18:43:15,290 INFO: | 61.3s | Callhome failed: HTTP Error 405: Method Not Allowed

Warning: Please confirm that this issue does not contain any sensitive information

duge996 commented 1 week ago

Modify, "current_masters": "127.0.0.1:7100", for "current_masters": "0.0.0.0:7100",调整, "current_masters": "127.0.0.1:7100", 为了 "current_masters": "0.0.0.0:7100",

/opt/raid0/boost/yugabyte/data/conf/yugabyted.conf