question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az container exec in azure devops throws (25, 'Inappropriate ioctl for device')

See original GitHub issue

Az version 2.3.1

Describe the bug

When trying to use Azure DevOps Pipelines Azure CLI task az container exec the shell outputs errors.

To Reproduce

az container exec --resource-group myRG --name myImageName --exec-command ./run.sh

Expected behavior

To be able to display the output of the container.

Environment summary

Azure Devops free agent running Ubuntu 18.04

Additional context

This error message is thrown:

 [command]/bin/bash /home/vsts/work/_temp/azureclitaskscript1588671209398.sh
 The command failed with an unexpected error. Here is the traceback:
 
 (25, 'Inappropriate ioctl for device')
 Traceback (most recent call last):
   File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
     cmd_result = self.invocation.execute(args)
   File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 625, in execute
     raise ex
   File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 689, in _run_jobs_serially
     results.append(self._run_job(expanded_arg, cmd_copy))
   File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 682, in _run_job
     six.reraise(*sys.exc_info())
   File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
     raise value
   File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 659, in _run_job
     result = cmd_copy(params)
   File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 324, in __call__
     return self.handler(*args, **kwargs)
   File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 531, in default_command_handler
     return op(**command_args)
   File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/container/custom.py", line 621, in container_exec
     _start_exec_pipe(execContainerResponse.web_socket_uri, execContainerResponse.password)
   File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/container/custom.py", line 655, in _start_exec_pipe
     oldtty = termios.tcgetattr(sys.stdin)
 termios.error: (25, 'Inappropriate ioctl for device')
 
 To open an issue, please run: 'az feedback'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:11
  • Comments:22 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
michaelellebycommented, Aug 9, 2022

@navba-MSFT this is still an issue, please reopen this issue.

2reactions
gary-x0pacommented, Sep 6, 2021

In the end I emulated tty using the following

script --return --quiet -c "az container exec --resource-group myRG --name myImageName --exec-command ./run.sh'" /dev/null
Read more comments on GitHub >

github_iconTop Results From Across the Web

When trying to use Azure DevOps Pipelines Azure CLI task az ...
az container exec --resource-group myRG --name myImageName --exec-command ... Here is the traceback: (25, 'Inappropriate ioctl for device') ...
Read more >
Execute a command in a running Azure container instance
Run a command with Azure CLI. Execute a command in a running container with az container exec in the Azure CLI: Azure CLI...
Read more >
Dynamic Deployment of SonarQube in Azure Container ...
In this session, I will demonstrate how to Dynamically Deploy SonarQube in Azure Container Instance Using Azure DevOps.
Read more >
Security update for the Linux Kernel | SUSE Support
CVE-2019-15216: There was a NULL pointer dereference caused by a malicious USB device in the drivers/usb/misc/yurex.c driver (bnc#1146361). CVE-2019 ...
Read more >
Hundreds of Millions of Dell Users at Risk from Kernel-Privilege Bugs
“Hundreds of millions of Dell devices have updates pushed on a regular basis, ... Exploit for Improper Authentication in Pulsesecure Pulse Connect Secure....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found