question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting crate.yml parameter network.host prevents Crate of being started

See original GitHub issue

CrateDB version: 4.2.4

Environment description: Intel® Core™ i7-6650U CPU @ 2.20GHz OS: Windows 10 Pro / CentOS 7

Problem description:

Windows

Default Crate config is being used; only crate.yml parameter network.host is explicitly set (refers to local host’s IP address). Attempt to start Crate ends with following error: ERROR: [1] bootstrap checks failed [1]: initial heap size [268435456] not equal to maximum heap size [1073741824]; this can cause resize pauses and prevents mlockall from locking the entire heap

If I add following lines to crate.bat: if "%CRATE_HEAP_SIZE%" == "" ( set CRATE_HEAP_SIZE=2g )

just before the statement:

if NOT "%CRATE_HEAP_SIZE%" == "" ( set CRATE_MIN_MEM=%CRATE_HEAP_SIZE% set CRATE_MAX_MEM=%CRATE_HEAP_SIZE% )

then the problem disappears.

CentOS

By using the same (default) config, and setting crate.yml parameter network.host to local host’s IP address, attempt to start Crate (by the shell command sudo systemctl start crate) is successfull. There is no need to change crate.in.sh file.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mfusseneggercommented, Nov 13, 2020

I think we might want to go the opposite route and change the defaults in the CentOS packages. 512M is rather low.

We need to balance between first use experience which should just work - but also need to ensure that people configure their nodes properly.

This is why CrateDB by default binds itself to localhost where it disables bootstrap checks and allows a “best effort” cluster bootstrapping with other nodes running locally. This allows users to try it easily.

Once the configuration is changed and CrateDB is bound to a public interface, the bootstrap checks are enforced and there needs to be a proper configuration for it to form a cluster. This is to ensure that some settings that absolutely should be changed in production are set up accordingly. The heap size is one of the properties that has a big impact on the performance, so it should always be set.

0reactions
amotlcommented, Nov 13, 2020

Dear Mathias,

thanks a bunch for the elaboration, specifically for all others reading here. Does our documentation reflect these details both well and concise enough? Also as a reference for others, I am referencing [1], [2] and [3] here.

We need to balance between first use experience which should just work - but also need to ensure that people configure their nodes properly.

Sure, this is a very important detail.

After rereading the original post by @ag-rbr

Attempt to start Crate ends with following error.

and trying to start CrateDB on my own behalf by using the ad hoc scripts, I recognize that this is really just a warning message instead of an error. I misinterpreted the issue that the machinery wouldn’t start using crate.bat on Windows at all, so sorry for the noise.

With kind regards, Andreas.

[1] https://crate.io/docs/crate/howtos/en/latest/admin/bootstrap-checks.html [2] https://crate.io/docs/crate/howtos/en/latest/performance/memory.html [3] https://crate.io/docs/crate/reference/en/latest/config/environment.html

P.S.

I think we might want to go the opposite route and change the defaults in the CentOS packages. 512M is rather low.

I had the same impression when finding this. Shall we just go ahead and increase these numbers to 2048M within the sysinit/systemd scripts?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node-specific settings — CrateDB: Reference
With this setting a list of urls can be specified which are allowed to be used if a repository of type url is...
Read more >
docker network create - Docker Documentation
Once connected, the containers can communicate using only another container's IP address or name. For overlay networks or custom plugins that support multi-host...
Read more >
Advanced configuration - GitLab Docs
Get started · Configure your installation ... Host the product documentation · Maintain your installation ... Virtual Box · Configure runners.
Read more >
EC2Launch v2 settings - Amazon Elastic Compute Cloud
Launch and connect to your Windows instance. · From the Start menu, choose All Programs, and then navigate to EC2Launch settings. · On...
Read more >
Troubleshoot Azure IoT Edge common errors - Microsoft Learn
You see the modules that you defined start on the device. ... A networking configuration on the host network is preventing the IoT...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found