With the following ansible:
- name: Reload changes in configuration and restart docker service
systemd:
name: docker
enabled: true
daemon_reload: true
state: restarted
register: command_output
- name: Print to console
debug:
msg: "{{command_output.stdout}}"
I see the following error:
fatal: [xxxxxx]: FAILED! => {"changed": false, "msg": "Unable to start
service docker: Job for docker.service failed because the control
process exited with error code.\nSee "systemctl status
docker.service" and "journalctl -xe" for details.\n"}
This is of course a very useful error message when on the command line, but in ansible, not so much. My attempt at capturing the error output and dispalying it in debug has not been very fruitful. So the question is:
How can I get more details about the reason why ansible.systemd failed in this case?
Should I try to invoke journalctl -xe or systemctl status docker.service manually, or is there some other more ansible friendly way?
Whatever ansible module capture is already there stderr or stdout return values.. If you want to get more details of the error, you can try Block and Rescue ... Block and Resuce Documentation
block:
- name: Reload changes in configuration and restart docker service
systemd:
name: docker
enabled: true
daemon_reload: true
state: restarted
register: command_output
- name: Print to console
debug:
msg: "{{command_output.stdout}}"
rescue:
- name: get errors
shell: journalctl -xe # or systemctl status docker.service
register: err_msg
- name: Print error message to console
debug:
msg: "{{ err_msg.stdout }}"
First Case: On Local Eclipse
Issue: While running test cases on Karate, I am getting below error where
Feature file as below:
Background:
* configure driver = { type: 'chrome', start: false, showDriverLog: true }
Scenario: Verify
Given driver 'https://www.google.com/'
And input('input[name=q]', 'karate-dsl')
Console error as below:
15:14:30.630 [main] ERROR com.intuit.karate - karate.org.apache.http.conn.HttpHostConnectException: Connect to localhost:9222 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused), http call failed after 4 milliseconds for url: http://localhost:9222/json
15:14:32.636 [main] DEBUG com.intuit.karate - request:
1 > GET http://localhost:9222/json
1 > Host: localhost:9222
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.13 (Java/1.8.0_321)
1 > Accept-Encoding: gzip,deflate
15:14:32.638 [main] ERROR com.intuit.karate - karate.org.apache.http.conn.HttpHostConnectException: Connect to localhost:9222 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused), http call failed after 3 milliseconds for url: http://localhost:9222/json
15:14:32.640 [main] ERROR com.intuit.karate - driver config / start failed: http call failed after 3 milliseconds for url: http://localhost:9222/json, options: {type=chrome, start=false, showDriverLog=true, target=null}
com.intuit.karate.KarateException: http call failed after 3 milliseconds for url: http://localhost:9222/json
If we make a change in driver config as below as it is hitting the native chrome. It starts to work fine,
configure driver = { type: 'chrome', start: true, showDriverLog: true }
Second Case: On Docker Image, "https://hub.docker.com/r/ptrthomas/karate-chrome", if driver config change as below:
configure driver = { type: 'chrome', start: true, showDriverLog: true }
Getting the same above error on docker image.
Is it supposed to config differently for local and docker image or I am missing something. Can some one please help ?
I am unable to run the kotlin-server generated by Swagger Codegen v. 3.
The .yaml file is:
openapi: 3.0.0
info:
title: Experiement with Swagger
description: Test
version: 1.0.0
servers:
- url: 'http://localhost:8080'
description: production server's url
tags:
- name: Test
description: Test
externalDocs:
description: Find out more
url: 'http://localhost:8080'
paths:
/testURI:
post:
tags:
- Test
summary: Test
description: Test
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Test'
responses:
'200':
description: Test success
content:
application/json:
schema:
$ref: '#/components/schemas/TestSuccessResponse'
'404':
description: >-
Only a signed in user can add a question. This response means that
the user isn't signed in.
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorisedErrorResponse'
'500':
description: >-
means some internal error occur on the server while doing the
operation. The state of the operation if un-determined and the
operation could be succesful, failed or partially successful
(because some database operations are not rolled back if error
occurs!
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorResponse'
components:
schemas:
Test:
type: object
properties:
some-input:
type: string
TestSuccessResponse:
type: object
properties:
result:
type: string
enum:
- success
additional-info:
type: string
enum:
- Test successful
required:
- result
- additional-info
UnauthorisedErrorResponse:
type: object
properties:
result:
type: string
enum:
- error
additional-info:
type: string
enum:
- Not authorised
required:
- result
- additional-info
InternalServerErrorResponse:
type: object
properties:
result:
type: string
enum:
- error
additional-info:
type: string
enum:
- Internal Server Error
required:
- result
- additional-info
I pasted it into Swagger Editor, downloaded the kotlin-server kotlin-server-server-generated.zip, unzipped it at C:\Users\manu\Documents\manu\kotlin-server-server-generated, opened Readme.MD file and followed the instructions in it.
Using Windows cmd, in C:\Users\manu\Documents\manu\kotlin-server-server-generated,
first I ran gradle wrapper.
I got this output:
Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details
Build cache is an incubating feature.
BUILD SUCCESSFUL in 17s
1 actionable task: 1 executed
Then I ran gradlew check assemble:
C:\Users\manu\Documents\manu\kotlin-server-server-generated>gradlew check assemble
Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details
Build cache is an incubating feature.
w: C:\Users\manu\Documents\manu\kotlin-server-server-generated\src\main\kotlin\io\swagger\server\apis\TestApi.kt: (51, 9): Variable 'gson' is never used
w: C:\Users\manu\Documents\manu\kotlin-server-server-generated\src\main\kotlin\io\swagger\server\apis\TestApi.kt: (52, 9): Variable 'empty' is never used
Task :startShadowScripts
Using TaskInputs.file() with something that doesn't resolve to a File object has been deprecated and is scheduled to be removed in Gradle 5.0. Use TaskInputs.files() instead.
BUILD SUCCESSFUL in 36s
10 actionable tasks: 10 executed
Then I ran java -jar ./build/libs/kotlin-server.jar.
But when I pointed the browser to localhost:8080, I see Page Not Found.
What am I doing wrong?
I have a cloud dataflow that is reading from a Pub/Sub and pushing data out to BQ. Recently the dataflow is reporting the error below and not writing any data to BQ.
{
insertId: "3878608796276796502:822931:0:1075"
jsonPayload: {
line: "work_service_client.cc:490"
message: "gcpnoelevationcall-01211413-b90e-harness-n1wd Failed to query CAdvisor at URL=<IPAddress>:<PORT>/api/v2.0/stats?count=1, error: INTERNAL: Couldn't connect to server"
thread: "231"
}
labels: {
compute.googleapis.com/resource_id: "3878608796276796502"
compute.googleapis.com/resource_name: "gcpnoelevationcall-01211413-b90e-harness-n1wd"
compute.googleapis.com/resource_type: "instance"
dataflow.googleapis.com/job_id: "2018-01-21_14_13_45"
dataflow.googleapis.com/job_name: "gcpnoelevationcall"
dataflow.googleapis.com/region: "global"
}
logName: "projects/poc/logs/dataflow.googleapis.com%2Fshuffler"
receiveTimestamp: "2018-01-21T22:41:40.053806623Z"
resource: {
labels: {
job_id: "2018-01-21_14_13_45"
job_name: "gcpnoelevationcall"
project_id: "poc"
region: "global"
step_id: ""
}
type: "dataflow_step"
}
severity: "ERROR"
timestamp: "2018-01-21T22:41:39.524005Z"
}
Any ideas, on how could I help this? Has anyone faced a similar issue before?
If this just happened once it could be attributed to a transient issue. The process running on the worker node can't reach cAdvisor. Either the cAdvisor container is not running or there is a temporal problem on the worker that can't contact cAdvisor and the job gets stuck.
at the time of running titanium application i am getting error, i have tried all the solutions suggested by google, but problem still remains, please help if anyone can understand the error log i pasted below. Thanks.
Appcelerator Command-Line Interface, version 4.1.2
Copyright (c) 2014-2015, Appcelerator, Inc. All Rights Reserved.
TRACE | __command__ search paths:
[
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package",
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules",
"C:\\Users\\acer\\Desktop\\node_modules",
"C:\\Users\\acer\\node_modules",
"C:\\Users\\node_modules",
"C:\\node_modules",
"C:\\Users\\acer\\.appcelerator\\.npm\\lib\\node_modules"
]
DEBUG | [PLUGIN-LOAD] 0ms C:\Users\acer\.appcelerator\install\4.1.2\package\appc.js
DEBUG | [PLUGIN-LOAD] 623ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\appc.js
DEBUG | [PLUGIN-LOAD] 2ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\arrow\appc.js
log level set to "trace"
executing command "run"
set environment to {"registry":"https://software.appcelerator.com","security":"https://security.appcelerator.com","baseurl":"https://platform.appcelerator.com"}
checking credentials for existing session
Attempting to load session info from config file
check if session is invalidated
session expiry 1439531789135 false
+---------------------------------------------------------------------------------------+
+ This is a Developer trial account. You may use this software for evaluation purposes. +
+ Once you are ready to go to production, upgrade at https://billing.appcelerator.com +
+---------------------------------------------------------------------------------------+
Arrow Cloud config file: C:\Users\acer\.acs
found Arrow Cloud login { mid: 'dfa5b79881cc650462ff93ae5df5f65d5760e1cd',
publishPort: 443,
publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com',
username: 'mymail',
cookie: [ 'connect.sid=s%3Ab9eP%2F3NylwuSkAqEtFC3La1k.RDNuz84uHznd9QjZUQ9Rm6UxHfan0GZcGKug2GtaQjg; Path=/; Expires=Fri, 14 Aug 2015 05:56:35 GMT; HttpOnly' ],
defaultEP:
{ publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com',
publishPort: 443 } } , checking nodeACSEndpoint= https://admin.cloudapp-enterprise.appcelerator.com
Arrow Cloud cookie expiry [ 1439531795000 ]
session already loaded in opts.session
getCredentials() session:
{
"ipaddress": "192.168.1.13",
"username": "mymail",
"password": "<OMITTED>",
"session": "<OMITTED>",
"nonce": "<OMITTED>",
"environment": {
"name": "production",
"isProduction": true,
"acsBaseUrl": "https://api.cloud.appcelerator.com",
"acsAuthBaseUrl": "https://secure-identity.cloud.appcelerator.com",
"nodeACSEndpoint": "https://admin.cloudapp-enterprise.appcelerator.com"
},
"token": "<OMITTED>",
"fingerprint": "dfa5b79881cc650462ff93ae5df5f65d5760e1cd",
"fingerprint_description": "Windows Machine ID: bcd68e35-cc53-4567-ab68-66246b73cc67",
"org_id": 100057656,
"expiry": 1439531789135
}
loading plugins for command "run"
run search paths:
[
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package",
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules",
"C:\\Users\\acer\\Desktop\\node_modules",
"C:\\Users\\acer\\node_modules",
"C:\\Users\\node_modules",
"C:\\node_modules",
"C:\\Users\\acer\\.appcelerator\\.npm\\lib\\node_modules"
]
[PLUGIN-LOAD] 0ms C:\Users\acer\.appcelerator\install\4.1.2\package\appc.js
[PLUGIN-LOAD] 251ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\appc.js
run plugin: C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium
[PLUGIN-LOAD] 0ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\arrow\appc.js
run plugin: C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\arrow
plugin "arrow" failed its "when" function check, skipping...
loading plugin "titanium" for command "run" CLI options via function
loading plugin "titanium" for command "run" CLI options via array
Duplicate option "colors" for command "run", removing...
executing command "run" with the following plugins:
["titanium"]
TRACE | Attempting to load session info from config file
TRACE | check if session is invalidated
TRACE | session expiry 1439531789135 false
TRACE | session already loaded in opts.session
DEBUG | Titanium Downloads Last Checked: 1439447168501
TRACE | "C:\Program Files\nodejs\node.exe" "C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\node_modules\titanium\bin\titanium" config -o json-object
TRACE | "C:\Program Files\nodejs\node.exe" "C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\node_modules\titanium\bin\titanium" sdk -o json
TRACE | checking for titanium, result:
{ activeSDK: '4.1.0.GA',
defaultInstallLocation: 'C:\\ProgramData\\Titanium',
installLocations:
[ 'C:\\ProgramData\\Titanium',
'C:\\Users\\acer\\AppData\\Roaming\\Titanium',
'C:\\ProgramData\\Application Data\\Titanium' ],
installed: { '4.1.0.GA': 'C:\\ProgramData\\Titanium\\mobilesdk\\win32\\4.1.0.GA' } }
TRACE | C:\Program Files\nodejs\node.exe [ 'C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules\\appc-cli-titanium\\node_modules\\titanium\\bin\\titanium',
'build',
'--platform',
'android',
'--log-level',
'trace',
'--sdk',
'4.1.0.GA',
'--project-dir',
'D:\\Titanium WS\\ex',
'--target',
'emulator',
'--android-sdk',
'C:\\android-sdk-win',
'--device-id',
'Appp',
'--skip-js-minify',
'--no-colors',
'--no-progress-bars',
'--no-prompt',
'--prompt-type',
'socket-bundle',
'--prompt-port',
'62727',
'--plugin-paths',
'C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules',
'--config-file',
'C:\\Users\\acer\\AppData\\Local\\Temp\\build-1439448105417.json',
'--no-banner' ]
[WARN] :
TRACE | titanium exited with exit code 1
[ERROR] Application Installer abnormal process termination. Process exit value was 1
After 24 hours i get my project installing on my device. i am unable to get the exact problem but i want to share my tried steps to solve the problem.
I installed all sdk's one by one.
I switched my current work space and created new one. (old work space still gives error)
Now my project is installing fine, every time.
Thanks.