I am on Linux VM. I know there is the command condor_submit hello.submit that will submit a job to cluster. However if I want to remove the jobs submitted. Is there a way? I created a user first using the command: sudo adduser user2 then logged in to user2 with command su user2 to then submit a job using the code above. How can I "unsubmit"/remove it?
the condor_rm command is what you are looking for. It takes either the job id that condor_submit printed out, or -a for all jobs, or if you are root, the name of the user whose jobs you want to remove.
Related
I am configuring TWS job in one of our application windows server but when the job triggered it is throwing the below exception. I am using domain user to execute the job.
AWSBDW079E Jobman could not run the job because the system call used to launch the job failed: Jobmon was unable to retrieve user information.
Do I need any special permissions for the user to run the job.
Any help?
On Windows, TWS needs userid and password in order to impersonate the user.
You have to specify the USER object with the appropriate Workstation name, userid and password.
Using Dynamic Agents there are also other options using Executable job types, e.g. you can store the password locally on the agent with the parm utility.
I have figured out the issue. The issue was with the user permissions. The user which is used to run the job on the workstation must have the below permissions.
Allow log on locally
Log on as a batch job
What permissions do I need to assign to a software, which will monitor my RabbitMQ server? The software agent should monitor most of the metrics explained and recommended in this document.
I think I have to create a user, e.g. monitoring and then give this user access to all virtual hosts which contain ressources that should be monitored.
I think when creating the user I have to assign it the tag monitoring which is a predefined tag.
What I do not understand is, what RegEx I need to assign to configure, write and read. The documentation contains a table with the permissions on ressources.
I think a monitoring software should not be able to create or delete ressources (configure permission) nor should it be able to ADD messages to a queue or READ and ACK messages from a queue. But for example it should be able to read the number of messages waiting in a queue to alert if a queue has a number of growing messages which are not retrieved.
Could anybody explain, what permissions and settings are required for such a monitoring user?
Here is a quick guide from the beginning to the end while you are setting up RabbitMQ queues monitoring.
1) Create an account:
rabbitmqctl add_user monitoring password
2) Add monitoring tag (you can read more about RabbitMQ tags here https://www.rabbitmq.com/management.html)
rabbitmqctl set_user_tags monitoring monitoring
3) Now get the names of your virtual hosts:
rabbitmqctl list_vhosts
4) Add permission for monitoring user to virtual host:
rabbitmqctl set_permissions -p Some_Virtual_Host monitoring "" "" ""
5) Check if access is granted successfully:
curl -s -u monitoring:password http://localhost:15672/api/queues | jq
Look at the "messages" parameter
Optional) You can publish a fake message from the command line:
rabbitmqadmin publish --vhost=Some_Virtual_Host exchange=some_exchange routing_key=outgoing_routing_key payload="hello world"
Look at the "messages" again!
Tip: make sure to enable rabbitmq_management plugin in your RabbitMQ build to be able to execute these queries.
Figured that out myself with some testing. If someone is interested:
Create an account with monitoring tag
Add that account to EVERY vhost that should be monitored and add empty strings ("") to configure, write and read permissions.
With a nice bash script you can then for example get the numbers of messages in every queue:
curl -u username:password \
--silent \
http://<ServerOrIP>:15672/api/queues/<vhostname> | jq '.[] | .name, .messages'
What is jq? An explanation is missing from the answers provided above.
The jq command is in the EPEL repository.
https://www.cyberithub.com/how-to-install-jq-json-processor-on-rhel-centos-7-8/
# yum --enablerepo=epel install jq
How to get the password of an existing user in Rabbitmq from CLI?
I got the name of the user by CLI command "sudo rabbitmqctl list_users" and the outupt is as follows:
Listing users ... guest [administrator] openstack []
I want to know the 'openstack' user password.
The user passwords are stored using a one-way hash so there is no way to retrieve their value. You should use the rabbitmqctl change_password command to change that user's password to a known value.
NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.
If you used a deployment solution you might find the password in it's configuration. For example, when you deploy Openstack using kolla-ansible you find the password in /etc/kolla/passwords.yml.
user#deployhost:~$ grep -E ^rabbitmq_password: /etc/kolla/passwords.yml
rabbitmq_password: haH2ZPjVVKmiqoXdRPCYJcdQyzP2cqeU
It might be stored in some secure way, for example an vault if ansible is used for deployment, in this case you need to check the deployment framework on how to retrieve it.
I am running gerrit on dockers successfully until now. The next step I want to achieve is is as follows:
I have a service running and if the the service passes I want to to review the code as +1 and 0 if it fails. But to review code I need a user, for this I need to create a user account once the gerrit instance is launched, then add this user to the reviewer list for that project, then make this user review the code based on whether the service passes or not.
I am able to review the code using the below command:
ssh -p 29418 host_ip gerrit review --code-review +2 commit_id
But I'm not able to create a user and add the user to the list of reviewers for that project. I am not getting any errors but am not able to find out whether the command worked or not as I'm not able to find any new users added. I used the below command:
cat ~/.ssh/id_watcher.pub | ssh -p 29418 host_ip gerrit create-account --ssh-key - watcher
My gerrit instance is LDAP configured. Am I going in the right direction? What am I doing wrong?
I am in need of a script or powershell command that will be able to determine the session id of a specific logged in user on remote machine, to be later used as parameter to the psexec -i execution of remote gui process on that session of that user on the remote machine.
So far i managed to use
psexec \\remoteMachine -u user -p pswrd query session
to get list of sessions on the remote machine:
SESSIONNAME USERNAME ID STATE TYPE DEVICE
console 0 Conn wdcon
rdp-tcp#919 user 1 Active rdpwd
rdp-tcp#916 user 3 Active rdpwd
so i guess i could somehow isolate the needed id and use it - but haven't managed to do that yet
Any ideas?
Maybe other - simpler ways?
Thanks for the help.
As long as you're using PSExec, I would just stick with it. You can get the ID field pretty easily given a username e.g.:
$username = 'joe'
$results = psexec \\remoteMachine -u adminuser -p password query session
$id = $results | Select-String "$username\s+(\w+)" |
Foreach {$_.Matches[0].Groups[1].Value}
psexec \\remoteMachine -u $username -i $id -d notepad.exe
Note that you want to use -d with PSExec otherwise it will wait until the launched program exits.
It's possible to do that without PowerShell.
There is qwinsta command line tool that ships with Windows that you can use.
Example:
c:\>qwinsta
SESSIONNAME USERNAME ID STATE TYPE DEVICE
services 0 Disc
console 1 Conn
>rdp-tcp#0 YourUser 2 Active rdpwd
rdp-tcp 65536 Listen
Usage:
c:\>qwinsta /?
Display information about Remote Desktop Sessions.
QUERY SESSION [sessionname | username | sessionid]
[/SERVER:servername] [/MODE] [/FLOW] [/CONNECT] [/COUNTER] [/VM]
sessionname Identifies the session named sessionname.
username Identifies the session with user username.
sessionid Identifies the session with ID sessionid.
/SERVER:servername The server to be queried (default is current).
/MODE Display current line settings.
/FLOW Display current flow control settings.
/CONNECT Display current connect settings.
/COUNTER Display current Remote Desktop Services counters information.
/VM Display information about sessions within virtual machines.
With the PSTerinalServices powershell module you can get the user sessions and IDs.
The module can be found here: http://code.msdn.microsoft.com/PSTerminalServices
PS > Get-TSSession -UserName user1 -ComputerName pc1 | select UserName,SessionId
UserName SessionId
-------- ---------
User 1