NeDi Community

NeDi Software Specific => Discovery => Topic started by: gernreich on May 13, 2009, 03:34:14 PM

Title: Red CLI light bulb troubleshooting
Post by: gernreich on May 13, 2009, 03:34:14 PM
Hello all,

What are the steps to troubleshoot the red CLI light bulb?  Sorry if this is a noob question.

Thanks!
Title: Re: Red CLI light bulb troubleshooting
Post by: gumba on May 13, 2009, 03:40:40 PM
In Device Status, click the small terminal symbol in the CLI row. This resets the cli settings and makes NeDi trying again next time.
Title: Re: Red CLI light bulb troubleshooting
Post by: gernreich on May 13, 2009, 04:03:55 PM
Hmm I have around 900 of these.  Maybe this is something I can change in the database en masse?
Title: Re: Red CLI light bulb troubleshooting
Post by: gernreich on May 13, 2009, 04:06:47 PM
I'll try just one first to make sure I can fix the issue :-D
Title: Re: Red CLI light bulb troubleshooting
Post by: gernreich on May 13, 2009, 04:13:18 PM
I did click on that icon to reset it.  Then I ran:
./nedi.pl -bu ./backupthisip

I then checked the device again and it went back to the red light bulb "Port 23"

What next? :-D
Title: Re: Red CLI light bulb troubleshooting
Post by: gumba on May 13, 2009, 04:18:12 PM
For bulk reset, you might set the field cliport to 0 in the database. Thats exactly the same as the web interface does.
Title: Re: Red CLI light bulb troubleshooting
Post by: gumba on May 13, 2009, 04:20:43 PM
Hm, that probably means that NeDi can't log in for some reason. You might run your discovery with -v and see (or post ;) ) the output says.
Title: Re: Red CLI light bulb troubleshooting
Post by: gernreich on May 13, 2009, 04:31:09 PM
Here is the output of when I telnet to it directly:  Maybe the banner is freaking out the regexp?

[flobberworm@localhost ~]$ telnet 1.2.3.4
Trying 1.2.3.4...
Connected to 1.2.3.4 (1.2.3.4).
Escape character is '^]'.


      NOTICE!!!!!

This computer system and associated networks are for the
sole business use of Foobar BarFoo authorized users.
The company's computers, proprietary data and information
stored on them, remain at all times, the property of
Foobar Barfoo. Users have no right to privacy as to any
information transmitted or stored in, by, or through any
portion of this system.



User Access Verification

Username: startrek
Password:

Title: Re: Red CLI light bulb troubleshooting
Post by: gumba on May 13, 2009, 04:42:33 PM
May be, but the credential prompt seems good. What regexp do you have in nedi.conf for userlogin?
Title: Re: Red CLI light bulb troubleshooting
Post by: gernreich on May 13, 2009, 05:05:45 PM
The default:

# Regexp to match username prompts (useful if you set something else on auth server):
userlogin       (username|login):

But I think it would also depend on the regexp in libcli-netssh.pl
Title: Re: Red CLI light bulb troubleshooting
Post by: gumba on May 13, 2009, 05:19:24 PM
But I think it would also depend on the regexp in libcli-netssh.pl

libcli-netssh.pl gets it from the config. I can't see anything that should cause trouble here. Can you try to do a discovery with verbose output (-v) to see what NeDi might be complaining about?
Title: Re: Red CLI light bulb troubleshooting
Post by: gernreich on May 13, 2009, 06:48:36 PM
I uncommented the logging statements in libcli-netssh.pl. The logs were logged when I tested a working backup device.  But when I tested one that is not backing up the log files were never created....
Title: Re: Red CLI light bulb troubleshooting
Post by: Sampson Fung on May 14, 2009, 04:34:58 PM
Remember to have a "space" after ":".

Just enable "input" and "output" log, then you debug one by one.

For me, some switch just have matches in the Banner, so the actual login prompt is not matched.
Title: Re: Red CLI light bulb troubleshooting
Post by: gernreich on May 21, 2009, 03:40:46 PM
Hey, do you mean a space after the full colon at the end of the following Regexp?

userlogin       (username|login):


Thanks
Title: Re: Red CLI light bulb troubleshooting
Post by: Sampson Fung on May 21, 2009, 05:35:41 PM
Hey, do you mean a space after the full colon at the end of the following Regexp?

userlogin       (username|login):


Thanks

My string is:

userlogin<tab>(username|login):\s?

To allow an optional space after :.

After this change, over 60% of my device can use telnet to logon.
Title: Re: Red CLI light bulb troubleshooting
Post by: gernreich on May 21, 2009, 05:55:34 PM
after  your first post I put in an actual physical space after the full colon.  That seemed to be working but I changed it to "\s?" to allow zero or one space.

Thanks!  We'll see how it goes.  Is the regexp for the login case insensative?
Title: Re: Red CLI light bulb troubleshooting
Post by: Sampson Fung on May 21, 2009, 06:07:11 PM
after  your first post I put in an actual physical space after the full colon.  That seemed to be working but I changed it to "\s?" to allow zero or one space.

Thanks!  We'll see how it goes.  Is the regexp for the login case insensative?

I guess the regexp is case sensitive. 

I still not getting how to write regexp to what I want ...

But I will just use (sername|ogin):\s?
So, no upper/lower cases at all.

Title: Re: Red CLI light bulb troubleshooting
Post by: gernreich on May 21, 2009, 06:16:26 PM
I think it is case insensitive.  One of the devices that is working is "Username"  when others with "Username" are not working.