Reason: because my cluster is centos7 system, according to the data on the Internet, the buffer/cache caching mechanism of centos7 will continue to increase the number of buffers, which will occupy the memory and reduce the available memory of the program. As a result, the Java garbage collection mechanism recycles the yarnchild process, resulting in the failure to find the main class
solution: store the cache data in memory to disk, and then release the memory manually
It is found on the Internet that:
execute the sync command several times, and then execute it in turn:
echo 1 & gt/ proc/sys/vm/drop_ caches
echo 2 >/proc/sys/vm/drop_ caches
echo 3 >/proc/sys/vm/drop_ caches
However, when running the following statement to clear the cache, an error of permission denied is reported: – bash/proc/sys/VM/drop_ caches: Permission denied
sudo echo 1 >/proc/sys/vm/drop_ caches
sudo echo 2 >/proc/sys/vm/drop_ caches
sudo echo 3 >/proc/sys/vm/drop_ caches
sync
Bash refused to do so because of the redirection symbol “& gt;” It’s also bash’s order. Sudo only allows echo command to have root authority,
but not “& gt;” The command also has root permission, so bash will think that the command has no permission to write information.
resolvent:
“SH – C” command, which allows bash to execute a string as a complete command
sudo sh -c “echo 1 >/proc/sys/vm/drop_ caches”
sudo sh -c “echo 2 >/proc/sys/vm/drop_ caches”
sudo sh -c “echo 3 >/proc/sys/vm/drop_ caches”
Or
echo 1 | sudo TEE/proc/sys/VM/drop_ caches
Read More:
- Problems encountered after Maven installation or upgrade: could not find or load main class org.codehaus.plexus .class…..
- Error: Could not find or load main class ***
- Could not find or load main class
- Error: could not find or load main class
- The Java command could not find or load the main class
- Error: Could not find or load main class org.apache.hadoop.hbase.util.HBaseConfTool
- Idea error: unable to find or load the main class
- Java error: unable to find or load the main class
- Tomcat9 Error: Could not find or load main class org.apache.catalina.startup.Bootstrap
- Hive view execution plan
- Execution failed for task ‘:app:mergeDebugResources’.
- Group by operator of hive execution plan
- Execution failed for task ‘:app:stripDebugDebugSymbols‘.
- Error:Execution failed for task ‘:app:transformClassesWithDexForDebug’
- Execution failed for task ‘:app:processDebugManifest’
- Execution failed for task ‘:app:processDebugManifest’.
- Execution failed for task ‘:app:installDebug’.
- To solve the execution failed for task ‘: app:transformDexArchiveWithDexMergerForDebug ‘
- Error:Execution failed for task’:app:processDebugResources’. Personally resolved
- Failed: execution error, return code 1 from org.apache.hadoop . hive.ql.exec .DDLTask…