You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java -jar sonar-cnes-report-4.1.2.jar -t "xxxxx" -p project_name in the terminal and everything goes well
I try to run this command through a bash script that basically run a for of a list of project_names and technically the script finishes but no report is being generated.
I thought that maybe because while running a script it runs the java -jar multiple times one execution step the other and fails so I made a logic that saves the PID of the java running the sonar-cnes-report. jar and with a while I check when the PID is no longer there basically while [ -n $PID] with this I can see that each execution of the jar is starting after the one before finishes, yet no report is being generated, I run the java command in a multiple combination of nohup, as background with &, with a > /dev/null with a 2>&1 I do not find a way of making the reports get generated.
I end up even creating a second script where I run the java command with nothing and then calling with nohup and background the script it self so the execution of the java command is detached of the first script nothing works.
I suspect that the java command runs as a process to connect to sonar (that is running locally) and then a second process actually generates the report so am I not waiting for that? yet I do a sleep 10 after the PID dissapear and nothing.
Is this a behavior of java or the sonar-cnes-report not being able to work as a background script or to work being executed from a script or maybe I'm having some dumb thing with users and permissions?.
In the nohup.out I am not getting the last line saying that the report was SUCCEDED to be generated, but the lines before are the same as for the stdout of the command in the terminal executed directly.
Please complete the following information.
OS: Centos 7
Project version: 4.1.2
The text was updated successfully, but these errors were encountered:
I run the command
java -jar sonar-cnes-report-4.1.2.jar -t "xxxxx" -p project_name in the terminal and everything goes well
I try to run this command through a bash script that basically run a for of a list of project_names and technically the script finishes but no report is being generated.
I thought that maybe because while running a script it runs the java -jar multiple times one execution step the other and fails so I made a logic that saves the PID of the java running the sonar-cnes-report. jar and with a while I check when the PID is no longer there basically while [ -n $PID] with this I can see that each execution of the jar is starting after the one before finishes, yet no report is being generated, I run the java command in a multiple combination of nohup, as background with &, with a > /dev/null with a 2>&1 I do not find a way of making the reports get generated.
I end up even creating a second script where I run the java command with nothing and then calling with nohup and background the script it self so the execution of the java command is detached of the first script nothing works.
I suspect that the java command runs as a process to connect to sonar (that is running locally) and then a second process actually generates the report so am I not waiting for that? yet I do a sleep 10 after the PID dissapear and nothing.
Is this a behavior of java or the sonar-cnes-report not being able to work as a background script or to work being executed from a script or maybe I'm having some dumb thing with users and permissions?.
In the nohup.out I am not getting the last line saying that the report was SUCCEDED to be generated, but the lines before are the same as for the stdout of the command in the terminal executed directly.
The text was updated successfully, but these errors were encountered: