Skip to main content
Stephbat
Gold ⭐️
July 21, 2020
Solved

Upgrading HDP 3.1.0 to 3.1.4 : Cannot restart datanode

I'm facing an issue during the upgrade of HDP 3.1.0.0-78 to 3.1.4.0-315 on Ubuntu 18

The upgrade process is not able to restart the datanodes.

I get the error java.lang.RuntimeException: Cannot start datanode because the configured max locked memory size (dfs.datanode.max.locked.memory) of 2147483648 bytes is more than the datanode's available RLIMIT_MEMLOCK ulimit of 16777216 bytes.

I don't understand why this error happens. The datanodes were well started before the starting of the upgrade process and the system setting RLIMIT_MEMLOCK hasn't been changed.

Thanks in advance for your help

 

 

Stephbat
StephbatAnswer
Gold ⭐️
July 24, 2020

I was able to restart to the datanode from the Ambari UI after a restart of the ambari-agent on the servers where the datanode run

6 replies

Shelton
Gold ⭐️⭐️⭐️
July 21, 2020

@Stephbat 

Please can you check those 2 values dfs.datanode.max.locked.memory and ulimit

 

The dfs.datanode.max.locked.memory determines the maximum amount of memory a DataNode will use for caching. The "locked-in-memory size" corresponds to ulimit (ulimit -l) of the DataNode user that needs to be increased to match this parameter.
The current dfs.datanode.max.locked.memory is 2 GB and while the RLIMIT_MEMLOCK is 16 MB

If you get the error “Cannot start datanode because the configured max locked memory size… is more than the datanode’s available RLIMIT_MEMLOCK ulimit,” that means that the operating system is imposing a lower limit on the amount of memory that you can lock than what you have configured. To fix this, you must adjust the ulimit -l value that the DataNode runs with.

 

Usually, this value is configured in /etc/security/limits.conf. However, it will vary depending on what operating system and distribution you are using please adjust the values accordingly remember that you will need space in memory for other things as well, such as the DataNode and application JVM heaps and the operating system page cache.

 

Once adjust the datanode should start as a charm 🙂 

Hope that helps 

Translate
Stephbat
StephbatAuthor
Gold ⭐️
July 21, 2020

Thanks for this reply,

but I don't understand why the datanode started correctly before the upgrade process and failed during the upgrade process without any change on the OS limit RLIMIT_MEMLOCK

Translate
Shelton
Gold ⭐️⭐️⭐️
July 21, 2020

@Stephbat 

Those are internals to Cloudera and that confirms myth migration/upgrades are never smooth we still need humans 🙂 Please do those changes and let me know if your datanodes fires up correctly.

Translate