Failed to create temporary directory

10,457 views
Skip to first unread message

nitesh shet

unread,
Jun 18, 2021, 3:41:25 PM6/18/21
to Ansible Project
Hi experts,
I am unable to ping to my remote servers via ansible. Below are how my inventory file is looks like:-
[servers]
x.y.z

[servers:vars]
ansible_user=dummy
ansible_ssh_pass=dummy
ansible_python_interpreter=/usr/bin/python
ansible_port=22
ansible_become=yes

if i apply ping module using ansible i am getting below error:-
 "changed": false,
    "msg": "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"` echo ~/.ansible/tmp `\"&& mkdir \"` echo ~/.ansible/tmp/ansible-tmp-1624045005.71-29459-71519195524962 `\" && echo ansible-tmp-1624045005.71-29459-71519195524962=\"` echo ~/.ansible/tmp/ansible-tmp-1624045005.71-29459-71519195524962 `\" ), exited with result 1",
    "unreachable": true
}

the method that i followed to overcome this (but not able to):-
1. i had created the .ansible/tmp directory and given 777 permission (not worked)
2.given 777 permission to default directory of remote(not worked)
3.changing the remote_tmp path in ansible.cfg file(not worked)
4.changing log file path which also has 777 permission in ansible.cfg(not worked)
5.prmitted root login from sshd 

please help me to over come this problem.

my controller node is of centos7 and remote is debian 


Thanks,
Nitesh


Antony Stone

unread,
Jun 18, 2021, 3:51:02 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 21:41:25, nitesh shet wrote:

> Hi experts,
> I am unable to ping to my remote servers via ansible.

Do other ansible commands on the same target machine work okay?

> "msg": "Failed to create temporary directory.In some cases, you may
> have been able to authenticate and did not have permissions on the target
> directory. Consider changing the remote tmp path in ansible.cfg to a path
> rooted in \"/tmp\", for more error information use -vvv.

What's the definition of your tmp path in ansible.cfg?

> Failed command was: ( umask 77 && mkdir -p \"` echo ~/.ansible/tmp `\"&&
> mkdir \"` echo ~/.ansible/tmp/ansible-tmp-1624045005.71-29459-71519195524962
> `\" && echo ansible-tmp-1624045005.71-29459-71519195524962=\"` echo
> ~/.ansible/tmp/ansible-tmp-1624045005.71-29459-71519195524962 `\" ), exited
> with result 1",

> the method that i followed to overcome this (but not able to):-
> 1. i had created the .ansible/tmp directory and given 777 permission (not
> worked)

> 2.given 777 permission to default directory of remote(not worked)

Which is the "default directory"?

> 3.changing the remote_tmp path in ansible.cfg file(not worked)

What did you try changing it to?

> 4.changing log file path which also has 777 permission in ansible.cfg(not
> worked)

I don't believe logging is a problem here.

> 5.prmitted root login from sshd

Which user are you connecting to the remote machine as?

Antony.

--
I think broken pencils are pointless.

Please reply to the list;
please *don't* CC me.

nitesh shet

unread,
Jun 18, 2021, 4:34:18 PM6/18/21
to ansible...@googlegroups.com
My remote user has sudo permission and I tried changing remote_tmp to absolute path in remote host as /home/shared/.ansible/tmp
Nothing is working, if I do ssh manually to the remote will work.

Antony Stone

unread,
Jun 18, 2021, 4:39:00 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 22:33:55, nitesh shet wrote:

> My remote user has sudo permission and I tried changing remote_tmp to
> absolute path in remote host as /home/shared/.ansible/tmp
> Nothing is working, if I do ssh manually to the remote will work.

Which user do you manually SSH to the remote machine as?

Which user is ansible configured to connect as?

Is "/home/shared" the home directory for either of these users?

What's the definition of your tmp path in ansible.cfg?


Antony.

--
I conclude that there are two ways of constructing a software design: One way
is to make it so simple that there are _obviously_ no deficiencies, and the
other way is to make it so complicated that there are no _obvious_
deficiencies.

- C A R Hoare

nitesh shet

unread,
Jun 18, 2021, 4:42:49 PM6/18/21
to ansible...@googlegroups.com
temproot is the user to which I manually did the ssh and /home/shared is also belongs to the temproot user and even in my inventory also I specially mentioned user as temproot.
~/.ansible/tmp is the path in ansible.cfg 

Antony Stone

unread,
Jun 18, 2021, 4:47:17 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 22:42:28, nitesh shet wrote:

> temproot is the user to which I manually did the ssh and /home/shared is
> also belongs to the temproot user and even in my inventory also I specially
> mentioned user as temproot.

Please show us a playbook which exhibits this problem (the shortest example
you can provide which shows it would be good).

Also please copy and paste a short example of a manual SSH session where you
connect to the remote server as the same user that ansible is using and run
the same command you have in the playbook.


Antony.

--
Roses are red,
Bacon is too,
Poetry's hard,
Bacon.
with thanks to Claire Davison

nitesh shet

unread,
Jun 18, 2021, 4:53:45 PM6/18/21
to ansible...@googlegroups.com
[root@in-6centos50-dt ansible]# ssh temp...@172.16.12.215 -p 8022
temp...@172.16.12.215's password:
*********************************** Warning ***********************************
The Linux shell access is restricted to authorized users for business purposes.
Unauthorized access is a violation of the law.

Infinera
18-06-2021T21:51
*******************************************************************************
temproot@localhost:~$ ping 172.16.12.215
PING 172.16.12.215 (172.16.12.215) 56(84) bytes of data.
64 bytes from 172.16.12.215: icmp_seq=1 ttl=64 time=0.112 ms
64 bytes from 172.16.12.215: icmp_seq=2 ttl=64 time=0.123 ms
64 bytes from 172.16.12.215: icmp_seq=3 ttl=64 time=0.112 ms
64 bytes from 172.16.12.215: icmp_seq=4 ttl=64 time=0.226 ms
64 bytes from 172.16.12.215: icmp_seq=5 ttl=64 time=0.135 ms

--- 172.16.12.215 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 37ms
rtt min/avg/max/mdev = 0.112/0.141/0.226/0.044 ms

i haven't written any playbook , i am just trying to run "ansible all -m ping" from shell

nitesh shet

unread,
Jun 18, 2021, 4:54:36 PM6/18/21
to ansible...@googlegroups.com
ansible all -m ping
172.16.12.215 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"` echo ~/.ansible/tmp `\"&& mkdir \"` echo ~/.ansible/tmp/ansible-tmp-1624049640.76-30885-21861204789923 `\" && echo ansible-tmp-1624049640.76-30885-21861204789923=\"` echo ~/.ansible/tmp/ansible-tmp-1624049640.76-30885-21861204789923 `\" ), exited with result 1",
    "unreachable": true

On Sat, Jun 19, 2021 at 2:17 AM Antony Stone <Antony...@ansible.open.source.it> wrote:

Antony Stone

unread,
Jun 18, 2021, 5:00:44 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 22:53:26, nitesh shet wrote:

'i haven't written any playbook , i am just trying to run "ansible all -m
ping" from shell.'

Okay.

> [root@in-6centos50-dt ansible]# ssh temp...@172.16.12.215 -p 8022
> temp...@172.16.12.215's password:

On Friday 18 June 2021 at 21:41:25, nitesh shet wrote:

> Below are how my
> inventory file is looks like:-
> [servers]
> x.y.z
>
> [servers:vars]
> ansible_user=dummy
> ansible_ssh_pass=dummy
> ansible_python_interpreter=/usr/bin/python
> ansible_port=22
> ansible_become=yes

Your manual SSH was to port 8022; your configuration files says port 22.

Your manual SSH was as user temproot, your configuration file says dummy.

Try modifying these things to be consistent and let us know the outcome.


Antony.

--
There are 10 types of people in the world:
those who understand binary notation,
and those who don't.

nitesh shet

unread,
Jun 18, 2021, 5:03:34 PM6/18/21
to ansible...@googlegroups.com
[servers]
172.16.12.215

[servers:vars]
ansible_user=temproot
ansible_ssh_pass=******
ansible_python_interpreter=/usr/bin/python
ansible_port=8022

still i am getting the same response.:-

ansible all -m ping
172.16.12.215 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"` echo ~/.ansible/tmp `\"&& mkdir \"` echo ~/.ansible/tmp/ansible-tmp-1624050122.9-31206-124246621969704 `\" && echo ansible-tmp-1624050122.9-31206-124246621969704=\"` echo ~/.ansible/tmp/ansible-tmp-1624050122.9-31206-124246621969704 `\" ), exited with result 1",
    "unreachable": true

Wei-Yen Tan

unread,
Jun 18, 2021, 5:11:20 PM6/18/21
to ansible...@googlegroups.com
When you run ping in Ansible playbook or ansible they are using the same module. Ansible Ping is not the same as ping. Ansible ping makes an ssh connection to the server. 

When ansible runs a module it writes a file to the home directory of the user on the remote machine to get the right permissions.  This can be overwritten in Ansible.cfg  This error says iT cannot write to /tmp.it looks like this setting has been over written.  

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAPgfy9WMaaSvYeQWEgpaZ8fenajo-CvvkjctcABoiCUN1TSTnQ%40mail.gmail.com.

nitesh shet

unread,
Jun 18, 2021, 5:16:15 PM6/18/21
to ansible...@googlegroups.com
But i have given 777 permission to my ~ directory and in ansible.cfg also tried to change the directory path to something else like /home/temproot/.ansible/tmp and /tmp/.ansible/tmp other than already existing one. 
but nothing worked for me. after that i have kept the config file as it is.


Wei-Yen Tan

unread,
Jun 18, 2021, 5:19:21 PM6/18/21
to ansible...@googlegroups.com
The problem is it is NOT writing to the home directory. It is writing to /tmp directory. Your user has not got rights to the directory. Look for that setting the error message tells you in the ansible.cfg and take it out. Behavior should be the same after that 

nitesh shet

unread,
Jun 18, 2021, 5:20:32 PM6/18/21
to ansible...@googlegroups.com
Below is how ansible config file looks like:

# config file for ansible -- https://ansible.com/
# ===============================================

# nearly all parameters can be overridden in ansible-playbook
# or with command line flags. ansible will read ANSIBLE_CONFIG,
# ansible.cfg in the current working directory, .ansible.cfg in
# the home directory or /etc/ansible/ansible.cfg, whichever it
# finds first

[defaults]

# some basic default values...

#inventory      = /etc/ansible/hosts
#library        = /usr/share/my_modules/
#module_utils   = /usr/share/my_module_utils/
#remote_tmp     = ~/.ansible/tmp
#local_tmp      = ~/.ansible/tmp
#plugin_filters_cfg = /etc/ansible/plugin_filters.yml
#forks          = 5
#poll_interval  = 15
#sudo_user      = root
#ask_sudo_pass = True
#ask_pass      = True
#transport      = smart
#remote_port    = 22
#module_lang    = C
#module_set_locale = False

# plays will gather facts by default, which contain information about
# the remote system.
#
# smart - gather by default, but don't regather if already gathered
# implicit - gather by default, turn off with gather_facts: False
# explicit - do not gather by default, must say gather_facts: True
#gathering = implicit

# This only affects the gathering done by a play's gather_facts directive,
# by default gathering retrieves all facts subsets
# all - gather all subsets
# network - gather min and network facts
# hardware - gather hardware facts (longest facts to retrieve)
# virtual - gather min and virtual facts
# facter - import facts from facter
# ohai - import facts from ohai
# You can combine them using comma (ex: network,virtual)
# You can negate them using ! (ex: !hardware,!facter,!ohai)
# A minimal set of facts is always gathered.
#gather_subset = all

# some hardware related facts are collected
# with a maximum timeout of 10 seconds. This
# option lets you increase or decrease that
# timeout to something more suitable for the
# environment.
# gather_timeout = 10

# Ansible facts are available inside the ansible_facts.* dictionary
# namespace. This setting maintains the behaviour which was the default prior
# to 2.5, duplicating these variables into the main namespace, each with a
# prefix of 'ansible_'.
# This variable is set to True by default for backwards compatibility. It
# will be changed to a default of 'False' in a future release.
# ansible_facts = False
# inject_facts_as_vars = True

# additional paths to search for roles in, colon separated
#roles_path    = /etc/ansible/roles

# uncomment this to disable SSH key host checking
host_key_checking = False

# change the default callback, you can only have one 'stdout' type  enabled at a time.
#stdout_callback = skippy


## Ansible ships with some plugins that require whitelisting,
## this is done to avoid running all of a type by default.
## These setting lists those that you want enabled for your system.
## Custom plugins should not need this unless plugin author specifies it.

# enable callback plugins, they can output to stdout but cannot be 'stdout' type.
#callback_whitelist = timer, mail

# Determine whether includes in tasks and handlers are "static" by
# default. As of 2.0, includes are dynamic by default. Setting these
# values to True will make includes behave more like they did in the
# 1.x versions.
#task_includes_static = False
#handler_includes_static = False

# Controls if a missing handler for a notification event is an error or a warning
#error_on_missing_handler = True

# change this for alternative sudo implementations
#sudo_exe = sudo

# What flags to pass to sudo
# WARNING: leaving out the defaults might create unexpected behaviours
#sudo_flags = -H -S -n

# SSH timeout
#timeout = 10

# default user to use for playbooks if user is not specified
# (/usr/bin/ansible will use current user as default)
#remote_user = root

# logging is off by default unless this path is defined
# if so defined, consider logrotate
#log_path = /var/log/ansible.log

# default module name for /usr/bin/ansible
#module_name = command

# use this shell for commands executed under sudo
# you may need to change this to bin/bash in rare instances
# if sudo is constrained
#executable = /bin/sh

# if inventory variables overlap, does the higher precedence one win
# or are hash values merged together?  The default is 'replace' but
# this can also be set to 'merge'.
#hash_behaviour = replace

# by default, variables from roles will be visible in the global variable
# scope. To prevent this, the following option can be enabled, and only
# tasks and handlers within the role will see the variables there
#private_role_vars = yes

# list any Jinja2 extensions to enable here:
#jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n

# if set, always use this private key file for authentication, same as
# if passing --private-key to ansible or ansible-playbook
#private_key_file = /path/to/file

# If set, configures the path to the Vault password file as an alternative to
# specifying --vault-password-file on the command line.
#vault_password_file = /path/to/vault_password_file

# format of string {{ ansible_managed }} available within Jinja2
# templates indicates to users editing templates files will be replaced.
# replacing {file}, {host} and {uid} and strftime codes with proper values.
#ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
# {file}, {host}, {uid}, and the timestamp can all interfere with idempotence
# in some situations so the default is a static string:
#ansible_managed = Ansible managed

# by default, ansible-playbook will display "Skipping [host]" if it determines a task
# should not be run on a host.  Set this to "False" if you don't want to see these "Skipping"
# messages. NOTE: the task header will still be shown regardless of whether or not the
# task is skipped.
#display_skipped_hosts = True

# by default, if a task in a playbook does not include a name: field then
# ansible-playbook will construct a header that includes the task's action but
# not the task's args.  This is a security feature because ansible cannot know
# if the *module* considers an argument to be no_log at the time that the
# header is printed.  If your environment doesn't have a problem securing
# stdout from ansible-playbook (or you have manually specified no_log in your
# playbook on all of the tasks where you have secret information) then you can
# safely set this to True to get more informative messages.
#display_args_to_stdout = False

# by default (as of 1.3), Ansible will raise errors when attempting to dereference
# Jinja2 variables that are not set in templates or action lines. Uncomment this line
# to revert the behavior to pre-1.3.
#error_on_undefined_vars = False

# by default (as of 1.6), Ansible may display warnings based on the configuration of the
# system running ansible itself. This may include warnings about 3rd party packages or
# other conditions that should be resolved if possible.
# to disable these warnings, set the following value to False:
#system_warnings = True

# by default (as of 1.4), Ansible may display deprecation warnings for language
# features that should no longer be used and will be removed in future versions.
# to disable these warnings, set the following value to False:
#deprecation_warnings = True

# (as of 1.8), Ansible can optionally warn when usage of the shell and
# command module appear to be simplified by using a default Ansible module
# instead.  These warnings can be silenced by adjusting the following
# setting or adding warn=yes or warn=no to the end of the command line
# parameter string.  This will for example suggest using the git module
# instead of shelling out to the git command.
# command_warnings = False


# set plugin path directories here, separate with colons
#action_plugins     = /usr/share/ansible/plugins/action
#become_plugins     = /usr/share/ansible/plugins/become
#cache_plugins      = /usr/share/ansible/plugins/cache
#callback_plugins   = /usr/share/ansible/plugins/callback
#connection_plugins = /usr/share/ansible/plugins/connection
#lookup_plugins     = /usr/share/ansible/plugins/lookup
#inventory_plugins  = /usr/share/ansible/plugins/inventory
#vars_plugins       = /usr/share/ansible/plugins/vars
#filter_plugins     = /usr/share/ansible/plugins/filter
#test_plugins       = /usr/share/ansible/plugins/test
#terminal_plugins   = /usr/share/ansible/plugins/terminal
#strategy_plugins   = /usr/share/ansible/plugins/strategy


# by default, ansible will use the 'linear' strategy but you may want to try
# another one
#strategy = free

# by default callbacks are not loaded for /bin/ansible, enable this if you
# want, for example, a notification or logging callback to also apply to
# /bin/ansible runs
#bin_ansible_callbacks = False


# don't like cows?  that's unfortunate.
# set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1
#nocows = 1

# set which cowsay stencil you'd like to use by default. When set to 'random',
# a random stencil will be selected for each task. The selection will be filtered
# against the `cow_whitelist` option below.
#cow_selection = default
#cow_selection = random

# when using the 'random' option for cowsay, stencils will be restricted to this list.
# it should be formatted as a comma-separated list with no spaces between names.
# NOTE: line continuations here are for formatting purposes only, as the INI parser
#       in python does not support them.
#cow_whitelist=bud-frogs,bunny,cheese,daemon,default,dragon,elephant-in-snake,elephant,eyes,\
#              hellokitty,kitty,luke-koala,meow,milk,moofasa,moose,ren,sheep,small,stegosaurus,\
#              stimpy,supermilker,three-eyes,turkey,turtle,tux,udder,vader-koala,vader,www

# don't like colors either?
# set to 1 if you don't want colors, or export ANSIBLE_NOCOLOR=1
#nocolor = 1

# if set to a persistent type (not 'memory', for example 'redis') fact values
# from previous runs in Ansible will be stored.  This may be useful when
# wanting to use, for example, IP information from one group of servers
# without having to talk to them in the same playbook run to get their
# current IP information.
#fact_caching = memory

#This option tells Ansible where to cache facts. The value is plugin dependent.
#For the jsonfile plugin, it should be a path to a local directory.
#For the redis plugin, the value is a host:port:database triplet: fact_caching_connection = localhost:6379:0

#fact_caching_connection=/tmp



# retry files
# When a playbook fails a .retry file can be created that will be placed in ~/
# You can enable this feature by setting retry_files_enabled to True
# and you can change the location of the files by setting retry_files_save_path

#retry_files_enabled = False
#retry_files_save_path = ~/.ansible-retry

# squash actions
# Ansible can optimise actions that call modules with list parameters
# when looping. Instead of calling the module once per with_ item, the
# module is called once with all items at once. Currently this only works
# under limited circumstances, and only with parameters named 'name'.
#squash_actions = apk,apt,dnf,homebrew,pacman,pkgng,yum,zypper

# prevents logging of task data, off by default
#no_log = False

# prevents logging of tasks, but only on the targets, data is still logged on the master/controller
#no_target_syslog = False

# controls whether Ansible will raise an error or warning if a task has no
# choice but to create world readable temporary files to execute a module on
# the remote machine.  This option is False by default for security.  Users may
# turn this on to have behaviour more like Ansible prior to 2.1.x.  See
# https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user
# for more secure ways to fix this than enabling this option.
allow_world_readable_tmpfiles = False

# controls the compression level of variables sent to
# worker processes. At the default of 0, no compression
# is used. This value must be an integer from 0 to 9.
#var_compression_level = 9

# controls what compression method is used for new-style ansible modules when
# they are sent to the remote system.  The compression types depend on having
# support compiled into both the controller's python and the client's python.
# The names should match with the python Zipfile compression types:
# * ZIP_STORED (no compression. available everywhere)
# * ZIP_DEFLATED (uses zlib, the default)
# These values may be set per host via the ansible_module_compression inventory
# variable
#module_compression = 'ZIP_DEFLATED'

# This controls the cutoff point (in bytes) on --diff for files
# set to 0 for unlimited (RAM may suffer!).
#max_diff_size = 1048576

# This controls how ansible handles multiple --tags and --skip-tags arguments
# on the CLI.  If this is True then multiple arguments are merged together.  If
# it is False, then the last specified argument is used and the others are ignored.
# This option will be removed in 2.8.
#merge_multiple_cli_flags = True

# Controls showing custom stats at the end, off by default
#show_custom_stats = True

# Controls which files to ignore when using a directory as inventory with
# possibly multiple sources (both static and dynamic)
#inventory_ignore_extensions = ~, .orig, .bak, .ini, .cfg, .retry, .pyc, .pyo

# This family of modules use an alternative execution path optimized for network appliances
# only update this setting if you know how this works, otherwise it can break module execution
#network_group_modules=eos, nxos, ios, iosxr, junos, vyos

# When enabled, this option allows lookups (via variables like {{lookup('foo')}} or when used as
# a loop with `with_foo`) to return data that is not marked "unsafe". This means the data may contain
# jinja2 templating language which will be run through the templating engine.
# ENABLING THIS COULD BE A SECURITY RISK
#allow_unsafe_lookups = False

# set default errors for all plays
#any_errors_fatal = False

[inventory]
# enable inventory plugins, default: 'host_list', 'script', 'auto', 'yaml', 'ini', 'toml'
#enable_plugins = host_list, virtualbox, yaml, constructed

# ignore these extensions when parsing a directory as inventory source
#ignore_extensions = .pyc, .pyo, .swp, .bak, ~, .rpm, .md, .txt, ~, .orig, .ini, .cfg, .retry

# ignore files matching these patterns when parsing a directory as inventory source
#ignore_patterns=

# If 'true' unparsed inventory sources become fatal errors, they are warnings otherwise.
#unparsed_is_failed=False

[privilege_escalation]
#become=True
#become_method=sudo
#become_user=root
#become_ask_pass=False

[paramiko_connection]

# uncomment this line to cause the paramiko connection plugin to not record new host
# keys encountered.  Increases performance on new host additions.  Setting works independently of the
# host key checking setting above.
#record_host_keys=False

# by default, Ansible requests a pseudo-terminal for commands executed under sudo. Uncomment this
# line to disable this behaviour.
#pty=False

# paramiko will default to looking for SSH keys initially when trying to
# authenticate to remote devices.  This is a problem for some network devices
# that close the connection after a key failure.  Uncomment this line to
# disable the Paramiko look for keys function
#look_for_keys = False

# When using persistent connections with Paramiko, the connection runs in a
# background process.  If the host doesn't already have a valid SSH key, by
# default Ansible will prompt to add the host key.  This will cause connections
# running in background processes to fail.  Uncomment this line to have
# Paramiko automatically add host keys.
#host_key_auto_add = True

[ssh_connection]

# ssh arguments to use
# Leaving off ControlPersist will result in poor performance, so use
# paramiko on older platforms rather than removing it, -C controls compression use
#ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s

# The base directory for the ControlPath sockets.
# This is the "%(directory)s" in the control_path option
#
# Example:
# control_path_dir = /tmp/.ansible/cp
#control_path_dir = ~/.ansible/cp

# The path to use for the ControlPath sockets. This defaults to a hashed string of the hostname,
# port and username (empty string in the config). The hash mitigates a common problem users
# found with long hostnames and the conventional %(directory)s/ansible-ssh-%%h-%%p-%%r format.
# In those cases, a "too long for Unix domain socket" ssh error would occur.
#
# Example:
# control_path = %(directory)s/%%h-%%r
#control_path =

# Enabling pipelining reduces the number of SSH operations required to
# execute a module on the remote server. This can result in a significant
# performance improvement when enabled, however when using "sudo:" you must
# first disable 'requiretty' in /etc/sudoers
#
# By default, this option is disabled to preserve compatibility with
# sudoers configurations that have requiretty (the default on many distros).
#
#pipelining = False

# Control the mechanism for transferring files (old)
#   * smart = try sftp and then try scp [default]
#   * True = use scp only
#   * False = use sftp only
#scp_if_ssh = smart

# Control the mechanism for transferring files (new)
# If set, this will override the scp_if_ssh option
#   * sftp  = use sftp to transfer files
#   * scp   = use scp to transfer files
#   * piped = use 'dd' over SSH to transfer files
#   * smart = try sftp, scp, and piped, in that order [default]
#transfer_method = smart

# if False, sftp will not use batch mode to transfer files. This may cause some
# types of file transfer failures impossible to catch however, and should
# only be disabled if your sftp version has problems with batch mode
#sftp_batch_mode = False

# The -tt argument is passed to ssh when pipelining is not enabled because sudo
# requires a tty by default.
#usetty = True

# Number of times to retry an SSH connection to a host, in case of UNREACHABLE.
# For each retry attempt, there is an exponential backoff,
# so after the first attempt there is 1s wait, then 2s, 4s etc. up to 30s (max).
#retries = 3

[persistent_connection]

# Configures the persistent connection timeout value in seconds.  This value is
# how long the persistent connection will remain idle before it is destroyed.
# If the connection doesn't receive a request before the timeout value
# expires, the connection is shutdown. The default value is 30 seconds.
#connect_timeout = 30

# The command timeout value defines the amount of time to wait for a command
# or RPC call before timing out. The value for the command timeout must
# be less than the value of the persistent connection idle timeout (connect_timeout)
# The default value is 30 second.
#command_timeout = 30

[accelerate]
#accelerate_port = 5099
#accelerate_timeout = 30
#accelerate_connect_timeout = 5.0

# The daemon timeout is measured in minutes. This time is measured
# from the last activity to the accelerate daemon.
#accelerate_daemon_timeout = 30

# If set to yes, accelerate_multi_key will allow multiple
# private keys to be uploaded to it, though each user must
# have access to the system via SSH to add a new key. The default
# is "no".
#accelerate_multi_key = yes

[selinux]
# file systems that require special treatment when dealing with security context
# the default behaviour that copies the existing context or uses the user default
# needs to be changed to use the file system dependent context.
#special_context_filesystems=nfs,vboxsf,fuse,ramfs,9p,vfat

# Set this to yes to allow libvirt_lxc connections to work without SELinux.
#libvirt_lxc_noseclabel = yes

[colors]
#highlight = white
#verbose = blue
#warn = bright purple
#error = red
#debug = dark gray
#deprecate = purple
#skip = cyan
#unreachable = red
#ok = green
#changed = yellow
#diff_add = green
#diff_remove = red
#diff_lines = cyan


[diff]
# Always print diff when running ( same as always running with -D/--diff )
# always = no

# Set how many context lines to show in diff
# context = 3

On Sat, Jun 19, 2021 at 2:41 AM Wei-Yen Tan <weiye...@gmail.com> wrote:

Wei-Yen Tan

unread,
Jun 18, 2021, 5:23:19 PM6/18/21
to ansible...@googlegroups.com
Why do you have so much?  I just have two or three entries in mine. Role path.  and collections path? Are you just copying and pasting?  What purpose do yoy need to have so many entries? 

nitesh shet

unread,
Jun 18, 2021, 5:25:46 PM6/18/21
to ansible...@googlegroups.com
i just pasted the config file which i got during the ansible installation and made modification on that, can you please specify which entry exactly do i need to change in that config file?

Wei-Yen Tan

unread,
Jun 18, 2021, 5:27:40 PM6/18/21
to ansible...@googlegroups.com
Don't. You don't need to have ansible.cfg to use ansible. Unless there is a setting you need to change. Take it out 

Antony Stone

unread,
Jun 18, 2021, 5:28:12 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 23:25:20, nitesh shet wrote:

> i just pasted the config file which i got during the ansible installation
> and made modification on that, can you please specify which entry exactly
> do i need to change in that config file?

Er, have you uncommented (ie: removed the leading '#') the lines which you
have altered?

If not, they are still comments, and are ignored.


Antony.

--
Tinned food was developed for the British Navy in 1813.

The tin opener was not invented until 1858.

nitesh shet

unread,
Jun 18, 2021, 5:32:12 PM6/18/21
to ansible...@googlegroups.com
i just moved my config file to some unknow directory but after doing that also i am getting the same error :-
ansible all -m ping
172.16.12.215 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"` echo ~/.ansible/tmp `\"&& mkdir \"` echo ~/.ansible/tmp/ansible-tmp-1624051861.58-31908-212868002608260 `\" && echo ansible-tmp-1624051861.58-31908-212868002608260=\"` echo ~/.ansible/tmp/ansible-tmp-1624051861.58-31908-212868002608260 `\" ), exited with result 2",
    "unreachable": true
}

Antony Stone

unread,
Jun 18, 2021, 5:35:15 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 23:31:52, nitesh shet wrote:

> i just moved my config file to some unknow directory but after doing that
> also i am getting the same error

What do the log files such as /var/log/auth.log and /var/log/syslog on the
Debian machine you are targetting tell you is happening when you run these
commands on the Centos ansible server?


Antony.

--
People who use Microsoft software should be certified.

Wei-Yen Tan

unread,
Jun 18, 2021, 5:36:00 PM6/18/21
to ansible...@googlegroups.com
Okay apologies. 

This is the key message here. 

Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. 

Permissions.  

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.

nitesh shet

unread,
Jun 18, 2021, 5:38:54 PM6/18/21
to ansible...@googlegroups.com
no it is not getting creating on my remote machine which is debian

nitesh shet

unread,
Jun 18, 2021, 5:39:39 PM6/18/21
to ansible...@googlegroups.com
/home/shared is the directory on my target or remote machine which has 777 permission as well as temproot also has sudo permission

nitesh shet

unread,
Jun 18, 2021, 5:41:18 PM6/18/21
to ansible...@googlegroups.com
what does this mean by "target directory" which directory it is referring to?

Antony Stone

unread,
Jun 18, 2021, 5:41:31 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 23:38:32, nitesh shet wrote:

> no it is not getting creating on my remote machine which is debian

Sorry, I do not understand that answer.

What do you see in the log files on your Debian machine at the time you run the
ansible command on your Centos machine?

I would expect to find entries in /var/log/syslog and/or /var/log/auth.log on
the Debian machine when a remote user connects by SSH and runs a command.

Antony.

--
I don't know, maybe if we all waited then cosmic rays would write all our
software for us. Of course it might take a while.

- Ron Minnich, Los Alamos National Laboratory

Antony Stone

unread,
Jun 18, 2021, 5:43:10 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 23:39:13, nitesh shet wrote:

> /home/shared is the directory on my target or remote machine which has 777
> permission as well as temproot also has sudo permission

Please log on to the Debian machine and paste here the results of the
commands:

ls -al /home/shared

grep temproot /etc/passwd


Antony.

--
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++

nitesh shet

unread,
Jun 18, 2021, 5:45:25 PM6/18/21
to ansible...@googlegroups.com
 ls -al /home/shared
total 24
drwxrwxrwx 3 root     root    4096 Jun 18 22:37 .
drwxr-xr-x 6 root     root    4096 Jun 18 10:28 ..
-rw-r--r-- 1 root     root    1930 Jun 18 08:52 .bash_profile
-rw-r--r-- 1 root     root     715 Jun 18 08:52 .bashrc
drwxr-xr-x 2 root     root    4096 Jun 18 11:01 scripts
-rw------- 1 temproot osgroup  754 Jun 18 22:37 .viminfo



 grep temproot /etc/passwd
temproot:x:1000:1001::/home/shared:/bin/bash



Antony Stone

unread,
Jun 18, 2021, 5:49:20 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 23:45:03, nitesh shet wrote:

> ls -al /home/shared
> total 24
> drwxrwxrwx 3 root root 4096 Jun 18 22:37 .

This directory is owned by root.

Is there any good reason why you do not do "chown temproot: /home/shared" on
this machine?

> grep temproot /etc/passwd
> temproot:x:1000:1001::/home/shared:/bin/bash

Hm, what does "grep 1001 /etc/group" show?

Antony.

--
René Descartes walks in to a bar.
The barman asks him "Do you want a drink?"
Descartes says "I think not," and disappears.

nitesh shet

unread,
Jun 18, 2021, 5:51:58 PM6/18/21
to ansible...@googlegroups.com
grep 1001 /etc/group
osgroup:x:1001:

nitesh shet

unread,
Jun 18, 2021, 5:53:25 PM6/18/21
to ansible...@googlegroups.com
i did change the file owner to temproot :-
total 24
drwxrwxrwx 3 temproot osgroup 4096 Jun 18 22:37 .

drwxr-xr-x 6 root     root    4096 Jun 18 10:28 ..
-rw-r--r-- 1 root     root    1930 Jun 18 08:52 .bash_profile
-rw-r--r-- 1 root     root     715 Jun 18 08:52 .bashrc
drwxr-xr-x 2 root     root    4096 Jun 18 11:01 scripts
-rw------- 1 temproot osgroup  754 Jun 18 22:37 .viminfo
temproot@localhost:~$ pwd
/home/shared

Antony Stone

unread,
Jun 18, 2021, 5:54:22 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 23:51:34, nitesh shet wrote:

> grep 1001 /etc/group
> osgroup:x:1001:

So, there are no other members of the group "osgroup".

I still fail to understand why the home directory for "temproot" is not owned
by temproot.


Antony.

--
Police have found a cartoonist dead in his house. They say that details are
currently sketchy.

Antony Stone

unread,
Jun 18, 2021, 5:55:45 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 23:53:02, nitesh shet wrote:

> i did change the file owner to temproot :-
> total 24
> drwxrwxrwx 3 temproot osgroup 4096 Jun 18 22:37 .

Okay.

1. Has that made any difference to the output from running your ansible
commands?

2. What do the log files such as /var/log/auth.log and /var/log/syslog on the
Debian machine you are targetting tell you is happening when you run the
commands on the Centos ansible server?

Antony.

--
The next sentence is untrue.
The previous sentence is true.

nitesh shet

unread,
Jun 18, 2021, 5:56:15 PM6/18/21
to ansible...@googlegroups.com
now i made it to temproot, now also i am facing the same issue

nitesh shet

unread,
Jun 18, 2021, 5:57:18 PM6/18/21
to ansible...@googlegroups.com
there is no such file on the debian machine 

Antony Stone

unread,
Jun 18, 2021, 5:58:11 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 23:55:52, nitesh shet wrote:

> now i made it to temproot, now also i am facing the same issue

Please show us what appears in the log files on the Debian machine for the
timestamps when you run the ansible command.


Antony.

--
There are two possible outcomes:

If the result confirms the hypothesis, then you've made a measurement.
If the result is contrary to the hypothesis, then you've made a discovery.

- Enrico Fermi

nitesh shet

unread,
Jun 18, 2021, 5:58:19 PM6/18/21
to ansible...@googlegroups.com
/var/log$ ls
alarm.log         apps.log.4.gz      dpkg.log       lastlog              private               sysstat          ztp.log
alternatives.log  apt                drift          linecard.log         restconf-command.log  tl1-command.log
apps.log          btmp               event.log      messages.log         security.log          user.log
apps.log.1.gz     cli-command.log    extclient.log  netconf-command.log  shell-command.log     watchdog
apps.log.2.gz     configuration.log  faillog        nginx                sim                   wtmp
apps.log.3.gz     crashlogs          kernel.log     pcp                  sysinfo.log           xmm4_fdr 


these are the files i can see in my log folder

Antony Stone

unread,
Jun 18, 2021, 5:58:49 PM6/18/21
to ansible...@googlegroups.com
On Friday 18 June 2021 at 23:56:53, nitesh shet wrote:

> there is no such file on the debian machine

Please paste the output of:

ls /var/log


Antony.

--
I bought a book on memory techniques, but I've forgotten where I put it.

nitesh shet

unread,
Jun 18, 2021, 5:59:46 PM6/18/21
to ansible...@googlegroups.com
Jun 18 22:58:41 localhost sal[6649]: 11817:ArpUpdaterTh   INFO   {ArpUpdater.cpp:396} handleNLNeighMsg: NeighMsgType: NewNeigh NeighState: Failed
Jun 18 22:58:41 localhost sal[6649]: 11817:ArpUpdaterTh   INFO   {ArpUpdater.cpp:400} handleNLNeighMsg: Delete Arp for 19.88.4.49
Jun 18 22:58:41 localhost sal[6649]: 11817:ArpUpdaterTh   INFO   {L3Db.cpp:707} deleteArp: Dst:0x13580431 VrfId:0
Jun 18 22:58:41 localhost sal[6649]: 11817:ArpUpdaterTh   ERROR  {L3Db.cpp:745} deleteArp: RtEntry does not exist
Jun 18 22:58:41 localhost SdaServer[5970]: agent: error joining: 1 error occurred:
                                                   * Failed to join 19.88.4.49: dial tcp 19.88.4.49:7949: connect: no route to host
Jun 18 22:58:41 localhost SdaServer[5970]: agent: Join failed: 1 error occurred:
                                                   * Failed to join 19.88.4.49: dial tcp 19.88.4.49:7949: connect: no route to host

                                           , retrying in 10s
Jun 18 22:58:44 localhost sal[6649]: 11817:ArpUpdaterTh   INFO   {ArpUpdater.cpp:396} handleNLNeighMsg: NeighMsgType: NewNeigh NeighState: Failed
Jun 18 22:58:44 localhost sal[6649]: 11817:ArpUpdaterTh   INFO   {ArpUpdater.cpp:400} handleNLNeighMsg: Delete Arp for 19.88.4.49
Jun 18 22:58:44 localhost sal[6649]: 11817:ArpUpdaterTh   INFO   {L3Db.cpp:707} deleteArp: Dst:0x13580431 VrfId:0
Jun 18 22:58:44 localhost sal[6649]: 11817:ArpUpdaterTh   ERROR  {L3Db.cpp:745} deleteArp: RtEntry does not exist
Jun 18 22:58:50 localhost sshd[8612]: debug1: Forked child 20582.
Jun 18 22:58:50 localhost sshd[20582]: debug1: Set /proc/self/oom_score_adj to 0
Jun 18 22:58:50 localhost sshd[20582]: debug1: rexec start in 13 out 13 newsock 13 pipe 15 sock 16
Jun 18 22:58:50 localhost sshd[20582]: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key
Jun 18 22:58:50 localhost sshd[20582]: debug1: inetd sockets after dupping: 3, 3
Jun 18 22:58:50 localhost sshd[20582]: Connection from 10.220.6.50 port 36048 on 172.16.12.215 port 8022
Jun 18 22:58:50 localhost sshd[20582]: debug1: Client protocol version 2.0; client software version OpenSSH_7.4
Jun 18 22:58:50 localhost sshd[20582]: debug1: match: OpenSSH_7.4 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
Jun 18 22:58:50 localhost sshd[20582]: debug1: Local version string SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
Jun 18 22:58:50 localhost sshd[20582]: debug1: permanently_set_uid: 105/65534 [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: list_hostkey_types: ssh-rsa,ecdsa-sha2-nistp521 [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: SSH2_MSG_KEXINIT sent [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: SSH2_MSG_KEXINIT received [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: kex: algorithm: ecdh-sha2-nistp256 [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: kex: host key algorithm: ecdsa-sha2-nistp521 [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha...@openssh.com compression: zl...@openssh.com [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha...@openssh.com compression: zl...@openssh.com [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: rekey after 4294967296 blocks [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: SSH2_MSG_NEWKEYS sent [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: expecting SSH2_MSG_NEWKEYS [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: SSH2_MSG_NEWKEYS received [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: rekey after 4294967296 blocks [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: KEX done [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: userauth-request for user temproot service ssh-connection method none [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: attempt 0 failures 0 [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: user temproot does not match group list nogroup at line 37
Jun 18 22:58:50 localhost sshd[20582]: debug1: connection from 172.16.12.215 matched 'LocalPort 8022' at line 52
Jun 18 22:58:50 localhost sshd[20582]: debug1: PAM: initializing for "temproot"
Jun 18 22:58:50 localhost sshd[20582]: debug1: PAM: setting PAM_RHOST to "10.220.6.50"
Jun 18 22:58:50 localhost sshd[20582]: debug1: PAM: setting PAM_TTY to "ssh"
Jun 18 22:58:50 localhost sshd[20582]: debug1: userauth-request for user temproot service ssh-connection method publickey [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: attempt 1 failures 0 [preauth]
Jun 18 22:58:50 localhost sshd[20582]: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedKeyTypes [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: userauth-request for user temproot service ssh-connection method password [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: attempt 2 failures 1 [preauth]
Jun 18 22:58:50 localhost sshd[20582]: debug1: PAM: password authentication accepted for temproot
Jun 18 22:58:50 localhost sshd[20582]: debug1: do_pam_account: called
Jun 18 22:58:51 localhost sshd[20582]: Accepted password for temproot from 10.220.6.50 port 36048 ssh2
Jun 18 22:58:51 localhost sshd[20582]: debug1: monitor_child_preauth: temproot has been authenticated by privileged process
Jun 18 22:58:51 localhost sshd[20582]: debug1: Enabling compression at level 6. [preauth]
Jun 18 22:58:51 localhost sshd[20582]: debug1: monitor_read_log: child log fd closed
Jun 18 22:58:51 localhost sshd[20582]: debug1: PAM: establishing credentials
Jun 18 22:58:51 localhost sshd[20582]: User child is on pid 20594
Jun 18 22:58:51 localhost sshd[20594]: debug1: SELinux support disabled
Jun 18 22:58:51 localhost sshd[20594]: debug1: PAM: establishing credentials
Jun 18 22:58:51 localhost sshd[20594]: debug1: permanently_set_uid: 1000/1001
Jun 18 22:58:51 localhost sshd[20594]: debug1: rekey after 4294967296 blocks
Jun 18 22:58:51 localhost sshd[20594]: debug1: rekey after 4294967296 blocks
Jun 18 22:58:51 localhost sshd[20594]: debug1: ssh_packet_set_postauth: called
Jun 18 22:58:51 localhost sshd[20594]: debug1: Enabling compression at level 6.
Jun 18 22:58:51 localhost sshd[20594]: debug1: active: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
Jun 18 22:58:51 localhost sshd[20594]: debug1: Entering interactive session for SSH2.
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_init_dispatch
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_input_channel_open: ctype session rchan 2 win 2097152 max 32768
Jun 18 22:58:51 localhost sshd[20594]: debug1: input_session_request
Jun 18 22:58:51 localhost sshd[20594]: debug1: channel 0: new [server-session]
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_new: session 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_open: channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_open: session 0: link with channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_input_channel_open: confirm session
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_input_channel_req: channel 0 request env reply 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_by_channel: session 0 channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_input_channel_req: session 0 req env
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_input_channel_req: channel 0 request exec reply 1
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_by_channel: session 0 channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_input_channel_req: session 0 req exec
Jun 18 22:58:51 localhost sshd[20594]: Starting session: forced-command (config) '/opt/infinera/thanos/local/bin/ssh_direct_wrapper.sh' for temproot from 10.220.6.50 port 36048 id 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: Received SIGCHLD.
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_by_pid: pid 20595
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_exit_message: session 0 channel 0 pid 20595
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_exit_message: release channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_by_channel: session 0 channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_close_by_channel: channel 0 child 0
Jun 18 22:58:51 localhost sshd[20594]: Close session: user temproot from 10.220.6.50 port 36048 id 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: channel 0: free: server-session, nchannels 1
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_input_channel_open: ctype session rchan 2 win 2097152 max 32768
Jun 18 22:58:51 localhost sshd[20594]: debug1: input_session_request
Jun 18 22:58:51 localhost sshd[20594]: debug1: channel 0: new [server-session]
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_new: session 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_open: channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_open: session 0: link with channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_input_channel_open: confirm session
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_input_channel_req: channel 0 request env reply 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_by_channel: session 0 channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_input_channel_req: session 0 req env
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_input_channel_req: channel 0 request exec reply 1
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_by_channel: session 0 channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_input_channel_req: session 0 req exec
Jun 18 22:58:51 localhost sshd[20594]: Starting session: forced-command (config) '/opt/infinera/thanos/local/bin/ssh_direct_wrapper.sh' for temproot from 10.220.6.50 port 36048 id 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: Received SIGCHLD.
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_by_pid: pid 20600
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_exit_message: session 0 channel 0 pid 20600
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_exit_message: release channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_by_channel: session 0 channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_close_by_channel: channel 0 child 0
Jun 18 22:58:51 localhost sshd[20594]: Close session: user temproot from 10.220.6.50 port 36048 id 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: channel 0: free: server-session, nchannels 1
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_input_channel_open: ctype session rchan 2 win 2097152 max 32768
Jun 18 22:58:51 localhost sshd[20594]: debug1: input_session_request
Jun 18 22:58:51 localhost sshd[20594]: debug1: channel 0: new [server-session]
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_new: session 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_open: channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_open: session 0: link with channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_input_channel_open: confirm session
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_input_channel_req: channel 0 request env reply 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_by_channel: session 0 channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_input_channel_req: session 0 req env
Jun 18 22:58:51 localhost sshd[20594]: debug1: server_input_channel_req: channel 0 request exec reply 1
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_by_channel: session 0 channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_input_channel_req: session 0 req exec
Jun 18 22:58:51 localhost sshd[20594]: Starting session: forced-command (config) '/opt/infinera/thanos/local/bin/ssh_direct_wrapper.sh' for temproot from 10.220.6.50 port 36048 id 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: Received SIGCHLD.
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_by_pid: pid 20605
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_exit_message: session 0 channel 0 pid 20605
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_exit_message: release channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_by_channel: session 0 channel 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: session_close_by_channel: channel 0 child 0
Jun 18 22:58:51 localhost sshd[20594]: Close session: user temproot from 10.220.6.50 port 36048 id 0
Jun 18 22:58:51 localhost sshd[20594]: debug1: channel 0: free: server-session, nchannels 1
Jun 18 22:58:51 localhost SdaServer[5970]: agent: Joining cluster...(replay: false)
Jun 18 22:58:51 localhost SdaServer[5970]: agent: joining: [19.88.4.49] replay: false
Jun 18 22:58:54 localhost sshd[24534]: debug1: Got 100/185 for keepalive
Jun 18 22:58:54 localhost sshd[24534]: debug1: Got 100/186 for keepalive
Jun 18 22:58:54 localhost sal[6649]: 11817:ArpUpdaterTh   INFO   {ArpUpdater.cpp:396} handleNLNeighMsg: NeighMsgType: NewNeigh NeighState: Failed
Jun 18 22:58:54 localhost sal[6649]: 11817:ArpUpdaterTh   INFO   {ArpUpdater.cpp:400} handleNLNeighMsg: Delete Arp for 19.88.4.49
Jun 18 22:58:54 localhost sal[6649]: 11817:ArpUpdaterTh   INFO   {L3Db.cpp:707} deleteArp: Dst:0x13580431 VrfId:0
Jun 18 22:58:54 localhost sal[6649]: 11817:ArpUpdaterTh   ERROR  {L3Db.cpp:745} deleteArp: RtEntry does not exist
Jun 18 22:58:54 localhost SdaServer[5970]: agent: error joining: 1 error occurred:
                                                   * Failed to join 19.88.4.49: dial tcp 19.88.4.49:7949: connect: no route to host
Jun 18 22:58:54 localhost SdaServer[5970]: agent: Join failed: 1 error occurred:
                                                   * Failed to join 19.88.4.49: dial tcp 19.88.4.49:7949: connect: no route to host

                                           , retrying in 10s
Jun 18 22:58:57 localhost sal[6649]: 11886:ArpUpdaterTh   INFO   {ArpUpdater.cpp:396} handleNLNeighMsg: NeighMsgType: NewNeigh NeighState: Failed
Jun 18 22:58:57 localhost sal[6649]: 11886:ArpUpdaterTh   INFO   {ArpUpdater.cpp:400} handleNLNeighMsg: Delete Arp for 19.88.4.49
Jun 18 22:58:57 localhost sal[6649]: 11886:ArpUpdaterTh   INFO   {L3Db.cpp:707} deleteArp: Dst:0x13580431 VrfId:0
Jun 18 22:58:57 localhost sal[6649]: 11886:ArpUpdaterTh   ERROR  {L3Db.cpp:745} deleteArp: RtEntry does not exist
Jun 18 22:59:04 localhost SdaServer[5970]: agent: Joining cluster...(replay: false)
Jun 18 22:59:04 localhost SdaServer[5970]: agent: joining: [19.88.4.49] replay: false
Jun 18 22:59:04 localhost sshd[24405]: debug1: Got 100/1458 for keepalive

Antony Stone

unread,
Jun 18, 2021, 6:04:58 PM6/18/21
to ansible...@googlegroups.com
I'm sorry - I am out of my depth here - this is unlike any Debian machine I
have ever worked on - so many expected things are missing and so many
unexpected things exist. I have no idea how this machine has been set up.

I hope someone else may be able to chip in and suggest how to debug this
further.


Antony.

--
"The future is already here. It's just not evenly distributed yet."

- William Gibson

Dick Visser

unread,
Jun 19, 2021, 8:29:28 AM6/19/21
to ansible...@googlegroups.com
Can you wipe and reinstall the Debian system?
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

nitesh shet

unread,
Jun 19, 2021, 12:08:07 PM6/19/21
to ansible...@googlegroups.com
I have made changes in inventory file like added network_cli as connection type and now the ping is working fine 

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.

lloyd noble

unread,
Jun 3, 2022, 4:03:49 AM6/3/22
to Ansible Project
I am having the exact error while try to ping my windows machine form ansible automation platform template

Can you let me know what was the fix here i see my ansible.cnfg file has the temp folder specified

{
  "unreachable": true,
  "msg": "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"` echo ~/.ansible/tmp `\"&& mkdir \"` echo ~/.ansible/tmp/ansible-tmp-1654237550.361781-26-26236287869257 `\" && echo ansible-tmp-1654237550.361781-26-26236287869257=\"` echo ~/.ansible/tmp/ansible-tmp-1654237550.361781-26-26236287869257 `\" ), exited with result 1",
  "changed": false
}
Reply all
Reply to author
Forward
0 new messages