[GH-ISSUE #135] OSError: out of pty devices #719

Closed
opened 2026-03-15 10:00:32 +03:00 by kerem · 4 comments
Owner

Originally created by @sbrl on GitHub (Dec 12, 2015).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/135

I get a strange OSError: out of pty devices error when I use asciinema rec on my server.

Context: I ssh into my OVH VPS (Classic), which has 1 CPU Core, 1GB RAM, and a 10GB Hard Drive. I don't have control over my kernel due to the virtualisation technology used by OVH. (they use OpenVZ).

Here's my uname -a:

Linux starbeamrainbowlabs.com 2.6.32-042stab111.12 #1 SMP Thu Sep 17 11:38:20 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux

/proc/sys/kernel/pty/max:

4096

Here's the full error output:

~ Asciicast recording started.
~ Hit ctrl+d or type "exit" to finish.

Traceback (most recent call last):
  File "/usr/local/bin/asciinema", line 9, in <module>
    load_entry_point('asciinema==0.9.8', 'console_scripts', 'asciinema')()
  File "/usr/local/lib/python2.7/dist-packages/asciinema/__main__.py", line 7, in main
    get_command(sys.argv[1:], Config()).execute()
  File "/usr/local/lib/python2.7/dist-packages/asciinema/commands/record.py", line 23, in execute
    asciicast = self._record_asciicast()
  File "/usr/local/lib/python2.7/dist-packages/asciinema/commands/record.py", line 35, in _record_asciicast
    asciicast = self.recorder.record(self.cmd, self.title)
  File "/usr/local/lib/python2.7/dist-packages/asciinema/recorder.py", line 16, in record
    cmd or self.env['SHELL'])
  File "/usr/local/lib/python2.7/dist-packages/asciinema/timer.py", line 6, in timeit
    ret = callable(*args)
  File "/usr/local/lib/python2.7/dist-packages/asciinema/pty_recorder.py", line 88, in record_command
    pid, master_fd = pty.fork()
  File "/usr/lib/python2.7/pty.py", line 107, in fork
    master_fd, slave_fd = openpty()
  File "/usr/lib/python2.7/pty.py", line 29, in openpty
    master_fd, slave_name = _open_terminal()
  File "/usr/lib/python2.7/pty.py", line 70, in _open_terminal
    raise os.error, 'out of pty devices'
OSError: out of pty devices
Originally created by @sbrl on GitHub (Dec 12, 2015). Original GitHub issue: https://github.com/asciinema/asciinema/issues/135 I get a strange `OSError: out of pty devices` error when I use `asciinema rec` on my server. Context: I ssh into my OVH VPS (Classic), which has 1 CPU Core, 1GB RAM, and a 10GB Hard Drive. I don't have control over my kernel due to the virtualisation technology used by OVH. (they use OpenVZ). Here's my uname -a: ``` Linux starbeamrainbowlabs.com 2.6.32-042stab111.12 #1 SMP Thu Sep 17 11:38:20 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux ``` `/proc/sys/kernel/pty/max`: ``` 4096 ``` Here's the full error output: ``` ~ Asciicast recording started. ~ Hit ctrl+d or type "exit" to finish. Traceback (most recent call last): File "/usr/local/bin/asciinema", line 9, in <module> load_entry_point('asciinema==0.9.8', 'console_scripts', 'asciinema')() File "/usr/local/lib/python2.7/dist-packages/asciinema/__main__.py", line 7, in main get_command(sys.argv[1:], Config()).execute() File "/usr/local/lib/python2.7/dist-packages/asciinema/commands/record.py", line 23, in execute asciicast = self._record_asciicast() File "/usr/local/lib/python2.7/dist-packages/asciinema/commands/record.py", line 35, in _record_asciicast asciicast = self.recorder.record(self.cmd, self.title) File "/usr/local/lib/python2.7/dist-packages/asciinema/recorder.py", line 16, in record cmd or self.env['SHELL']) File "/usr/local/lib/python2.7/dist-packages/asciinema/timer.py", line 6, in timeit ret = callable(*args) File "/usr/local/lib/python2.7/dist-packages/asciinema/pty_recorder.py", line 88, in record_command pid, master_fd = pty.fork() File "/usr/lib/python2.7/pty.py", line 107, in fork master_fd, slave_fd = openpty() File "/usr/lib/python2.7/pty.py", line 29, in openpty master_fd, slave_name = _open_terminal() File "/usr/lib/python2.7/pty.py", line 70, in _open_terminal raise os.error, 'out of pty devices' OSError: out of pty devices ```
kerem closed this issue 2026-03-15 10:00:37 +03:00
Author
Owner

@ku1ik commented on GitHub (Dec 15, 2015):

I'm not sure why you're getting this error. FYI, this is almost 2 years old version of asciinema, I suggest you to try version >= 1.0.

<!-- gh-comment-id:164895053 --> @ku1ik commented on GitHub (Dec 15, 2015): I'm not sure why you're getting this error. FYI, this is almost 2 years old version of asciinema, I suggest you to try version >= 1.0.
Author
Owner

@sbrl commented on GitHub (Dec 16, 2015):

How can I install the latest version of asciinema? I'm on ubuntu server 15.10. Is there a ppa?

<!-- gh-comment-id:165030174 --> @sbrl commented on GitHub (Dec 16, 2015): How can I install the latest version of asciinema? I'm on ubuntu server 15.10. Is there a ppa?
Author
Owner

@ku1ik commented on GitHub (Dec 16, 2015):

We have Ubuntu ppa, yes. See here https://asciinema.org/docs/installation

<!-- gh-comment-id:165036642 --> @ku1ik commented on GitHub (Dec 16, 2015): We have Ubuntu ppa, yes. See here https://asciinema.org/docs/installation
Author
Owner

@sbrl commented on GitHub (Dec 16, 2015):

Yep, that works. I found that I had an old version of asciinema lying around from who knows where that was overriding the newest version. I've deleted it now, and the new version works flawlessly 😃

<!-- gh-comment-id:165044939 --> @sbrl commented on GitHub (Dec 16, 2015): Yep, that works. I found that I had an old version of asciinema lying around from who knows where that was overriding the newest version. I've deleted it now, and the new version works flawlessly :smiley:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#719
No description provided.