I have the following line in my xml code trying to kill a java process.
<sshexec command="kill something" failonerror="false"/>
and I sometimes get this error:
[sshexec] Remote command failed with exit status -1
The process is not killed and therefore when I restart it again I get 2 instances of it not 1.
Could anyone help me with the meaning of the exit status?
Thanks
Non zero exit status usually means that program finished with some error.
https://en.wikipedia.org/wiki/Exit_status
In order to debug this problem you may to login to your remote server and execute your kill command manually to see the error.
Related
I'm using procmon to save logs while running some tests on VM. I'm using python and pytest but I think is irrelevant here.
For every test I'm running to start procmon with:
psexec.exe -accepteula -s -d -i 1 procmon.exe /AcceptEula /Quiet /BackingFile c:\temp\logs.pml
If a test failed, I'm terminating the procmon with:
psexec.exe -accepteula -s -d -i 1 procmon.exe /Terminate
and then I'm saving the snapshot of the VM.
To open the logs.pml to be readable, I'm running after I entered to the VM's snapshot:
procmon.exe \openlog c:\temp\logs.pml
But sometimes I get the error:
the file logs.PML was not closed cleanly during capture and is corrupt.
Error pic in the VM
Why do I get this error? I can see the procmon ran and then terminated by my code (I can enter to the VM and see the test running, executing the procmon, and terminating it).
How do I solve this problem?
Note: it happens sometimes, most of the time it works and creates for me the logs as readable PML files.
note: backend error output: -v: -c: line 0: unexpected EOF while looking for matching `''
-v: -c: line 1: syntax error: unexpected end of file
ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...
This is error i am getting.
Also i have set the fish shell as default shell in WSL.
For WSL1 on windows 10 build later than 1909 (yes wsl2 is available to me but for corporate reasons i cant use it)
Try setting your command to wsl.exe -new_console:d:C:\_stuff\code -cur_console:p5 and the task parameters to /dir "c:/_stuff/code" /icon "c:/_distros/ubuntu/ubuntu1804.exe"
You may need to change the file locations to make the command and parameters suitable for your setup. c:/_stuff/code is where i keep all my repositories and c:/_distros/ubuntu is where i have installed ubuntu.
Currently I am using gsutil rsync command to move files from GCS to AWS . I have got a lot of file in GCS to be moved to AWS. How do I know that all the files are copied without any error,or if any error occurred how do I know that something went wrong. Is there any way to get the response status or response error codes ?
see the documentation
https://cloud.google.com/storage/docs/gsutil/commands/rsync#options
-C option:
If an error occurs, continue to attempt to copy the remaining files. If errors occurred, gsutil's exit status will be non-zero even if this flag is set. This option is implicitly set when running "gsutil -m rsync...". Note: -C only applies to the actual copying operation. If an error occurs while iterating over the files in the local directory (e.g., invalid Unicode file name) gsutil will print an error message and abort.
It means that rsync -m won't stop on error, but the error code will be non zero.
Hope it helps.
I am setting up Solr for Centos 7. When i try to execute any sample project for ex. using ./bin/solr start -e techproducts, its throwing error of 'Exception : org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)' . How to fix this. Java is installed under '/usr/bin/java'
I tried with changing Java home directory path
./bin/solr start -e techproducts
*** [WARN] *** Your Max Processes Limit is currently 31165.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
Solr home directory /tmp/solr-7.7.2/example/techproducts/solr already exists.
Starting up Solr on port 8983 using command:
"bin/solr" start -p 8983 -s "example/techproducts/solr"
*** [WARN] *** Your Max Processes Limit is currently 31165.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
WARNING: Starting Solr as the root user is a security risk and not considered best practice. Exiting.
Please consult the Reference Guide. To override this check, start with argument '-force'
ERROR: Failed to start Solr using command: "bin/solr" start -p 8983 -s "example/techproducts/solr" Exception : org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
Credit for the answer should go to #MatsLindh (see comment above). I'm adding it here for others who may experience the same problem.
The issue is that Solr doesn't want you to run it as a root user - or what it thinks is a root user (I've seen this issue with WSL as well and one isn't running as root).
Using root is a security risk but you can force Solr to start anyways by adding -force to the command, for example:
bin/solr start -e cloud -force
I am trying to set up Metasploitable 3 (VirtualBox) on my Ubuntu 16.04.
I have done everything according to the guidelines of the inventors (https://github.com/rapid7/metasploitable3) when it comes to dependencies etc.
However, when I'm trying to start it (via vagrant up --provision win2k8) I get this nasty little error, that I just can't fix.
It always says:
win2k8: System error 67 has occurred.
win2k8: The network name cannot be found.
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
cmd /q /c "c:\tmp\vagrant-shell.bat"
Stdout from the command:
CMDKEY: Credential added successfully.
Stderr from the command:
System error 67 has occurred.
The network name cannot be found.
I just can't find anything out on the internet. I only "know" it has something to do with network settings. But I don't know what to do now.
I'd appreciate some help!