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 start clickhouse server #45429

Open
iulianroman opened this issue Jan 19, 2023 · 4 comments
Open

Cannot start clickhouse server #45429

iulianroman opened this issue Jan 19, 2023 · 4 comments
Labels
question Question?

Comments

@iulianroman
Copy link

I have a clickhouse setup which is using zookeeper for data replication. One of the nodes experienced some storage issues and after restart clickhouse server does not start.
In the error log i have the following message:

Application: DB::ErrnoException: Allocator: Cannot realloc from 16.00 MiB to 0.00 B., errno: 2, strerror: No such file or directory: Cannot attach table graphite.data from metadata file /clickhouse/data/metadata/graphite/data.sql from query ATTACH TABLE data (Path String, Value Float64, Time UInt32, Date Date, Timestamp UInt32) ENGINE = ReplicatedGraphiteMergeTree('/clickhouse/tables/smart/graphite.data', '{replica}', Date, (Path, Time), 8192, 'graphite_rollup')

Any idea how can it be fixed ?

@tavplubix tavplubix added the question Question? label Jan 19, 2023
@cangyin
Copy link
Contributor

cangyin commented Jan 19, 2023

Can you possibly post the full stack trace ?

@iulianroman
Copy link
Author

Can you possibly post the full stack trace ?

  1. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int) @ 0x102e0d8c in /usr/bin/clickhouse
  2. DB::ErrnoException::ErrnoException(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int, int, std::__1::optional<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > const&) @ 0x8f31b77 in /usr/bin/clickhouse
  3. DB::throwFromErrno(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int, int) @ 0x8f3155e in /usr/bin/clickhouse
  4. Allocator<false, false>::realloc(void*, unsigned long, unsigned long, unsigned long) @ 0x8f6a26c in /usr/bin/clickhouse
  5. DB::DataTypeString::deserializeBinary(DB::IColumn&, DB::ReadBuffer&) const @ 0xcdcf47c in /usr/bin/clickhouse
  6. DB::IMergeTreeDataPart::loadIndex() @ 0xd70ef39 in /usr/bin/clickhouse
  7. DB::IMergeTreeDataPart::loadColumnsChecksumsIndexes(bool, bool) @ 0xd70f0d9 in /usr/bin/clickhouse
  8. ? @ 0xd73f982 in /usr/bin/clickhouse
  9. ThreadPoolImpl::worker(std::__1::__list_iterator<ThreadFromGlobalPool, void*>) @ 0x8f51c4b in /usr/bin/clickhouse
  10. ThreadFromGlobalPool::ThreadFromGlobalPool<void ThreadPoolImpl::scheduleImpl(std::__1::function<void ()>, int, std::__1::optional)::'lambda1'()>(void&&, void ThreadPoolImpl::scheduleImpl(std::__1::function<void ()>, int, std::__1::optional)::'lambda1'()&&...)::'lambda'()::operator()() const @ 0x8f528c4 in /usr/bin/clickhouse
  11. ThreadPoolImplstd::__1::thread::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x8f50b4b in /usr/bin/clickhouse
  12. ? @ 0x8f4f00f in /usr/bin/clickhouse
  13. start_thread @ 0x76db in /lib/x86_64-linux-gnu/libpthread-2.27.so
  14. __clone @ 0x121a3f in /lib/x86_64-linux-gnu/libc-2.27.so
    (version 20.3.4.10 (official build))
    2023.01.19 13:05:11.386159 [ 2292 ] {} Application: DB::ErrnoException: Allocator: Cannot realloc from 16.00 MiB to 0.00 B., errno: 2, strerror: No such file or directory: Cannot attach table graphite.data from metadata file /clickhouse/data/metadata/graphite/data.sql from query ATTACH TABLE data (Path String, Value Float64, Time UInt32, Date Date, Timestamp UInt32) ENGINE = ReplicatedGraphiteMergeTree('/clickhouse/tables/smart/graphite.data', '{replica}', Date, (Path, Time), 8192, 'graphite_rollup')

@cangyin
Copy link
Contributor

cangyin commented Jan 19, 2023

From the stack trace, file "primary.idx" in some data parts may be missing or is lost.

@iulianroman
Copy link
Author

From the stack trace, file "primary.idx" in some data parts may be missing or is lost.

Any idea how can I repair that ? I could even start with an empty db because i hope it will be replicated from the other systems in the cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question?
Projects
None yet
Development

No branches or pull requests

3 participants