ytti/oxidized · error · NoShell

Can't get PTY

Error message

Can't get PTY

What it means

Error "Can't get PTY" thrown in ytti/oxidized.

Source

Thrown at lib/oxidized/input/ssh.rb:101

                   "disconnecting, raising #{e.class} with #{e.message}"
    rescue Timeout::Error
      logger.debug "#{@node.name} timed out while disconnecting"
    ensure
      @yaml_debug&.close
      @text_debug&.close
      (@ssh.close rescue true) unless @ssh.closed? # rubocop:disable Style/RedundantParentheses
    end

    def shell_open(ssh)
      @ses = ssh.open_channel do |ch|
        ch.on_data do |_ch, data|
          @yaml_debug&.receive_data(data)
          @text_debug&.receive_data(data)
          @output << data
          @output = @node.model.expects @output
        end
        ch.request_pty(@pty_options) do |_ch, success_pty|
          raise NoShell, "Can't get PTY" unless success_pty

          ch.send_channel_request 'shell' do |_ch, success_shell|
            raise NoShell, "Can't get shell" unless success_shell
          end
        end
      end
    end

    def exec(state = nil)
      return nil if vars(:ssh_no_exec)

      state.nil? ? @exec : (@exec = state)
    end

    def cmd_shell(cmd, expect_re)
      @output = String.new('')

      @yaml_debug&.send_data(cmd + newline)

View on GitHub (pinned to 687ed4262d)

When it happens

Trigger: Thrown at lib/oxidized/input/ssh.rb:101 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ytti/oxidized@687ed4262d (2026-08-23). Data as JSON: /api/errors/4e3421359a99f742. Report an issue: GitHub.