Have a 4 node deployment, have configured master on 3 nodes and tablet servers on all 4, YCQL is working but cannot use ysqlsh am getting the following error:
ysqlsh: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
tserver log files have nothing about the error, postgres is running, as follows:
Hi @salil,
Did you have an older version of YB and then upgrade/install a newer version? We’ve had a backward incompatible change in our recent version for YSQL and the error you’re seeing above is a typical symptom when you upgrade.
If this is a fresh install (and not an upgrade), then you can try this to debug:
Update postgresql.conf file located in $data_dir/disk-1/pg_data/postgresql.conf and add the line log_statement='all' . Please do this on the node you’re connecting to with ysqlsh .
Restart tserver on that node
Run ./bin/ysqlsh and check any errors in $data_dir/disk-1/yb-data/tserver/logs/postgresql*.log
Thanks @neha. I was using the flagfile option for yb-tserver, but was not giving the full path of the file. So postgres was complaining about tsserver.conf not found. I restarted tserver with full path and now I am getting a different error:
ysqlsh: could not connect to server: Connection refused
Is the server running on host “localhost” (::1) and accepting
TCP/IP connections on port 5433?
FATAL: Not found: Error loading table with oid 1260 in database with oid 1: The object does not exist: table_id: “000000010000300080000000000004ec”
Cluster setup is fine but unable to connect the sever through client. Getting below errors when connecting from psql client.
psql: error: connection to server at “192.168.56.12”, port 5433 failed: FATAL: Not found: Error loading table with oid 1260 in database with oid 1: The object does not exist: table_id: “000000010000300080000000000004ec”
Corrosponing postgreSQl log file error
2022-01-05 13:24:48.364 UTC [3363] FATAL: Not found: Error loading table with oid 1260 in database with oid 1: The object does not exist: table_id: “000000010000300080000000000004ec”
Also I am not able to find ysqlsh.
It is not there in my tar ball. I am using the latest one yugabyte-1.2.6.0.
root@sachin-VirtualBox1:~/yugabyte-1.2.6.0# ls -ltr bin
total 32288
lrwxrwxrwx 1 sachin yugabyte 20 Apr 21 2019 psql → …/postgres/bin/psql
-rwxrwxr-x 1 sachin yugabyte 3692392 Jan 5 09:30 yb_load_test_tool
-rwxrwxr-x 1 sachin yugabyte 3376192 Jan 5 09:30 yb-tserver
-rwxrwxr-x 1 sachin yugabyte 1829936 Jan 5 09:30 log-dump
-rwxrwxr-x 1 sachin yugabyte 2744384 Jan 5 09:30 yb-master
-rwxr-xr-x 1 sachin yugabyte 3808 Jan 5 09:30 post_install.sh
-rwxr-xr-x 1 sachin yugabyte 9093 Jan 5 09:30 yb-prof.py
-rwxr-xr-x 1 sachin yugabyte 2327 Jan 5 09:30 bulk_load_cleanup.sh
-rwxr-xr-x 1 sachin yugabyte 2468464 Jan 5 09:30 redis-cli
-rwxr-xr-x 1 sachin yugabyte 1516 Jan 5 09:30 configure
-rwxrwxr-x 1 sachin yugabyte 5594088 Jan 5 09:30 yb-admin
-rwxr-xr-x 1 sachin yugabyte 178257 Jan 5 09:30 pprof
-rwxr-xr-x 1 sachin yugabyte 4056 Jan 5 09:30 bulk_load_helper.sh
-rwxr-xr-x 1 sachin yugabyte 1141216 Jan 5 09:30 patchelf
-rwxrwxr-x 1 sachin yugabyte 2905848 Jan 5 09:30 yb-ysck
-rwxr-xr-x 1 sachin yugabyte 97735 Jan 5 09:30 cqlsh.py
-rwxrwxr-x 1 sachin yugabyte 260920 Jan 5 09:30 yb-pbc-dump
-rwxrwxr-x 1 sachin yugabyte 21096 Jan 5 09:30 sst_dump
-rwxr-xr-x 1 sachin yugabyte 1353 Jan 5 09:30 cqlsh
-rwxrwxr-x 1 sachin yugabyte 785704 Jan 5 09:30 yb-generate_partitions_main
-rwxrwxr-x 1 sachin yugabyte 3307352 Jan 5 09:30 yb-ts-cli
-rwxr-xr-x 1 sachin yugabyte 52027 Jan 5 09:30 yb-ctl
-rwxrwxr-x 1 sachin yugabyte 4544840 Jan 5 09:30 yb-bulk_load
Thanks Alex, I realized that I have downloaded the wrong version . Not sure from where I came across this version. Maybe I picked it from some blog accidently. I have now installed the latest version and is all good now. Thanks !!