Welcome, Guest. Please login or register.

Author Topic: Config backup error: connection error on port 23  (Read 10735 times)

angrybutler

  • Newbie
  • *
  • Posts: 15
    • View Profile
Config backup error: connection error on port 23
« on: January 09, 2014, 09:22:40 PM »
Hello all!

New install of NEDI 1.0.8

Trying to connect to a switch via telnet using the following command: 

  /var/nedi/nedi.pl -l100 -v -B0 -SafsgmijtedbpowAO -a 1.1.1.1

I get the following:

Prepare (CLI)  ----------------------------------------------------------------
SSH :adminuser;1:22 Tout:2s OS:IOS EN:(.+?)#\s?$
PTY :Forking ssh -o 'StrictHostKeyChecking no' -l adminuser 1.1.1.1
TEL :adminuser;1:23 Tout:2s OS:IOS EN:(.+?)#\s?$
DISC:Cli config = connection error on port 23
EVNT:CL=cfge EL=3 TGT=switch1 MSG=Config backup error: connection error on port 23
EFWD:0 Mail and 0 SMS queued

I'm running on kubuntu/debian.
Manual telnet works.
Wireshark capture does *not* show tcp/telnet traffic when command is executed.
SNMP stuff seems to work just fine.
I can make telnet connections using Net::Telnet

I fear I'm missing a perl module,  or library, but no idea how to find out which one.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2686
    • View Profile
    • NeDi
Re: Config backup error: connection error on port 23
« Reply #1 on: January 10, 2014, 06:06:51 PM »
Can you try with usessh set to never in nedi.conf? Maybe the device doesn't like a new connection right after the failed SSH attempt...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

angrybutler

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Config backup error: connection error on port 23
« Reply #2 on: January 10, 2014, 07:49:49 PM »
Prepare (CLI)  ----------------------------------------------------------------
TEL :tsuther;1:23 Tout:2s OS:IOS EN:(.+?)#\s?$
DISC:Cli config = connection error on port 23
EVNT:CL=cfge EL=3 TGT=bc-mdf1-clientstack-3750x MSG=Config backup error: connection error on port 23
MLQ :admin bc-mdf1-clientstack-3750x Config backup error: connection error on port 23
EFWD:1 Mail and 0 SMS queued

Wireshark still shows no connection attempt, just some SNMP traffic.  So it doesn't appear the command is even trying to connect to the device.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2686
    • View Profile
    • NeDi
Re: Config backup error: connection error on port 23
« Reply #3 on: January 10, 2014, 09:23:04 PM »
Not even a SYN? Darn, libnet-telnet-perl is really all that's needed. I'd guess try without  -SafsgmijtedbpowAO...

But then again, I'll release 1.0.9 this weekend, so you might just wait ;)
« Last Edit: January 15, 2014, 05:44:33 PM by rickli »
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

angrybutler

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Config backup error: connection error on port 23
« Reply #4 on: January 15, 2014, 12:15:25 AM »
OK, fresh install to 1.0.9

Same problem, not even a syn - I *do* see all kinds of SNMP traffic first though.

/var/www/nedi/nedi.pl -l100 -v -B0 -SOAPjedibatflow -a 10.100.1.98

<snip>
MOD :2038-GigabitEthernet2/0/31 no class  GigabitEthernet2/0/31
MOD :1054-GigabitEthernet1/0/47 no class  GigabitEthernet1/0/47
MOD :1023-GigabitEthernet1/0/16 no class  GigabitEthernet1/0/16
MOD :1010-GigabitEthernet1/0/3 no class  GigabitEthernet1/0/3

Configbackup   ----------------------------------------------------------------

Prepare (CLI)  ----------------------------------------------------------------
TEL :tsuther;1@10.100.1.98:23 Tout:2s OS:IOS EN:[\w+().-]+#\s?$
DISC:Cli config = connection error on port 23
EVNT:CL=cfge EL=3 TGT=art-idf1-Clientstack-3750x MSG=Config backup error: connection error on port 23
EFWD:0 Mail and 0 SMS queued

DevRRD       ------------------------------------------------------------------
DRRD:Can't update /var/www/nedi/rrd/art-idf1-Clientstack-3750x/system.rrd
DRRD:CPU=32 MEM=140895172 TEMP=32 CUS=6056772

Any other ideas?

ascii

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: Config backup error: connection error on port 23
« Reply #5 on: January 15, 2014, 07:15:41 AM »
DevRRD       ------------------------------------------------------------------
DRRD:Can't update /var/www/nedi/rrd/art-idf1-Clientstack-3750x/system.rrd

that is probably a right problem.
Ensure that the webserver user has the right to write in the rrd folder

what linux/unix distribution are you using?
is IO:PTY loaded?

it's the first line of the output
CLI :IO-Pty loaded

angrybutler

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Config backup error: connection error on port 23
« Reply #6 on: January 15, 2014, 03:54:19 PM »
I had run the command with "sudo" and it apparently changed permissions on all the rrd's to root.  Fixed that and vowed to not do it again.

IO-Pty is loaded:


CLI :IO-Pty loaded
DB  :Socket6 loaded
WEB :LWP-UserAgent loaded
OUI :22911 NIC vendor entries read
RDEV:59 devices read from nedi.devices
RADDR:2847 MAC, 0 IP and 84 IPv6 addresses read.
RLNK:0 links (WHERE linktype = 'STAT') read from nedi.links
RMON:0 entries (dev) read from nedi.monitoring
RMON:0 entries (node) read from nedi.monitoring
RUSR:0 entries (groups & 8 = 8 AND (phone != '' OR email != '')) read from nedi.users
SEED:Using /var/www/nedi/seedlist
SEED:10.104.1.50 seedl0 added for discovery
SEED:10.105.1.50 seedl1 added for discovery
SEED:10.100.1.150 seedl2 added for discovery
MAIN:No threads, set 1st at Tue Jan 14 18:44:24 2014

Discovery (1.0.9-010) /var/www/nedi/nedi.pl -l100 -vWpronNF -B0 -SOAPjedibatflow  at Tue Jan 14 18:44:24 2014
-------------------------------------------------------------------------------
Device            Status            Todo/Done-Time
===============================================================================

Identify seedl0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SNMP:Connect 10.104.1.50 tsuther v2 Tout:2s MaxMS:1472
IDNT:Name = bc-mdf1-serverstack-3750x
SOBJ:Reading 1.3.6.1.4.1.9.1.516.def
IDNT:Testing write access with 1.3.6.1.2.1.11.30.0 set to 2
SNMP:Connect 10.104.1.50 tsuther v2 Tout:2s MaxMS:1472
IDNT:Writetest set to 1 OK
IDNT:Writetest restore 2, using tsuther v2
IDNT:Con=
IDNT:Loc=
IDNT:OS=IOS SV=6 TY=WS-C3750
DISC:no skip policy using -S OAPjedibatflow
<snip>

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2686
    • View Profile
    • NeDi
Re: Config backup error: connection error on port 23
« Reply #7 on: January 15, 2014, 05:50:14 PM »
ok, what happens with nedi.pl -vda 10.104.1.50 -b

You may have to comment line 267, as I use a "top" option, which doesn't exist on Linux...

Two files (input.log and output.log) should be generated as well. What's in them?
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

angrybutler

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Config backup error: connection error on port 23
« Reply #8 on: January 16, 2014, 02:32:40 AM »
I ran as requested (after commenting line 267) - resulting output is attached.

$sudo -u www-data /var/www/nedi/nedi.pl -vda 10.104.1.50 -b > runtest.txt

I was not able to find input.log and output.log.  I searched the typical places and wasn't able to find them.

Best regards,
Tom Sutherland

[attachment deleted by admin]

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2686
    • View Profile
    • NeDi
Re: Config backup error: connection error on port 23
« Reply #9 on: January 16, 2014, 09:51:46 PM »
Have a look at Devices-Status. Click on the key, if you see "port 1" in the CLI section. This means it couldn't connect before and NeDi won't try again...

However I realized I made a mistake in evaluating whether libio-pty is installed, so thanks for making me look at it anyway :)

I hope you'll at least see telnet packets now?
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

angrybutler

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Config backup error: connection error on port 23
« Reply #10 on: January 16, 2014, 10:10:18 PM »
ok, more info:

the "-d" option appears to make it work -

sudo -u www-data /var/www/nedi/nedi.pl -va 10.100.1.90 -b

<snip>
Prepare (CLI)  ----------------------------------------------------------------
PREP:fwd supported and user dummy exists

BridgeFwd (CLI)   -------------------------------------------------------------
TEL :dummy@10.100.1.90:23 Tout:2s OS:IOS EN:[\w+().-]+#\s?$
DISC:Cli bridge fwd = connection error on port 23
EVNT:CL=nede EL=1 TGT=art-idf2-Clientstack-3750x MSG=CLI Bridge Fwd error: connection error on port 23
<snip>


sudo -u www-data /var/www/nedi/nedi.pl -vda 10.100.1.90 -b

<snip>
Prepare (CLI)  ----------------------------------------------------------------
PREP:fwd supported and user dummy exists

BridgeFwd (CLI)   -------------------------------------------------------------
TEL :dummy@10.100.1.90:23 Tout:2s OS:IOS EN:[\w+().-]+#\s?$
CLI2:Matched 'Password:' sending password
CLI3:Password sent
CLI4:Matched art-idf2-Clientstack-3750x> (or gen. prompt with enpass & enable cmd), enabling
CLI7:Matched 'Password:' sending password
CLI8:Matched enable prompt, OK
CMD :terminal length 0 OK
CMD :show mac address-table | e CPU|Switch|Router|/.*, OK
<snip>



I reset the CLI status before trying - if it's not reset I get a message that says "no working user"

Thanks again for all the help!    :)

angrybutler

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Config backup error: connection error on port 23
« Reply #11 on: January 17, 2014, 07:58:00 PM »
Not totally fixed though - when I try the "-d" option with discovery, it seems to revert back to "connection error on port 23"

aflores

  • Guest
Re: Config backup error: connection error on port 23
« Reply #12 on: January 22, 2014, 11:52:15 PM »

I have the same problem and have not solved   :(

Configbackup ----------------------------------------------------------------
Prepare (CLI) ----------------------------------------------------------------
PREP:No working user DISC:Cli config = no working user EVNT:CL=cfge EL=1 TGT=F1-ADMA-3-58 MSG=Config backup error: no working user

angrybutler

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Config backup error: connection error on port 23
« Reply #13 on: January 23, 2014, 04:19:37 AM »
Alexander,

I think your problem is slightly different than mine.  I think you need to go to Devices > Status.  From there, you need to click the little key icon that says "Reset CLI Access"  then rerun whatever discovery your trying to do.

I've needed to do this each time the CLI connection fails for any reason.

aflores

  • Guest
Re: Config backup error: connection error on port 23
« Reply #14 on: January 23, 2014, 03:14:27 PM »
Thanks angrybutler, I have done so, but I get the following error:

Prepare (CLI) ----------------------------------------------------------------
SSH : xxxxxx@X.X.X.X:22 Tout:2s
OS:IOS EN:[\w+().-]+#\s?$
PTY :Forking ssh -o 'StrictHostKeyChecking no' -l xxxxxx X.X.X.X
TEL :xxxxxx@X.X.X.X:23 Tout:2s
OS:IOS EN:[\w+().-]+#\s?$
DISC:Cli config = connection error on port 23
EVNT:CL=cfge EL=1 TGT=F1-ADMA-3-58 MSG=Config backup error: connection error on port 23

and then

Configbackup ----------------------------------------------------------------
Prepare (CLI) ----------------------------------------------------------------
PREP:No working user
DISC:Cli config = no working user
EVNT:CL=cfge EL=1 TGT=F1-ADMA-3-58 MSG=Config backup error: no working user