Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the error report when kafka starts

Shulou Source: shulou.com Published: 2022-06-01 15:08:41 09月30日 Update

This article mainly explains how to solve the kafka startup error report. Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "kafka startup error report how to solve" it!

Java HotSpot (TM) 64-Bit Server VM warning: INFO: os::commit_memory (0x00000000c0130000, 986513408, 0) failed; error='Cannot allocate memory' (errno=12)

It is said that there is not enough memory, so there is no way to do it. After consulting the students, you can learn that the default memory of kafka is 1g, and then the vim is 100m directly. Specifically:

Under {$KAFKA_HOME} / bin, directly

Vim kafka-server-start.sh

Then change the export KAFKA_HEAP_OPTS= "- Xmx1G-Xms1G" in it

For export KAFKA_HEAP_OPTS= "- Xmx100m-Xms100m"

Look at the picture:

#! / bin/bash# Licensed to the Apache Software Foundation (ASF) under one or more# contributor license agreements. See the NOTICE file distributed with# this work for additional information regarding copyright ownership.# The ASF licenses this file to You under the Apache License, Version 2. (the "License"); you may not use this file except in compliance with# the License. You may obtain a copy of the License at## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "ASIS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.if [$#-lt 1] Then echo "USAGE: $0 [- daemon] server.properties" exit 1fibaseballs dirt $(dirname $0) export KAFKA_LOG4J_OPTS= "- Dlog4j.configuration=file:$base_dir/../config/log4j.properties" export KAFKA_HEAP_OPTS= "- Xmx100m-Xms100m" EXTRA_ARGS= "- name kafkaServer-loggc" COMMAND=$1case $COMMAND in-daemon) EXTRA_ARGS= "- daemon" $EXTRA_ARGS shift; *) Esacexec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka $@ so far, I believe you have a deeper understanding of "how to solve the kafka startup error". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Memory content learning practicality deeper interest method classmate practicality reality that is simple operation method more friends website say process problem channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple macOS Huawei Microsoft NVidia