ytti / oxidized

Oxidized is a network device configuration backup tool. It's a RANCID replacement!
Apache License 2.0
2.76k stars 916 forks source link

unable to detect prompt: (?-mix:^([\w.@()-]+#\s?)$) #1593

Closed taro-75 closed 1 year ago

taro-75 commented 5 years ago

Hello, I have a problem with router OneAccess: oneos6 when i use oneos.rb My congif for Oxidized work fine with Cisco router i can't connect Oneaccess Router: raised Oxidized::PromptUndetect with msg "unable to detect prompt: (?-mix:^([\w.@()-]+#\s?)$)"

When can i find the regex on my router model plz ?

show version Software version : ONEOS6-ADVIP_11N-V5.2R1E2_HA1 Software created on : 04/03/15 17:03:22

Thank You

wk commented 5 years ago

This issue does not contain sufficient information to investigate.

Consider enabling debugging and including the device interaction log file, or alternatively including a log of a user manually accessing the device and executing similar commands to those that would be executed by the Oxidized model - using the same username and password Oxidized is configured for.

taro-75 commented 5 years ago

Hello WK :) This is my debeug output: oxidized I, [2018-10-29T09:38:55.489459 #2445] INFO -- : Oxidized starting, running as pid 2445 I, [2018-10-29T09:38:55.490631 #2445] INFO -- : lib/oxidized/nodes.rb: Loading nodes D, [2018-10-29T09:38:55.490837 #2445] DEBUG -- : resolving DNS for TestOxidizedOneAccess... D, [2018-10-29T09:38:55.490892 #2445] DEBUG -- : IPADDR D, [2018-10-29T09:38:55.491038 #2445] DEBUG -- : node.rb: resolving node key 'model', with passed global value of '' and node value 'oneos' D, [2018-10-29T09:38:55.491125 #2445] DEBUG -- : node.rb: setting node key 'model' to value 'cisco' from global D, [2018-10-29T09:38:55.491194 #2445] DEBUG -- : node.rb: returning node key 'model' with value 'oneos' D, [2018-10-29T09:38:55.491248 #2445] DEBUG -- : lib/oxidized/node.rb: Loading model "oneos" D, [2018-10-29T09:38:55.491851 #2445] DEBUG -- : lib/oxidized/model/model.rb Added all to the commands list D, [2018-10-29T09:38:55.491903 #2445] DEBUG -- : lib/oxidized/model/model.rb Added secret to the commands list D, [2018-10-29T09:38:55.491968 #2445] DEBUG -- : lib/oxidized/model/model.rb Added show version to the commands list D, [2018-10-29T09:38:55.492008 #2445] DEBUG -- : lib/oxidized/model/model.rb Added show running-config to the commands list D, [2018-10-29T09:38:55.492248 #2445] DEBUG -- : node.rb: resolving node key 'input', with passed global value of 'ssh, telnet' and node value '' D, [2018-10-29T09:38:55.492319 #2445] DEBUG -- : node.rb: returning node key 'input' with value 'ssh, telnet' D, [2018-10-29T09:38:55.578419 #2445] DEBUG -- : node.rb: resolving node key 'output', with passed global value of 'file' and node value '' D, [2018-10-29T09:38:55.578525 #2445] DEBUG -- : node.rb: returning node key 'output' with value 'file' D, [2018-10-29T09:38:55.579300 #2445] DEBUG -- : node.rb: resolving node key 'username', with passed global value of '' and node value '' D, [2018-10-29T09:38:55.579362 #2445] DEBUG -- : node.rb: setting node key 'username' to value 'root' from global D, [2018-10-29T09:38:55.579433 #2445] DEBUG -- : node.rb: setting node key 'username' to value 'OXIDIZED' from group D, [2018-10-29T09:38:55.579479 #2445] DEBUG -- : node.rb: returning node key 'username' with value 'OXIDIZED' D, [2018-10-29T09:38:55.579517 #2445] DEBUG -- : node.rb: resolving node key 'password', with passed global value of '' and node value '' D, [2018-10-29T09:38:55.579561 #2445] DEBUG -- : node.rb: setting node key 'password' to value '' from global D, [2018-10-29T09:38:55.579614 #2445] DEBUG -- : node.rb: setting node key 'password' to value '*****' from group D, [2018-10-29T09:38:55.579658 #2445] DEBUG -- : node.rb: returning node key 'password' with value '****' I, [2018-10-29T09:38:55.579750 #2445] INFO -- : lib/oxidized/nodes.rb: Loaded 1 nodes D, [2018-10-29T09:38:55.989399 #2445] DEBUG -- : lib/oxidized/core.rb: Starting the worker... D, [2018-10-29T09:38:56.004334 #2445] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 0 of 1 - ended: 0 of 1 D, [2018-10-29T09:38:56.023441 #2445] DEBUG -- : lib/oxidized/worker.rb: Added TestOxidizedOneAccess to the job queue Puma starting in single mode...D, [2018-10-29T09:38:56.039846 #2445] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel D, [2018-10-29T09:38:56.040049 #2445] DEBUG -- : lib/oxidized/job.rb: Starting fetching process for TestOxidizedOneAccess at 2018-10-29 08:38:56 UTC


Log SSh 👍

bonjouuuuuuuuuuuuuuuurr bacem "this is banner Benner" TestOxidizedTarekLeBG#term len 0

------gem list

asetus (0.3.0) backports (3.11.4) bigdecimal (default: 1.3.2) bundler (default: 1.16.2) bundler-unload (1.0.2) charlock_holmes (0.7.6) did_you_mean (1.1.0) emk-sinatra-url-for (0.2.1) executable-hooks (1.6.0) ffi (1.9.25) gem-wrappers (1.4.0) haml (5.0.4) htmlentities (4.3.4) io-console (default: 0.4.6) json (default: 2.0.4) minitest (5.10.1) multi_json (1.13.1) net-ssh (4.1.0) net-telnet (0.1.1) openssl (default: 2.0.7) oxidized (0.24.0) oxidized-script (0.5.1) oxidized-web (0.11.1) power_assert (0.4.1) psych (default: 2.2.2) puma (3.12.0) rack (1.6.10) rack-protection (1.5.5) rack-test (0.7.0) rake (12.0.0) rb-fsevent (0.10.3) rb-inotify (0.9.10) rdoc (default: 5.0.0) rubygems-bundler (1.4.5) rugged (0.27.5) rvm (1.11.3.9) sass (3.6.0) sass-listen (4.0.0) sinatra (1.4.8) sinatra-contrib (1.4.7) slop (3.6.0) temple (0.8.0) test-unit (3.2.3) tilt (2.0.8) xmlrpc (0.2.1)


I try with so many prompt in oneos.rb model but it doesn't works ! No problem with cisco router and Mikrotik router I can manuallu connect to the oneaccess router and chek the Oxidized commant without problem