Autosys - will a job run at scheduled time if it is in Inactive status? - job-scheduling

I am new to Autosys. I have two box in Autosys. Box A and Box B.
Box A is in "Terminated" status and has 3 jobs:
1_cmd - Success
2_FW - Terminated
3_cmd - Inactive
Q.1 - Box A is scheduled to run at 4.00AM. Will Box A run at scheduled time if it is in Terminated status. And will job 3_cmd (in Box A) run if it is in Inactive Status?
Box B (Terminated status) is dependent on Box A. Box B has 4 jobs:
1_FW - Terminated
2_cmd - Inactive
3_FW - Inactive
4_cmd - Inactive
Q.2 - If Box A is completed, will Box B (scheduled at 4.30AM) run even if the jobs are in Inactive status?

Related

PIPE Connection to jenkins timing out

Any help sooner would be greatly appreciated
I am using PIPE to connect to Jenkins pipeline from BB and using the below code in my BB.yml
- step: &functionalTest
name: functional test
image: python:3.9
script:
- pipe: atlassian/jenkins-job-trigger:0.1.1
variables:
JENKINS_URL: '<<myJenkinsURL>>'
JENKINS_USER: '<<myJenkinsUser>>'
JENKINS_TOKEN: $JENKINS_USER_TOKEN
JOB_NAME: '<<myJenkinsJob>>'
WAIT: 'true'
WAIT_MAX_TIMEOUT: 500
It was working fine until last week. However, since Friday I can see number failures in BB pipeline with the timeout. Though the Jenkins job is successful and took only 4 mins and 56 secs to execute all test cases. Also I have WAIT_MAX_TIMEOUT: 500 (almost 8 mins max timeout)
Exception:
✖ Timeout while waiting for jenkins job with build number 254 to be completed
PS: Jenkins job for this build ID is successful in 5 mins (including the Sonar report generation)

SCDF: Restart and resume a composed task

SCDF Composed Task Runner gives us the option to turn on the --increment-instance-enabled. This option creates an artificial run.id parameter, which increments for every run. Therefore the task is unique for Spring Batch and will restart.
The problem with the IdIncrementer is when I mix it with execution without the IdIncrementer. In the event when a task does not finish, I want to resume the Task. The problem I encountered was when the task finishes without the IdIncrementer, I could not start the task again with the IdIncrementer.
I was wondering what would be the best way to restart with the option to resume?
My idea would be to create a new IdResumer, which uses the same run.id as the last execution.
We are run SCDF 2.2.1 on Openshift v3.11.98 and we use CTR 2.1.1.
The steps to reproduce this:
Create a new SCDF Task Definition with the following definition: dummy1:dummy && dummy2: dummy && dummy3: dummy. The dummy app is a docker container, that fails randomly with 50% chance.
Execute the SCDF Task with the --increment-instance-enabled=true and wait for one of the dummy task to fail (restart if needed).
To resume the same failed execution, execute the SCDF Task now --increment-instance-enabled=false. And let it finish successfully (Redo if needed).
Start the SCDF Task again with --increment-instance-enabled=true.
At step 4 the composed task throws the JobInstanceAlreadyCompleteException, even though the --increment-instance-enabled is enabled again.
Caused by:
org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException:
A job instance already exists and is complete for
parameters={-spring.cloud.data.flow.taskappname=composed-task-runner,
-spring.cloud.task.executionid=3190, -spring.datasource.username=testuser, -graph=aaa-stackoverflow-dummy2 && aaa-stackoverflow-dummy3, -spring.cloud.data.flow.platformname=default, -spring.datasource.url=jdbc:postgresql://10.10.10.10:5432/tms_efa?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&currentSchema=dev,
-spring.datasource.driverClassName=org.postgresql.Driver, -spring.datasource.password=pass1234, -spring.cloud.task.name=aaa-stackoverflow, -dataflowServerUri=https://scdf-dev.company.com:443/ , -increment-instance-enabled=true}. If you want to run this job again, change the parameters.
Is there a better way to resume and restart the task?

How to monitor a specific process using metricbeats?

I have the following basic metricbeats config
metricbeat.modules:
- module: system
metricsets:
- cpu
- filesystem
- memory
- network
- process
enabled: true
period: 10s
processes: ['.*']
cpu_ticks: false
Now I want to monitor only a specific process with process id (pid) = 27056.
I know that I have to do some modifications under the "processes" field of the above config file. Can any please help on how to proceed further?
You can monitor the processes which match any of a list of expressions you pass. For example, this reports on all processes running with nginx, java or python in the command line.
processes: ['nginx','java', 'python']

RabbitMQ as Windows service: badarith error on rpc.erl

I am experiencing some problems with RabbitMQ started as a service on Windows.
Operative System: Windows 8 (Microsoft Windows NT version 6.2 Server)
(build 9200)
Erlang: R16B03 (erts-5.10.4)
RabbitMQ: 3.2.2
Goal: create a RabbitMQ cluster with three servers: Srv1, Srv2, Srv3.
Note: I have carefully followed the official documentation
All the following operations are executed as user "Administrator".
FIRST SCENARIO: start RabbitMQ from command line as a background process
I used the command "rabbitmq-server -detached" on Srv1.
Result: a file ".erlang.cookie" is created under C:\Users\Administrator
The execution of the command "rabbimqctl status" is successful and gives me the current state of the node.
I can then copy the file .erlang.cookie in the same folder on Srv2 and Srv3 and successfully create a cluster.
SECOND SCENARIO: start RabbitMQ as a service (this is requirement I have)
Result: the file ".erlang.cookie" is created under C:\Windows.
When I type the command "rabbitmqctl status" another file .erlang.cookie is created under C:\Users\Administrator and I receive the following result:
C:\Program Files\Aspect\DashBoard\RabbitMQ\sbin>rabbitmqctl.bat status
Status of node 'rabbit#RABBITMQ-NODE4' ...
Error: unable to connect to node 'rabbit#RABBITMQ-NODE4': nodedown
DIAGNOSTICS
===========
nodes in question: ['rabbit#RABBITMQ-NODE4']
hosts, their running nodes and ports:
- RABBITMQ-NODE4: [{rabbit,49428},{rabbitmqctl3045334,49434}]
current node details:
- node name: 'rabbitmqctl3045334#rabbitmq-node4'
- home dir: C:\Users\Administrator
- cookie hash: 0DLAKf8pOVrGC016+6BDBw==
We know that this is ok because the two cookies are different.
So I copy the .erlang.cookie file from C:\Windows into C:\Users\Administrator and I try again the same command. This time I get:
C:\Program Files\Aspect\DashBoard\RabbitMQ\sbin>rabbitmqctl.bat status
Status of node 'rabbit#RABBITMQ-NODE4' ...
Error: unable to connect to node 'rabbit#RABBITMQ-NODE4': nodedown
DIAGNOSTICS
===========
nodes in question: ['rabbit#RABBITMQ-NODE4']
hosts, their running nodes and ports:
- RABBITMQ-NODE4: [{rabbitmqctl1178095,49471}]
current node details:
- node name: 'rabbitmqctl1178095#rabbitmq-node4'
- home dir: C:\Users\Administrator
- cookie hash: TIuqp21HOQSoUJT8JfgRQw==
C:\Program Files\Aspect\DashBoard\RabbitMQ\sbin>rabbitmqctl.bat status
Status of node 'rabbit#RABBITMQ-NODE4' ...
Error: {badarith,[{rabbit_vm,bytes,1,[]},
{rabbit_vm,'-mnesia_memory/0-lc$^0/1-0-',1,[]},
{rabbit_vm,mnesia_memory,0,[]},
{rabbit_vm,memory,0,[]},
{rabbit,status,0,[]},
{rpc,'-handle_call_call/6-fun-0-',5,
[{file,"rpc.erl"},{line,205}]}]}
Please notice the Error at the end: "badarith" in rpc.erl, line 205.
I think that the file is Erlang\lib\kernel-2.16.4\src\rpc.erl
The function is this one:
handle_call_call(Mod, Fun, Args, Gleader, To, S) ->
RpcServer = self(),
%% Spawn not to block the rpc server.
{Caller,_} =
erlang:spawn_monitor(
fun () ->
set_group_leader(Gleader),
Reply =
%% in case some sucker rex'es
%% something that throws
case catch apply(Mod, Fun, Args) of
{'EXIT', _} = Exit ->
{badrpc, Exit};
Result ->
Result
end,
RpcServer ! {self(), {reply, Reply}}
end),
{noreply, gb_trees:insert(Caller, To, S)}.
and line 205 is 'case catch apply(Mod, Fun, Args) of'
THIRD SCENARIO: start RabbitMQ as a named user to avoid it to create the file .erlang.cookie under C:\Windows
I set the RabbitMQ service to log on as the user "Administrator", this way it does not create the file under C:\Windows but only under C:\User\Administrator.
Result: when the service starts, the file ".erlang.cookie" is created only under C:\User\Administrator.
When I type the command "rabbitmqctl status" I get the same error as in the provious case (badarith...).
Now the question: I have not found any information about this error (badarith).
Could anyone give me a suggestion about how to troubleshoot/avoid this?

Quartz Scheduler running missing triggers even if misfire instruction is set

I am having trouble with Quartz Scheduler. To be practical here you find my code of unit test:
Scheduler scheduler = new StdSchedulerFactory().getScheduler();
scheduler.getListenerManager().addSchedulerListener(schedulerTestListener);
Trigger trigger = newTrigger()
.withIdentity(CoreTestConstants.TEST_TRIGGER, CoreTestConstants.TEST_TRIGGER_GROUP)
.withSchedule(simpleSchedule()
.withMisfireHandlingInstructionIgnoreMisfires()
.withIntervalInMilliseconds(1000)
.repeatForever())
.forJob(CoreTestConstants.TEST_JOB, CoreTestConstants.TEST_JOB_GROUP)
.build();
scheduler.scheduleJob(getJobDetail(), trigger);
Thread.sleep(20000L);
scheduler.start();
The problem is, when the scheduler.scheduleJob(...) is executed I recognize that the task is not immediately started however when the scheduler.start() is executed I see that the 20 tasks is being executed immediately.
I mean, normally to my mind tasks should not be recorded or start until scheduler.start() is executed. But somehow the quartz system holds the state of tasks even before scheduler.start() is not executed, then when scheduler.start() call the missing task executions is triggered immediately.
Here the log:
09:32:45,005 INFO StdSchedulerFactory:1310 - Quartz scheduler version: 2.1.5
09:32:51,013 INFO SchedulerTest:47 - [test] Scheduler starting..
09:32:51,014 INFO QuartzScheduler:534 - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
*** [TIMER-TEST] 2012-10-10 09:32:51 / Test task is executed. Count: 1 / 1349850771037
*** [TIMER-TEST] 2012-10-10 09:32:51 / Test task is executed. Count: 2 / 1349850771040
*** [TIMER-TEST] 2012-10-10 09:32:51 / Test task is executed. Count: 3 / 1349850771040
*** [TIMER-TEST] 2012-10-10 09:32:51 / Test task is executed. Count: 4 / 1349850771041
*** [TIMER-TEST] 2012-10-10 09:32:51 / Test task is executed. Count: 5 / 1349850771042
*** [TIMER-TEST] 2012-10-10 09:32:51 / Test task is executed. Count: 6 / 1349850771043
*** [TIMER-TEST] 2012-10-10 09:32:51 / Test task is executed. Count: 7 / 1349850771044
As you can see even if I set the trigger to execute with interval in 1 seconds, it executed the missing tasks during thread sleep.
I tried to play around misfire instructions but it doesnt make a sense, it does not change the behaviour of the code in my case.
Any help would be appreciated. Thanks in advance.
OK your problem is with Thread.sleep(20000L); while waiting actually the jobs are triggered and scheduled therefore when start is fired all scheduled jobs are starting, you can put Thread.sleep up to Trigger trigger so that it will begin triggering and scheduling after waiting. Take a look for misfire policy

Resources