Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run on debian #123

Closed
haodiao opened this issue Sep 4, 2020 · 14 comments
Closed

Cannot run on debian #123

haodiao opened this issue Sep 4, 2020 · 14 comments
Labels
good first issue Good for newcomers

Comments

@haodiao
Copy link

haodiao commented Sep 4, 2020

Compilation is completed on debian, run error

@git-hulk
Copy link
Member

git-hulk commented Sep 4, 2020

@haodiao what's your GCC version? can you paste the error log?

@haodiao
Copy link
Author

haodiao commented Sep 4, 2020

Debian9 and debian10 have the same error

[root@debian ~/kvrocks]#  ./src/kvrocks -c kvrocks.conf
Version: 1.1.28 @8e8fa5ca
E0904 15:56:45.020162 26024 main.cc:305] Failed to open: IO error: No such file or directoryWhile opening a file for sequentially reading: /tmp/kvrocks/db/CURRENT: No such file or directory

@git-hulk
Copy link
Member

git-hulk commented Sep 4, 2020

@haodiao try rm /tmp/kvrocks/ and restart the kvrocks

@haodiao
Copy link
Author

haodiao commented Sep 5, 2020

@git-hulk the problem still exists

@git-hulk
Copy link
Member

git-hulk commented Sep 5, 2020

It seems that something was gone wrong when creating the DB files in /tmp dir in your OS. Try another DB dir in config file: https://github.com/bitleak/kvrocks/blob/master/kvrocks.conf#L70

@haodiao
Copy link
Author

haodiao commented Sep 5, 2020

I suggest you answer after testing

@git-hulk
Copy link
Member

git-hulk commented Sep 5, 2020

@haodiao I can't reproduce the issue with clean Debian 9, Please check your db dir status.

root@40c67bdc33b6:~/kvrocks# ./src/kvrocks -c kvrocks.conf
Version: 1.1.28 @8e8fa5ca

@haodiao
Copy link
Author

haodiao commented Sep 5, 2020

root@debian:~/kvrocks# make test
cd src && make test
make[1]: Entering directory '/root/kvrocks/src'
    CC server.o
    LINK unittest
./unittest
[==========] Running 82 tests from 20 test cases.
[----------] Global test environment set-up.
[----------] 1 test from InternalKey
[ RUN      ] InternalKey.EncodeAndDecode
[       OK ] InternalKey.EncodeAndDecode (1 ms)
[----------] 1 test from InternalKey (1 ms total)

[----------] 1 test from Metadata
[ RUN      ] Metadata.EncodeAndDeocde
[       OK ] Metadata.EncodeAndDeocde (0 ms)
[----------] 1 test from Metadata (0 ms total)

[----------] 2 tests from RedisTypeTest
[ RUN      ] RedisTypeTest.GetMetadata
Failed to open the storage, encounter error: IO error: No such file or directoryWhile opening a file for sequentially reading: testsdb/CURRENT: No such file or directory
Makefile:125: recipe for target 'test' failed
make[1]: [test] Segmentation fault (ignored)
make[1]: Leaving directory '/root/kvrocks/src'
root@debian:~/kvrocks#

@guoanwu
Copy link

guoanwu commented Sep 29, 2020

see the similar issue on the "4.18.16-300.fc29.x86_64", build is successfully but when run it will fail to open the CURRENT file.
gcc version: gcc version 8.3.1 20190223 (Red Hat 8.3.1-2) (GCC)

@guoanwu
Copy link

guoanwu commented Sep 29, 2020

you can first check the external rocksdb folder to see if you can run the benchmark like:
taskset -c 0-23,48-71 ./db_bench --benchmarks=fillrandom,stats,levelstats --enable_write_thread_adaptive_yield=false --disable_auto_compactions=false --max_background_compactions=8 --max_background_flushes=4 --value_size=64 --key_size=16 --db=/mnt/pmem0/sst --wal_dir=/mnt/pmem0/wal --enable_pipelined_write=true --allow_concurrent_memtable_write=true --batch_size=1 --histogram=true --use_direct_io_for_flush_and_compaction=true --use_direct_reads=true --target_file_size_base=67108864 --disable_wal=false --sync=true --writes=3000000 --num=60000000 --threads=20 --report_interval_seconds=5

If you can run, then the issue can be solved.

In my enviornment, i missed the snappy-devel folder and the rocksdb library is not build with the snappy, you run the rocksdb benchmark with the same command will see:
Initializing RocksDB Options from the specified file
Initializing RocksDB Options from command-line flags
open error: Invalid argument: Compression type Snappy is not linked with the binary.

So just confirm you can run db_bench successful.

@git-hulk git-hulk added the good first issue Good for newcomers label Nov 11, 2020
@hsnamed
Copy link

hsnamed commented Feb 17, 2021

I've the same issue and didnt find a chance to solve it on Debian 10.
db_bench - unable to find it in external folder.
gcc version 8.3.0 (Debian 8.3.0-6)

@git-hulk
Copy link
Member

@hsnamed db_bench was the tool in the RocksDB, NOT in kvrocks

@hellower
Copy link

hellower commented Jun 1, 2021

cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/

gcc --version
gcc (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

apt-get install gcc g++ make libsnappy-dev autoconf automake libtool libgtest-dev
cd /usr/local/src
git clone --recursive https://github.com/bitleak/kvrocks.git
cd kvrocks
make -j4

cd /usr/local/src/kvrocks/kvrocks
src/kvrocks -c kvrocks.conf
Version: 999.999.999 @368e561f
...

I am testing kvrocks on debian10 and there is no problem at all.

@git-hulk
Copy link
Member

git-hulk commented Jun 6, 2022

Fixed by #620

@git-hulk git-hulk closed this as completed Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants