ytti/oxidized · error · PromptUndetect

unable to detect prompt: #{@node.prompt}

Error message

unable to detect prompt: #{@node.prompt}

What it means

Error "unable to detect prompt: #{@node.prompt}" thrown in ytti/oxidized.

Source

Thrown at lib/oxidized/input/telnet.rb:29

      @node.model.cfg['telnet'].each { |cb| instance_exec(&cb) }

      @text_debug = DebugText.new(Oxidized.config.input.debug, @node, config_name)

      port = vars(:telnet_port) || 23

      telnet_opts = {
        'Host'    => @node.ip,
        'Port'    => port.to_i,
        'Timeout' => @timeout,
        'Model'   => @node.model,
        'Log'     => @text_debug
      }

      @telnet = Net::Telnet.new telnet_opts
      begin
        login
      rescue Timeout::Error
        raise PromptUndetect, ['unable to detect prompt:', @node.prompt].join(' ')
      end
      connected?
    end

    def connected?
      @telnet && (not @telnet.sock.closed?)
    end

    def cmd(cmd_str, expect = @node.prompt)
      logger.debug "Telnet: #{cmd_str} @#{@node.name}"
      return send(cmd_str + "\r\n") unless expect

      # create a string to be passed to oxidized_expect and modified _there_
      # default to a single space so it shouldn't be coerced to nil by any models.
      out = String(' ')
      @text_debug&.send_data(cmd_str)
      @telnet.puts(cmd_str)
      @telnet.oxidized_expect(timeout: @timeout, expect: expect, out: out)

View on GitHub (pinned to 687ed4262d)

When it happens

Trigger: Thrown at lib/oxidized/input/telnet.rb:29 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/2cef659b8d43672b. Report an issue: GitHub.