pid - 808 just quit unexpectedly, please check logs under /opt/logs/100003171 and /tmp for more information![enter image description here][1]
lsLinHaiZhao ~/Desktop/apollo/apollo-configservice/target/apollo-configservice-2.0.0-SNAPSHOT-github/scripts (master)
$ sh startup.sh
mkdir: cannot create directory ‘/opt’: Permission denied
Windows new JAVA_HOME is: /c/PROGRA~1/Java/JDK18~1.0_4
2022年02月22日 16:18:17 ==== Starting ====
LOG_FOLDER /opt/logs/100003171/ does not exist. Falling back to /tmp
Started [808]
Waiting for server startup.
pid - 808 just quit unexpectedly, please check logs under /opt/logs/100003171 and /tmp for more information!
lsLinHaiZhao ~/Desktop/apollo/apollo-configservice/target/apollo-configservice-2.0.0-SNAPSHOT-github/scripts (master)
$
1.Database password cannot be used: special characters can be used to modify the database password!
2.If the database is not started, the same error will be reported. Restart the database!
3.Not here Configure the contents of relevant databases in the properties file or YML file, and comment out the unnecessary or redundant configuration information, and restart it!
There are three possible mistakes, each of which can lead to the above mistakes. Carefully examine your own problems. Using these three solutions can solve your problems!!!
Related
I am trying to use a tool that, in two steps, analyzes code smells for android.
In the first step, the tool parses an apk and generates within a directory .db files that should then be converted to CSV files in the next step; however, whenever I try to run the second step, the console returns the following error:
java.io.IOException: Unable to create directory path [/User/Desktop/db2/logs] for Neo4j store.
I think it is a Neo4J configuration problem.
I am currently running the tool with the following Java configuration:
echo $JAVA_HOME
/home/User/openlogic-openjdk-11.0.15
update-alternatives --config java
* 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
To be safe, I also started Neo4J, which returned the following output
sudo systemctl status neo4j.service
neo4j.service - Neo4j Graph Database
Loaded: loaded (/lib/systemd/system/neo4j.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-07-06 20:11:04 CEST; 16min ago
Main PID: 1040 (java)
Tasks: 57 (limit: 18901)
Memory: 705.4M
CPU: 16.639s
CGroup: /system.slice/neo4j.service
└─1040 /usr/bin/java -cp "/var/lib/neo4j/plugins:/etc/neo4j:/usr/share/neo4j/lib/*:/var/lib/neo4j/plugins/*" -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExper>.
How can I solve this?
You posted this error:
java.io.IOException: Unable to create directory path [/User/Desktop/db2/logs] for Neo4j store.
From that error, it looks like:
Neo4j was installed at "/User/Desktop/db2"
The permissions for that directory do not have "write" permission
I tried to reproduce this locally using Neo4j Community 4.4.5, following the steps below.
I do see an IOException related to "logs", but it's slightly different from what you posted. Perhaps we're on different versions of Neo4j.
Open terminal into install directory: cd neo4j
Verify "neo4j" is stopped: ./bin/neo4j stop
Rename existing "logs" directory: mv logs logs.save
Remove write permission for the Neo4j install: chmod u-w .
Start neo4j in console mode: ./bin/neo4j console
Observe errors in console output
2022-07-08 03:28:38.081+0000 INFO Starting...
ERROR StatusLogger Unable to create file [****************************]/neo4j/logs/debug.log
java.io.IOException: Could not create directory [****************************]/neo4j/logs
...
To fix things, try:
Get a terminal into your Neo4j directory:
cd /User/Desktop/db2
Set write permissions for the entire directory tree:
chmod u+w -R .
Start neo4j in console mode:
./bin/neo4j console
If this works and you're able to run neo4j fine, it points to an issue with user permissions when running neo4j as a system service.
The best steps from there depend on the system, your access, how comfortable you are making changes, probably other things. An easy, brute-force hammer would be to manually create each directory you discover (such as "/User/Desktop/db2/logs") and grant premissions to all users (chmod ugo+w .), then try re-running the service, see what errors pop up. Repeat that until you're able to run the service without errors.
I wonder why my spring project with tomcat server got catalina.out file with size 40GB. Any solutions, please.catalina.out reach 40 GB
catalina.out reaches such a large size because:
1- there might be many logging messages sent to console handler, and
2- also there is not any rotation of catalina.out (and no policy to remove older catalina.out).
First, as there might be some duplication and the messages in catalina.out , which could also be stored in *log messages too, I'd check if the contents of the log files (catalina.[DATE].log) are the same as those of catalina.out, if so then you can edit file conf/logging.properties and remove console handler
I'd also check the level of the log messages and set a higher level if possible. Look for this line in conf/logging.properties
java.util.logging.ConsoleHandler.level = ....
Possible levels, in increasing level of frequency are SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST or ALL. I'd try replace ALL, FINEST, FINER, FINE by CONFIG or even INFO. For instance, by setting it to INFO, all SEVERE, WARNING and INFO messages will be logged but not any with a level to the right of that list.
Also another option is set a limit to console handler by adding this line to conf/logging.properties
java.util.logging.ConsoleHandler.limit = 1024000
and rotate catalina.out configuring an automatic task to remove older ones.
if you are linux user to handle this from system is pretty easy you can configure logrotation with logrotate this is very easy
Step : 1 (Create Logrotate file)
root#c2dapp01-usea1e# vim /etc/logrotate.d/tomcat
Step : Add rotation instruction for linux log rotator
/opt/tomcat/latest/logs/catalina.out {
copytruncate
daily
rotate 7
compress
missingok
size 100M
}
Step : 3 Add cron job to run daily in crond.daily or create custom cron (This file is by default there if not then only create)
root#c2dapp01-usea1e:# vim /etc/cron.daily/logrotate
# Clean non existent log file entries from status file
cd /var/lib/logrotate
test -e status || touch status
head -1 status > status.clean
sed 's/"//g' status | while read logfile date
do
[ -e "$logfile" ] && echo "\"$logfile\" $date"
done >> status.clean
mv status.clean status
test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf
This script can be run manually.
/usr/sbin/logrotate /etc/logrotate.conf
Most probably the huge size of logs is due to the DEBUG mode setting of log4j. Change this setting to WARN and the size of logging will be reduced.
This is quite common to see catalina.out file expanding.
this could be used to clear the log of catalina.out file without stopping tomcat with the command below.
sudo cat /dev/null > /opt/tomcat/apache-tomcat-9.0.37/logs/catalina.out
To keep catalina.out smaller in size, either one of the following ways can be used:
You could use the above Linux command and add it to a CronScheduler
to run daily/ weekly/ monthly or yearly as preferred.
Use logrotate tool in Linux. It is a log managing command-line tool
in Linux. This can rotate the log files under different conditions.
Particularly, we can rotate log files on a fixed duration or if the
file has grown to a certain size. You can click here for more
info on this.
I want to enable jmx on a java process to connect it with Visual VM.
I have placed following jvm parameters at startup:
# JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
# JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT"
# JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.password.file=$JMXREMORT_PASSWORD"
# JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
I have been told that jmxremote.password file should have 600 as file permission set to it. But the issue is that deployment is done via admin user and run user is part of same group as admin. So giving 600 implies that run user is not able to access the file.
I tried changing permission to 660 but it didn't help and i got this error:
"Error: Password file read access must be restricted"
Any suggestion?
The jmxremote.password has to have owner set to the same as the user/service which started the java runtime (it can be checked in the services under "Log On As"). So make sure you set the access and the password's before you change the permissions.
Note: The access and password file should not have permissions given to any other user/service. It should only contain the owner. Otherwise you will get an error saying Read access must be restricted
I have a pentaho job which runs successfully in pentaho but if i try to run the same through command line i get the error
Kitchen can't continue because the job could not be loaded.
D:\data-integration>kitchen.bat /file:D:\PENTAHO\pentahojobsNtrans_1\jobs\vws_sync_job_2.kjb /level:Basic
DEBUG: Using JAVA_HOME
DEBUG: _PENTAHO_JAVA_HOME=C:\Program Files\Java\jre7
DEBUG: _PENTAHO_JAVA=C:\Program Files\Java\jre7\bin\java.exe
2014/08/25 12:44:33 - Kitchen - Logging is at level : Basic logging
2014/08/25 12:44:33 - Kitchen - Start of run.
ERROR: Kitchen can't continue because the job couldn't be loaded.
What is that i am doing wrong?
please help
The most common mistake that the begginers do (I am included) is to use "\" to give the path of the transformation or the job. Replace it by "/".
I get the same error on Windows (maybe de same solution works on Linux) because I have spaces on file names. If it is your case, protect the entire path of file directory with quotation marks.
For example:
"C:\Program Files\Pentaho Data Integration - Kettle 6.1.0.1\kitchen.bat" /file:"C:/Users/Username/Documents/Pentaho Projects/Job - System Integration.kjb" /level:Basic
Another important thing is to follow the instruction given by a_horse_with_no_name (funny username by the way) using slash.
Avoid the backslash instruction as given in the kitchen documentation (http://wiki.pentaho.com/display/EAI/Kitchen+User+Documentation) on its example: kitchen.bat /file:D:\Jobs\updateWarehouse.kjb /level:Basic
I'm trying to make a rollback due a deploy failed, my server code is on java, and also i'm using App Engine Eclipse PlugIn for. my appcfg.sh file is located at /Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.5/appengine-java-sdk-1.7.5/bin/appcfg.sh
but i get "Command not Found" when i try this sudo /Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.5/appengine-java-sdk-1.7.5/bin/appcfg.sh rollback /Documents/workspace/server_side/war
I can't realize what's wrong. i don`t know if is the right appcfg, because there is appcfg.cmd and appcfg.sh, i'm using an imac(Unix enviro) so i use the appcfg.sh to made the rollback. i've tried in several different ways. and nothing good happen. maybe i'm missing something.
thanks!
It does not have execute permission by default:
-rw-r--r-- 1 yorkw staff 558 11 Dec 06:01 appcfg.sh
Run chmod 755 appcfg.sh to change the permission:
-rwxr-xr-x 1 yorkw staff 558 11 Dec 06:01 appcfg.sh
Then you should be able to run it in terminal.
I also encountered the same problem as the original poster of this question, but I still got a permission denied error when attempting to rollback, even after changing the permissions of the appcfg.sh file.
It turned out I also needed to chmod 755 run_java.sh (located in the same directory as appcfg.sh), and then I was able to rollback without problems.
I thought I would post this in case anyone encountered the same set of issues that I did.
For anyone else who stumbles upon this and wants more detail...
In Terminal go to GAE-SDK-PATH/bin (where appcfg.sh is located) for instance:
/Applications/Eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.8.3/appengine-java-sdk-1.8.3/bin
You may not have enabled permissions with appcfg.sh, so do what #yorkw suggested if you are getting 'Permission Denied', in the bin directory type:
chmod 755 appcfg.sh
then to rollback type
./appcfg.sh --email=PROJECT_EMAIL --passin rollback ROOT_PROJECT_FOLDER/war
You will be prompted to enter the password for the project email, and then it should work!
Google doc: https://developers.google.com/appengine/docs/java/tools/uploadinganapp
Maybe you made the same silly oversight as me and left out "sh" at the beginning?
i.e.
sh /Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.5/appengine-java-sdk-1.7.5/bin/appcfg.sh rollback /Documents/workspace/server_side/war
Use the following commands on OSX. Note the appcfg.sh doesn't have execute permission by default so you need to add it via chmod.
cd /Users/Labuser/Downloads/appengine-java-sdk-1.9.22/bin
chmod 755 appcfg.sh
sh appcfg.sh rollback /Users/Labuser/Ducuments/AndroidWS/AndroidStudioProjects/AndroidProject/modulebackend/src/main/webapp/