Error: Could not find or load main class org.apache.rocketmq.namesrv.NamesrvStartup - rocketmq

I setup RocketMQ following the guide of Quick Start https://rocketmq.incubator.apache.org/docs/quick-start/ ,run
sh bin/mqnamesrv
the logs shows:
Java HotSpot(TM) Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=320m; support was removed in 8.0
Java HotSpot(TM) Server VM warning: Using the DefNew young collector with the CMS collector is deprecated and will likely be removed in a future release
Java HotSpot(TM) Server VM warning: UseCMSCompactAtFullCollection is deprecated and will likely be removed in a future release.
Error: Could not find or load main class org.apache.rocketmq.namesrv.NamesrvStartup

I come to the same problem, when I use rocketmq-4.0.0.
I unzip the source zip, and run the mqnamesrv
nohup sh bin/mqnamesrv &
the problem occurs...
my solution is following:
compile the source with maven-3.6:
mvn -Prelease-all -DskipTests clean install -U
then cd target/apache-rocketmq-all, I repeat the command:
nohup sh bin/mqnamesrv &
mq runs well.

Related

Unexpected error when starting up the Firestore emulator using the Firebase CLI

I am getting this error when trying to start the firestore emulator using Firebase-Tools on Windows 10 downloaded and installed as instructed at https://firebase.google.com/docs/cli:
> firebase emulators:start --only firestore --debug
[2020-02-11T12:09:51.578Z] ----------------------------------------------------------------------
[2020-02-11T12:09:51.580Z] Command: C:\Users\henri\DOWNLO~1\firebase-tools-instant-win.exe C:\Users\henri\.cache\firebase\tools\lib\node_modules\firebase-tools\lib\bin\firebase emulators:start --only firestore --debug
[2020-02-11T12:09:51.580Z] CLI Version: 7.12.1
[2020-02-11T12:09:51.580Z] Platform: win32
[2020-02-11T12:09:51.580Z] Node Version: v12.13.1
[2020-02-11T12:09:51.581Z] Time: Tue Feb 11 2020 13:09:51 GMT+0100 (GMT+01:00)
[2020-02-11T12:09:51.581Z] ----------------------------------------------------------------------
[2020-02-11T12:09:51.581Z]
[2020-02-11T12:09:51.588Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2020-02-11T12:09:51.588Z] > authorizing via signed-in user
! Could not find config (firebase.json) so using defaults.
i emulators: Starting emulators: firestore
! No Firestore rules file specified in firebase.json, using default rules.
i firestore: Serving ALL traffic (including WebChannel) on http://localhost:8080
! firestore: Support for WebChannel on a separate port (8081) is DEPRECATED and will go away soon. Please use port above instead.
[2020-02-11T12:09:53.617Z] Ignoring unsupported arg: projectId
[2020-02-11T12:09:53.617Z] Ignoring unsupported arg: auto_download
[2020-02-11T12:09:53.617Z] Starting emulator firestore with command {"binary":"java","args":["-Duser.language=en","-jar","C:\\Users\\henri\\.cache\\firebase\\emulators\\cloud-firestore-emulator-v1.10.2.jar","--host","localhost","--port",8080,"--webchannel_port",8081],"optionalArgs":["port","webchannel_port","host","rules","functions_emulator"],"joinArgs":false}
i firestore: Emulator logging to firestore-debug.log
[2020-02-11T12:09:53.634Z] Error: EPERM: operation not permitted, open 'C:\Windows\system32\firestore-debug.log'
Error: An unexpected error has occurred.
Error: EPERM: operation not permitted, open 'C:\Windows\system32\firestore-debug.log
Should this file even be written to system32...? The latest stable version of java, nodejs and npm are installed:
C:\Users\henri>java --version
java 11.0.6 2020-01-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.6+8-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.6+8-LTS, mixed mode)
C:\Users\henri>npm --version
6.13.4
C:\Users\henri>node
Welcome to Node.js v12.15.0.
Type ".help" for more information.
>

Elasticsearch 7.3 upgrade with homebrew

I was using Elasticsearch 6.8 via homebrew, and I was trying to upgrade to 7.3. Previously, on 6.8 I already got a warning about a log file that did not exist, but the server would still run - so I did nothing.
Now with 7.3, I get an error and the server won’t run:
Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
output:
[0.002s][error][logging] Error opening log file 'logs/gc.log': No such file or directory
[0.002s][error][logging] Initialization of output 'file=logs/gc.log' using options 'filecount=32,filesize=64m' failed.
error:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:111)
at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:79)
at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:57)
at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:89)
I tried creating the dir/file where elasticsearch was installed, but that did not work for me (or i did something wrong).
Reference: https://onecompiler.com/questions/3uwszcf3x/homebrew-installed-elasticsearch-failing-to-start
I have fixed this by changing the relative logs/gc.log path to an absolute path. Follow the below steps to solve the issue
Open jvm.options file which is located at /usr/local/etc/elasticsearch/jvm.options
Change the relative path to an absolute path
from the following
# JDK 9+ GC logging
9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m
to
# JDK 9+ GC logging
9-:-Xlog:gc*,gc+age=trace,safepoint:file=/usr/local/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m
Restart elasticsearch $ brew services restart elasticsearch-full or just start it without daemon - $ elasticsearch

grunt serve - returns -> org/jruby/RubyFile.java: No such process

I built a test project with yo angular.
When I run grunt serve -v, using jruby 1.7.18 on Windows 7, compass fails with the following error
Running "concurrent:server" (concurrent) task
[D] Task source: test\node_modules\grunt-concurrent\tasks\concurrent.js
Verifying property concurrent.server exists in config...OK
Files: [no src] -> server
Options: limit=2
Warning: Errno::ESRCH on line ["941"] of org/jruby/RubyFile.java: No such process - test/.tmp/styles/main.css
Diving into the grunt code, it seems that the problem is related to the way jruby instantiate the compass process on Windows 7, but I can't figure out exactly how is done...
If I run the same command using Windows 7+jruby 1.7.15 or OS X+jruby 1.7.18 everything goes fine.
My setup is:
Windows 7 SP1
Java SE (build 1.8.0_25-b18) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
jruby 1.7.18 (1.9.3p551)
npm 2.1.18
grunt-cli v0.1.13
grunt v0.4.5

Aptana version 3.4.2.201308081805 crash

I have Aptana version 3.4.2.201308081805 on Linux Mint 15 64bit
was open just once and now anytime when I want to start the Aptana crash
here is the one from a few crash log:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0x7) at pc=0x00007fab6e08a938, pid=4403, tid=140373276522240
#
# JRE version: 7.0_25-b30
# Java VM: OpenJDK 64-Bit Server VM (23.7-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libzip.so+0x4938] Java_java_util_zip_ZipFile_getZipMessage+0x8d8
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-7/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Don't use OpenJDK
Use Java 7 from the wbupd8 repository
sudo apt-add-repository ppa:webupd8team/java
Prerequirements
sudo apt-get install software-properties-common
If you got problems with SWT take a look at
Eclipse cannot load SWT libraries
I managed to fix this issue by removing openjdk and installing oracle jdk.
The step by step instruction is provided in the following article
http://www.wikihow.com/Install-Oracle-Java-on-Ubuntu-Linux
so far no crash in aptana.
FYI: I am using lubuntu

maven error when running in cygwin?

I have cygwin in Windows 7 and downloaded and installed maven "binaries" and have the following set
export JAVA_HOME=/cygdrive/c/java/jdk1.7.0_11
export MAVEN_HOME=/usr/apache-maven-3.0.5
export M2_HOME=/home/MyUser/.m2
export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH
$ which java
/cygdrive/c/java/jdk1.7.0_11/bin/java
$ java -version
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
$ which mvn
/usr/apache-maven-3.0.5/bin/mvn
$ mvn -version
Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
I've looked at Maven error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher but it did not address my issue.
What did I miss?
Maven with Cygwin - Error: JAVA_HOME is not defined correctly
The "alias mvn=mvn.bat" answer toward the bottom of above post worked for me. However, is this THE solution?
I spent a couple of hours fruitlessly fiddling with different combinations of JAVA_HOME, M2_HOME and M2 after this same problem. Finally I set down to debugging the mvn script (by changing line 1 to read "#!/bin/sh -x"). It occurs because the script is relying on shell globbing to get the correct version of the .jar file (at approx. line 157):
CLASSPATH="${M2_HOME}/boot/plexus-classworlds-*.jar"
the * is not being expanded, for some reason globbing is disabled;
Hence the command the script attempts to execute is:
'/cygdrive/c/Program Files/Java/jdk1.7.0_40/bin/java' -classpath 'D:\apps\apache-maven-3.0.4\boot\plexus-classworlds-*.jar' '-Dclassworlds.conf=D:\apps\apache-maven-3.0.4\bin\m2.conf' '-Dmaven.home=D:\apps\apache-maven-3.0.4' org.codehaus.plexus.classworlds.launcher.Launcher -version
when it should be:
'/cygdrive/c/Program Files/Java/jdk1.7.0_40/bin/java' -classpath 'D:\apps\apache-maven-3.0.4\boot\plexus-classworlds-2.4.jar' '-Dclassworlds.conf=D:\apps\apache-maven-3.0.4\bin\m2.conf' '-Dmaven.home=D:\apps\apache-maven-3.0.4' org.codehaus.plexus.classworlds.launcher.Launcher -version
Solution: Edit the "mvn" script and change line 157 to read:
CLASSPATH="$(echo ${M2_HOME}/boot/plexus-classworlds-*.jar)"
change the JAVA_HOME path in .bashrc_profile file

Resources