Error when starting Cassandra prevents launching - cassandra

I am trying to run Cassandra. But, I am getting this error:
[root#SudeepMangu bin]# ./cassandra -f
xss = -ea -javaagent:/home/sudeep/apache-cassandra-1.2.5-src/lib/jamm-0.2.5.jar-
XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms930M -Xmx930M -Xmn200M -
XX:+HeapDumpOnOutOfMemoryError -Xss160k
Error occurred during initialization of VM Could not reserve enough space for object heap
I have tried setting JAVA_OPTS to max size with no effect.

See my answer here, https://stackoverflow.com/a/14447535/92463 which describes increasing the stack segment size. Edit the conf/cassandra-env.sh configuration script, at around line 185, and change the -Xss180k to a higher value.
if [ "`uname`" = "Linux" ] ; then
# reduce the per-thread stack size to minimize the impact of Thrift
# thread-per-client. (Best practice is for client connections to
# be pooled anyway.) Only do so on Linux where it is known to be
# supported.
# u34 and greater need 180k
JVM_OPTS="$JVM_OPTS -Xss180k"
fi
echo "xss = $JVM_OPTS"
I suggest testing values starting from -Xss200k and increasing in 20k increments. I have found that using -Xss280k on Ubuntu servers worked successfully.

Probably it's because of the 32bits java version. I changed my JAVA_HOME variable to the 64bits version by following this steps:
1) Hited both "Windows + R" keys and entered: sysdm.cpl
2) On the "System Properties" I pressed the 'Environment variables' button
3) In the textarea "Environment variables" I picked JAVA_HOME and clicked 'Edit'
4.a) In the "Variable Value" I took out the path
(it looks like this: C:\Program Files (x86)\Java\jdk1.8.0_192)
4.b) I Entered the 64bits path instead
it looks like this now: C:\Program Files\Java\jdk1.8.0_73
And that was it. Then I justed watched the cassandra server scipts running through...
And the heap memory problem is gone!

There is not enough space for cassandra. You have to change a value inside cassandra-env.sh file
open the cassandra-env.sh file
sudo vi cassandra-env.sh
In the document you will see JVM_OPTS="$JVM_OPTS -Xss180k"
Increase the chunk size between 250 to 300

Set stack size of 256K in cassandra-env.sh.

Related

Amend boot cmdline in custom image build

I'm building a custom image that uses the meta-intel layer (I'm targeting Intel boards, such as the Minnowboard Turbot, for instance), and I want to tweak the options for booting.
First problem
As far as I understand, meta-intel uses systemd-boot (via rmc-boot) as EFI_PROVIDER.
So I should be able to override the specific BOOT_TIMEOUT parameter by setting :
SYSTEMD_BOOT_TIMEOUT := "0"
in my custom image, as far as I can see in this file
Unfortunately, that doesn't work (the boot timeout is still 4 seconds). How come ?
Second problem
As well, I would like to append options to the boot.conf file (in /boot/loader/entries, loaded by /boot/loader/loader.conf), such as quiet, or vt.global_cursor_default=0 for instance.
I see in the Intel machine conf that there is an APPEND configuration, but overriding it or appending to it in my custom image doesn't work (it's still not written in the boot.conf file) :
APPEND += "quiet vt.global_cursor_default=0"
I've checked that the configuration is correctly read and it's the case :
$ bitbake my-custom-image -e | grep ^APPEND= -A1 -B1
# " quiet rootwait console=ttyS0,115200 console=tty0${#bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " ro", "", d)}"
APPEND=" quiet vt.global_cursor_default=0 rootwait console=ttyS0,115200 console=tty0"
#
But no matter what I do, the command line doesn't change on the built image.
What do I miss ? There should be a relatively easy way to achieve what I'm after I guess, but so far I have not managed to do it.
Thanks a lot !
I have been looking at the kernel command line parameters for intel platform in Yocto with the meta-intel.
I have noticed differences between the wic and hddimg yocto images.
The hddimg seems to use the rmc boot entry definition whereas the wic image uses the boot entry defined in the wks kickstart.
My machine conf has the following :
WKS_FILE ?= "${#bb.utils.contains_any("EFI_PROVIDER", "systemd-boot rmc-boot", "systemd-bootdisk.wks", "mkefidisk.wks", d)}"
In turns systemd-bootdisk.wks has the following boot entry "boot" :
bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0"
The RMC definition for my Minnowboard Max has 2 entry a boot and an install.
Minnow Max B3 boot
Minnow Max B3 install
I am using the pyro release for Yocto. Perhaps integration of RMC boot definition has been integrated into the wic images.
I am looking for a common place to add the kernel command line parameter. Any idea ?

Oracle 11gR2 Installation on Oracle linux 7 - Prerequisite condition failed for OS kernel parameter “semmni”

while Installing oracle 11gr2 on oracle Linux 7. The prerequisite condition to test whether the OS kernel parameter "semmni" is failed with below error.
Please find the screenshot of it.
Below is the kernel parameters which are configured in the etc/sysctl.conf file.
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
#semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 256000 100 1024
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
Any idea why it is failing?
You are missing the kernel.semmni=128.
Read the requirements here.
https://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm#BHCGJCEA
I recommend you to install all requirements at once using the preinstall package. Find the link here:
https://blogs.oracle.com/linux/oracle-rdbms-server-11gr2-pre-install-rpm-for-oracle-linux-6-has-been-released
I just have the same problem. I checked my /proc/sys/kernel/sem and the values are exactly as its been mentioned in the Oracle document.
Plus, despite having all the packages, its still showing me FAILED when it check the packages.
It is fixable, you could just click the Fix button and execute the specified script to fix it.

How to change boot partition for Beaglebone Black after flashing Debian 8.4 to eMMC?

I'm trying to get the current Debian 8.4 SD card image onto my Beaglebone Black's eMMC. The flashing itself worked flawlessly by enabling (uncommenting) this line in the /boot/uEnv.txt file:
cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
Flashing completed successfully with blinking LED's as described in the HowTo. Next, I connected a serial-USB cable to the J1 connector in order to see the boot process in Putty's serial console. The system starts to boot but then stops with an error message:
Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
[line above repeats multiple times]
Begin: Running /scripts/local-block ... done.
done.
Gave up waiting for root device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/mmcblk1p1 does not exist. Dropping to a shell!
I then get an (initramfs) prompt. From there, I figured out that mmcblk1p1 is not the right partition, it should be mmcblk0p1 instead. I think this is because of a different enumeration when the SD card is removed.
Now the big question: How and where can I set the partition the system starts from? It must be defined somewhere. I can mount the root partition mmcblk0p1 and edit files from the prompt, so I hope that there's just a small config file I need to tweak. Do I need to add something to the /boot/uEnv.txt file? (I already commented out the flasher script after flashing, of course).
Thanks for your help!
It should be as easy as editing uEnv.txt.
There should be a line containing: root=/dev/mmcblk1p1 - just edit that to say /dev/mmcblk0p1.
The current version of the flasher script (Dec 2019) changes the boot designation to eMMC automagically upon successful completion of the flash.

QEMU simple backend tracing dosen't print anything

I'm doing get simple trace file from QEMU.
I followed instructions docs/tracing.txt
with this command "qemu-system-x86_64 -m 2G -trace events=/tmp/events ../qemu/test.img"
i'd like to get just simple trace file.
i've got trace-pid file, however, it dosen't have anything in it.
Build with the 'simple' trace backend:
./configure --enable-trace-backends=simple
make
Create a file with the events you want to trace:
echo bdrv_aio_readv > /tmp/events
echo bdrv_aio_writev >> /tmp/events
Run the virtual machine to produce a trace file:
qemu -trace events=/tmp/events ... # your normal QEMU invocation
Pretty-print the binary trace file:
./scripts/simpletrace.py trace-events trace-* # Override * with QEMU
i followd this instructions.
please somebody give me some advise for this situation.
THANKS!
I got same problem by following the same document.
https://fossies.org/linux/qemu/docs/tracing.txt
got nothing because
bdrv_aio_readv and bdrv_aio_writev was not enabled by default, at least the version I complied, was not enabled. you need to open trace-events under source directory, looking for some line without disabled, e.g. I using:
echo "load_file" > /tmp/events
Then start qemu,
after a guest started, I run
./scripts/simpletrace.py trace-events trace-Pid
I got
load_file 1474.156 pid=5249 name=kvmvapic.bin path=qemu-2.8.0-rc0/pc-bios/kvmvapic.bin
load_file 22437.571 pid=5249 name=vgabios-stdvga.bin path=qemu-2.8.0-rc0/pc-bios/vgabios-stdvga.bin
load_file 10034.465 pid=5249 name=efi-e1000.rom
you can also add -monitor stdio to qemu command line, after it started, you can the following command in qemu CLI:
(qemu) info trace-events
load_file : state 1
vm_state_notify : state 1
balloon_event : state 0
cpu_out : state 0
cpu_in : state 0
1 means enabled events.
Modify the trace-events file in the source tree
As of v2.9.0 you also have to remove the disable from the lines you want to enable there, e.g.:
-disable exec_tb(void *tb, uintptr_t pc) "tb:%p pc=0x%"PRIxPTR
+exec_tb(void *tb, uintptr_t pc) "tb:%p pc=0x%"PRIxPTR
and recompile.
Here is a minimal fully automated runnable example that boots Linux and produces traces: https://github.com/cirosantilli/linux-kernel-module-cheat
For example, I used the traces to count how many boot instructions Linux has: https://github.com/cirosantilli/linux-kernel-module-cheat/blob/c7bbc6029af7f4fab0a23a380d1607df0b2a3701/count-boot-instructions.md
I have a lightly patched QEMU as a submodule, the key commit is: https://github.com/cirosantilli/qemu/commit/e583d175e4cdfb12b4812a259e45c679743b32ad

Problem on obfuscating j2me applications in Netbeans 6.8

When I'm trying to package a midlet with obfuscation, the following is displayed on the output window:
pre-init:
pre-load-properties:
exists.config.active:
exists.netbeans.user:
exists.user.properties.file:
load-properties:
exists.platform.active:
exists.platform.configuration:
exists.platform.profile:
basic-init:
cldc-pre-init:
cldc-init:
cdc-init:
ricoh-pre-init:
ricoh-init:
semc-pre-init:
semc-init:
savaje-pre-init:
savaje-init:
sjmc-pre-init:
sjmc-init:
cdc-hi-pre-init:
cdc-hi-init:
nokiaS80-pre-init:
nokiaS80-init:
nsicom-pre-init:
nsicom-init:
post-init:
init:
conditional-clean-init:
conditional-clean:
deps-jar:
pre-preprocess:
do-preprocess:
Pre-processing 0 file(s) into C:\Meljean's Files\NetBeansProjects\SampleApp\build\preprocessed directory.
post-preprocess:
preprocess:
pre-compile:
extract-libs:
Expanding: C:\Meljean's Files\LWUIT_1_4\lib\LWUIT.jar into C:\Meljean's Files\NetBeansProjects\SampleApp\build\compiled
do-compile:
post-compile:
compile:
pre-obfuscate:
proguard-init:
skip-obfuscation:
proguard:
Error: Expecting class path separator ';' before 's' in argument number 4
C:\Meljean's Files\NetBeansProjects\SampleApp\nbproject\build-impl.xml:427: Obfuscation failed with error code 1.
BUILD FAILED (total time: 0 seconds)
What am I going to do?
Problem might be in the WTK's installation dir.
Lets confirm this:
I guess you are using WIN SYSTEM
I guess your WTK is installed at the path where space comes inbetween.
like for ex : c:\program files\ [space between program & files]
I would suggest you to install WTK on non space dir like c:\WTK
Let me know if this is not the case.

Resources