Closed rtripon closed 6 years ago
I've been testing this against my devices and @chris-technicate has been helping against his too. I think I've narrowed down quite a few minor bugs etc so I'll be updating it to 1.3.1 with the following updates:
In answer to your question about the device, it's probably falling into one of these two issues:
Hello, Seems that automatically backups still doesnt work :(.
2018/02/27 01:00:31 - RCONFIG DEBUG: Executing '/usr/bin/php' with arguments ' -q /var/www/html/cacti/plugins/routerconfigs/router-download.php --retry' 2018/02/27 01:00:32 - RCONFIG STATS: Backup now running since 2018-02-27 01:00:32 2018/02/27 01:00:32 - RCONFIG STATS: Time:0.00 Downloaded:0 Failed:0
2018/02/27 03:00:31 - RCONFIG DEBUG: Executing '/usr/bin/php' with arguments ' -q /var/www/html/cacti/plugins/routerconfigs/router-download.php --retry' 2018/02/27 03:00:32 - RCONFIG STATS: Backup now running since 2018-02-27 03:00:31 2018/02/27 03:00:32 - RCONFIG STATS: Time:0.00 Downloaded:0 Failed:0
automatic should have been at 00:00
Yes, I know, I waited a day.
On Feb 27, 2018 20:32, "netniV" notifications@github.com wrote:
automatic should have been at 00:00
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/plugin_routerconfigs/issues/39#issuecomment-368979284, or mute the thread https://github.com/notifications/unsubscribe-auth/AblNWqeXOsmVya4MRqNc40lXdJiZkD4uks5tZEokgaJpZM4ST3zq .
I've done some more tweaking. I'll take a look at some logs tomorrow to see if they are working as expected. If so I'll publish the update.
Weird, on the second day, I've notice that the backups worked(automatically). So far only issues I have are with those devices who are using a tacacs server.
If there is a failed attempt to download a device configuration within 4 hours of midnight, it may skip downloading it. Check the backups list, there should be a text status, saying "Today" or "Yesterday", plus a last attempted and last backup column
So far, everything is working great :). Thank you for helping netniV, one of the reasons I didnt move my production cacti to new version was for this plugin not working. BTW, is there a way to save my devices/configs/backups if I update with a new version with copy paste? I cant install via git:(, so I have to download manually the file and put it on the server. By doing that I've notices everything I had get deleted(devices, account, backups).
You aren't allowed to install via git, you don't have direct internet access, or it gives you a problem? If you are just overwriting the files with a copy, then you shouldn't lose any of the other data since the download will only include the sources.
It won't touch the database or the files. If the files are disappearing, something else is responsible for that.
But... I think what you are doing is Uninstalling the plugin... NEVER uninstall a plugin until you are never going to use it again. Disabling it is enough.
The box where I have cacti + plugin is having a git version of 2.5 and I keep running into "SSL connection error" problem. Tried to debug it, but no luck so far, installed like 4 versions of git, same problem. If I leave the default version(1.7.1) I have the other error: fatal: HTTP request failed
Very strange. And unfortunately as GIT makes like so much easier 👍
Backups via Telnet (with the same config as SSH which works) do not work. Seems like the script doesnt react to the password prompt:
01-03-2018 10:38:20 - RCONFIG 192.168.165.17 (Telnet) -> Attempting to open socket to 192.168.165.17:23
01-03-2018 10:38:20 - RCONFIG 192.168.165.17 (Telnet) -> Looking for username:
01-03-2018 10:38:22 - RCONFIG 192.168.165.17 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached
01-03-2018 10:38:22 - RCONFIG 192.168.165.17 (Telnet) -> DEBUG: Sending username: pconoc
01-03-2018 10:38:23 - RCONFIG 192.168.165.17 (Telnet) -> DEBUG: Found Prompt (Password)
01-03-2018 10:38:25 - RCONFIG 192.168.165.17 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached
01-03-2018 10:38:27 - RCONFIG 192.168.165.17 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached
01-03-2018 10:38:29 - RCONFIG 192.168.165.17 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached
01-03-2018 10:38:31 - RCONFIG 192.168.165.17 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached
01-03-2018 10:38:33 - RCONFIG 192.168.165.17 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached
01-03-2018 10:38:35 - RCONFIG 192.168.165.17 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached
01-03-2018 10:38:37 - RCONFIG 192.168.165.17 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached
01-03-2018 10:38:39 - RCONFIG 192.168.165.17 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached
01-03-2018 10:38:41 - RCONFIG 192.168.165.17 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached
01-03-2018 10:38:41 - RCONFIG ERROR: Failed to Connect to Device 'SWT-GMH-ASP10' using connection type: telnet
Every backup new backup i do today is marked with "This month" instead of today. I believe yesterday it was displayed correctly.
Haha, I think I know the reason for that.... it's because they are both >= today 👍 Tomorrow, it will show right again.
With regards to the telnet issue, I need to update the code to let the GetResponse() function know where it's at, so that I can tell were the timeouts are actually occurring. I have already updated to 1.3.1 for some things, I will double check whether it covered this.
Hello, I've updated to latest and something is b0rken for me now, plugin isnt working(not even manually)
php router-download.php --debug --force --devices PHP Catchable fatal error: Argument 1 passed to routerconfigs_checkopt() must be an instance of string, string given, called in /var/www/html/cacti/plugins/routerconfigs/router-download.php on line 255 and defined in /var/www/html/cacti/plugins/routerconfigs/router-download.php on line 317
PHP version 5.3.3
That sounds like you don't have the latest code... let me check.
Wait, you either need an ID after devices or you need to leave it off
All devices:
php router-download.php --debug --force
Specific device:
php router-download.php --debug --force --devices <id,id,id...>
I copied the file from git, manually. It shows v 1.3.1. Tried even uninstaling everything, no luck.
On Mar 2, 2018 10:11, "netniV" notifications@github.com wrote:
That sounds like you don't have the latest code... let me check.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/plugin_routerconfigs/issues/39#issuecomment-369851468, or mute the thread https://github.com/notifications/unsubscribe-auth/AblNWr-QK9MPtvZLdPdkFQPwhckJIe3Aks5taP6UgaJpZM4ST3zq .
Uninstalling will remove all your data, don't do that unless you want to recreate the export.
Tried that, same error.
On Mar 2, 2018 10:12, "netniV" notifications@github.com wrote:
Wait, you either need an ID after devices or you need to leave it off
All devices:
php router-download.php --debug --force
Specific device:
php router-download.php --debug --force --devices <id,id,id...>
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/plugin_routerconfigs/issues/39#issuecomment-369851737, or mute the thread https://github.com/notifications/unsubscribe-auth/AblNWqRjo8Nc1Svq-KQdIFkOTubaUzbKks5taP7rgaJpZM4ST3zq .
It's ok, I don't have that many devices, I can add them again.
On Mar 2, 2018 10:13, "Razvan Tripon" razvan.tripon@gmail.com wrote:
Tried that, same error.
On Mar 2, 2018 10:12, "netniV" notifications@github.com wrote:
Wait, you either need an ID after devices or you need to leave it off
All devices:
php router-download.php --debug --force
Specific device:
php router-download.php --debug --force --devices <id,id,id...>
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/plugin_routerconfigs/issues/39#issuecomment-369851737, or mute the thread https://github.com/notifications/unsubscribe-auth/AblNWqRjo8Nc1Svq-KQdIFkOTubaUzbKks5taP7rgaJpZM4ST3zq .
Well, I would suggest for now, download from my repo at https://github.com/netniv/plugin_routerconfigs/ which contains all the latest code I've done. Unfortunately, this hasn't been merged yet as we are waiting on @cigamit whose quite busy at the moment.
Same error...
Using the commands I gave you?
Wait, did you say your on PHP 5.3.3 ?
Yes.
On Mar 2, 2018 10:33, "netniV" notifications@github.com wrote:
Wait, did you say your on PHP 5.3.3 ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/plugin_routerconfigs/issues/39#issuecomment-369855827, or mute the thread https://github.com/notifications/unsubscribe-auth/AblNWqNDGT_rbqZot33bOOdptOZ5kPQhks5taQPLgaJpZM4ST3zq .
Cacti is supported from 5.4 and above... I'm gonna guess your on CentOS 6.9 or similar?
In the meantime, try applying this patch:
diff --git a/router-download.php b/router-download.php
index 81694df..2e52149 100644
--- a/router-download.php
+++ b/router-download.php
@@ -54,6 +54,7 @@ $longOpts = array(
'help'
);
+$remaing = '';
$options = routerconfigs_getopts($shortOpts, $longOpts, $remaining);
include('./include/global.php');
See if the error subsides.
If only Git would work for me :)....
Time for some updating on boxes I guess...
I've added the line..No joy.
What OS/Version are you running? I will see if I can replicate with a test machine.
Centos 6.6
OK, well I do have a 6.9 box, it'll be newer than yours but I should run into the same issues potentially. I suspect thought that being less than PHP 5.4 is what is causing your issues. There were some instructions on the web how to move CentOS onto 5.4
Well, this sucks..I've installed a new box(centos7, with php 5.4, git 1.8), installed via git, got the latest version 1.3.2 ...and still same error
[root@cacti2 routerconfigs]# php -v PHP 5.4.16 (cli) (built: Nov 15 2017 16:33:54) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
php router-download.php --debug --force PHP Catchable fatal error: Argument 1 passed to routerconfigs_checkopt() must be an instance of string, string given, called in /var/www/html/cacti/plugins/routerconfigs/router-download.php on line 255 and defined in /var/www/html/cacti/plugins/routerconfigs/router-download.php on line 317
That is weird because if you read the error, it's basically saying you can't use a string because it expects a string... well duh.. I'll get my test box setup next week on 5.4, see how I fair.
Something is really fishy, I cant seem to get pass this error. Got 1.3.3 now, same.
git pull https://github.com/netniV/plugin_routerconfigs.git remote: Counting objects: 30, done. remote: Compressing objects: 100% (17/17), done. remote: Total 30 (delta 22), reused 21 (delta 13), pack-reused 0 Unpacking objects: 100% (30/30), done. From https://github.com/netniV/plugin_routerconfigs
Maybe I'm missing a php module? But this worked for 1.3 version.
Are you still running PHP less than 5.4?
Nope, 5.4.16
On Mar 3, 2018 11:17, "netniV" notifications@github.com wrote:
Are you still running PHP less than 5.4?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/plugin_routerconfigs/issues/39#issuecomment-370133318, or mute the thread https://github.com/notifications/unsubscribe-auth/AblNWhcDXWjsgH2UX55JtuJ3AN1ae0i7ks5tal_EgaJpZM4ST3zq .
Latest pull says this is resolved. Please close if so.
Sadly is not:
[Sat Mar 03 18:32:39.956464 2018] [:error] [pid 12533] [client 192.168.1.1:62531] PHP Catchable fatal error: Argument 1 passed to plugin_routerconfigs_log() must be an instance of string, string given, called in /var/www/html/cacti/plugins/routerconfigs/router-devices.php on line 318 and defined in /var/www/html/cacti/plugins/routerconfigs/functions.php on line 813, referer: http://192.168.1.1/cacti/plugins/routerconfigs/router-devices.php?devicetype=-1&account=-1&rows=30&filter=
Ok...so I've updated to php7 and got rid of the issue. netniV, what php version are you using ?.
Can you test on php 5.4.16 to see if the problem persists?. Also, I have a devices who wont backup(I think its because i requires an extra "enter" for copy run tftp).
2018/03/03 19:09:30 - RCONFIG 172.25.232.33 (Telnet) -> Attempting to open socket to 172.25.232.33:23 2018/03/03 19:09:30 - RCONFIG 172.25.232.33 (Telnet) -> Looking for Username: 2018/03/03 19:09:32 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/03/03 19:09:32 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Sending username: rtripon 2018/03/03 19:09:33 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found Prompt (Password) 2018/03/03 19:09:33 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found prompt 'Password:', Sending password: (16 chars) 2018/03/03 19:09:33 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/03/03 19:09:33 - RCONFIG 172.25.232.33 (Telnet) -> NOTICE: Connected via telnet 2018/03/03 19:09:33 - RCONFIG 172.25.232.33 (Telnet) -> NOTICE: Already enabled, continuing 2018/03/03 19:09:33 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Prompt match (1) returned 1 matches 2018/03/03 19:09:33 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Sending confirmation: y 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Result: (0) 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Prompt match (2) returned 1 matches 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Sending a return 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: Translating "y" 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: ?Invalid host address or name 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: %Error parsing filename (Invalid IP address or hostname) 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: ra1-nou# 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: ra1-nou# 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Result: (0) 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: TFTP TRANSFER ERRORED 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: CHECKING FOR valid file at /home/cacti/ra 2018/03/03 19:09:34 - RCONFIG 172.25.232.33 (Telnet) -> ERROR: Failed to find file at /home/cacti/ra
Logs from the box:
ra1-nou#copy run tftp Address or name of remote host []? 192.168.1.1 Destination filename [ra1-nou-confg]? !! 45593 bytes copied in 6.256 secs (7288 bytes/sec) ra1-nou#Connection closed by foreign host.
Can you re-run but with the -b parameter so that it gives the buffer output. That will help me see what's being sent/received and work out if it's a configuration or code issue.
2018/03/03 19:16:08 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: Username: ▒▒ ▒▒▒▒▒▒'▒▒ 2018/03/03 19:16:08 - RCONFIG 172.25.232.33 (Telnet) -> Looking for Username: 2018/03/03 19:16:10 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/03/03 19:16:10 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Sending username: rtripon 2018/03/03 19:16:10 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: rtripon 2018/03/03 19:16:10 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:10 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: Password: 2018/03/03 19:16:10 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found Prompt (Password) 2018/03/03 19:16:10 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found prompt 'Password:', Sending password: (16 chars) 2018/03/03 19:16:11 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:11 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:11 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:11 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:11 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: ra1-nou# 2018/03/03 19:16:11 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/03/03 19:16:11 - RCONFIG 172.25.232.33 (Telnet) -> NOTICE: Connected via telnet 2018/03/03 19:16:11 - RCONFIG 172.25.232.33 (Telnet) -> NOTICE: Already enabled, continuing 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: copy run tftp://192.168.1.1/ra 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Prompt match (1) returned 1 matches 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Sending confirmation: y 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: Address or name of remote host [192.168.1.1]? y 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Result: (0) 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Prompt match (2) returned 1 matches 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Sending a return 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: Translating "y" 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: ?Invalid host address or name 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: %Error parsing filename (Invalid IP address or hostname) 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: ra1-nou# 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Buffer: ra1-nou# 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: Translating "y" 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: ?Invalid host address or name 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: %Error parsing filename (Invalid IP address or hostname) 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: ra1-nou# 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: ra1-nou# 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Result: (0) 2018/03/03 19:16:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: TFTP TRANSFER ERRORED
Turn off the confirmation. I'm not sure why it's sending that before confirming the address. I'll see if I can see anything on that front.
Yep, that worked.
2018/03/03 19:21:47 - RCONFIG 172.25.232.33 (Telnet) -> Attempting to open socket to 172.25.232.33:23 2018/03/03 19:21:47 - RCONFIG 172.25.232.33 (Telnet) -> Looking for Username: 2018/03/03 19:21:49 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/03/03 19:21:49 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Sending username: rtripon 2018/03/03 19:21:50 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found Prompt (Password) 2018/03/03 19:21:50 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found prompt 'Password:', Sending password: (16 chars) 2018/03/03 19:21:50 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/03/03 19:21:50 - RCONFIG 172.25.232.33 (Telnet) -> NOTICE: Connected via telnet 2018/03/03 19:21:50 - RCONFIG 172.25.232.33 (Telnet) -> NOTICE: Already enabled, continuing 2018/03/03 19:21:50 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Prompt match (1) returned 1 matches 2018/03/03 19:21:50 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Sending a return 2018/03/03 19:21:51 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: 2018/03/03 19:21:51 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Result: (0) 2018/03/03 19:21:51 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Prompt match (2) returned 1 matches 2018/03/03 19:21:51 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Sending a return 2018/03/03 19:21:51 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: Destination filename [ra1-nou]? 2018/03/03 19:21:51 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: 2018/03/03 19:21:51 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Result: (0) 2018/03/03 19:21:51 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Prompt match (3) returned 1 matches 2018/03/03 19:21:51 - RCONFIG 172.25.232.33 (Telnet) -> NOTICE: Sending Filename (Source): 2018/03/03 19:21:53 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/03/03 19:21:53 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: Destination filename [ra1-nou]? 2018/03/03 19:21:53 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: 2018/03/03 19:21:53 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Result: (8) 2018/03/03 19:21:53 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Prompt match (4) returned 1 matches 2018/03/03 19:21:53 - RCONFIG 172.25.232.33 (Telnet) -> NOTICE: Sending Filename (Source): 2018/03/03 19:21:55 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/03/03 19:21:55 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: Destination filename [ra1-nou]? 2018/03/03 19:21:55 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: 2018/03/03 19:21:55 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Result: (8) 2018/03/03 19:21:55 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Prompt match (5) returned 1 matches 2018/03/03 19:21:55 - RCONFIG 172.25.232.33 (Telnet) -> NOTICE: Sending Filename (Source): 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: Destination filename [ra1-nou]? 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Result: (8) 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Prompt match (6) returned 1 matches 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> NOTICE: Sending Filename (Source): 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: Destination filename [ra1-nou]? 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: !! 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: 45593 bytes copied in 6.332 secs (7200 bytes/sec) 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: ra1-nou# 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Line: 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Result: (0) 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: TFP TRANSFER SUCCESSFUL 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: CHECKING FOR valid file at /home/cacti/ra1-nou 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Attempting to open file at /home/cacti/ra1-nou 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Configuration end check successful 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Configuration Data Length 47564 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Checking backup directory exists: /home/cacti/ 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Attempting to backup to filename '/home/cacti/ra1-nou-2018-03-03-1921' 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> WARNING: Overwritting existing file '/home/cacti/ra1-nou-2018-03-03-1921' 2018/03/03 19:21:57 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Backed up 2018/03/03 19:21:57 - RCONFIG NOTICE: Download successful for ra1-nou
Anyway can the timeout be increased? I have 2 boxes with tacacs server and for unknown reasons the Username prompt appears after 3 seconds or so.
It should retry several times (10 I believe) to wait for the username response. Do you have the debug of that ?
2018/03/03 20:32:45 - RCONFIG 172.25.232.36 (Telnet) -> DEBUG: Buffer: This is a secured device. 2018/03/03 20:32:45 - RCONFIG 172.25.232.36 (Telnet) -> DEBUG: Buffer: 2018/03/03 20:32:45 - RCONFIG 172.25.232.36 (Telnet) -> DEBUG: Buffer: Unauthorized use is prohibited by law. 2018/03/03 20:32:45 - RCONFIG 172.25.232.36 (Telnet) -> DEBUG: Buffer: 2018/03/03 20:32:45 - RCONFIG 172.25.232.36 (Telnet) -> DEBUG: Buffer: If you are not authorized to access this device please disconnect. 2018/03/03 20:32:45 - RCONFIG 172.25.232.36 (Telnet) -> DEBUG: Buffer: 2018/03/03 20:32:45 - RCONFIG 172.25.232.36 (Telnet) -> Looking for Username: 2018/03/03 20:32:45 - RCONFIG 172.25.232.36 (Telnet) -> ERROR: Failed to find username prompt 2018/03/03 20:32:45 - RCONFIG ERROR: Failed to Connect to Device 'GI2' using connection type: telnet 2018/03/03 20:32:45 - RCONFIG NOTICE: Failed to download for GI2 2018/03/03 20:32:45 - RCONFIG WARNING: 0 Devices Backed Up and 1 Devices Failed in 0 seconds
OK, I've corrected this in the next version using the following patch but as I've made some other changes to the same file, this patch may not work automatically. You'll have to either wait for the next version or replicate the changes (which I would be careful doing as you have already seen how tricky it can be to get right lol).
diff --git a/functions.php b/functions.php
index 336b528..bf005ad 100644
--- a/functions.php
+++ b/functions.php
@@ -1255,48 +1255,42 @@ class PHPTelnet extends PHPConnection {
$this->Sleep();
@fputs($this->stream, $this->conn2);
- $this->Sleep();
-
- $this->GetResponse($r);
$this->Log("Looking for ".$this->devicetype['username']);
- $failed_username = stripos($r, $this->devicetype['username']) === FALSE;
- $failed_access = stripos($r, 'Access not permitted.') !== FALSE;
-
- if (!$this->stream || $failed_username || $failed_access) {
- if ($failed_username) {
- $this->Log("ERROR: Failed to find username prompt");
- }
- if ($failed_access) {
- $this->Log("ERROR: Access not permitted");
- }
- return 6;
- }
-
// Get Username Prompt
- $res = $r;
-
+ $res = '';
$x = 0;
- while ($x < 10) {
+ while ($x < 10 && $failed_username && $!failed_access) {
+ $this->Sleep();
$this->GetResponse($r);
$res .= $r;
- if (stripos($res, $this->devicetype['username']) !== FALSE) {
- break;
- } else {
- $this->Log("DEBUG: No Prompt received");
+ $failed_username = stripos($r, $this->devicetype['username']) === FALSE;
+ $failed_access = stripos($r, 'Access not permitted.') !== FALSE;
+
+ if ($failed_username && !$failed_access) {
+ $this->Log("DEBUG: No Prompt received ($x)");
@fputs($this->stream, "\r");
}
$x++;
- $this->Sleep();
}
if ($x == 10) {
return 8;
}
+ if (!$this->stream || $failed_username || $failed_access) {
+ if ($failed_username) {
+ $this->Log("ERROR: Failed to find username prompt");
+ }
+ if ($failed_access) {
+ $this->Log("ERROR: Access not permitted");
+ }
+ return 6;
+ }
+
// Send Username, wait for Password Prompt
$this->Log("DEBUG: Sending username: $this->user");
@fputs($this->stream, "$this->user\r");
Ok, so I've installed new version, and manually backups are working...but only for some devices, its pretty weird. I have 8 devices, 5 are working, 3 arent. Same configs, same user/pass, just different IP.
2018/02/26 22:16:04 - RCONFIG NOTICE: Starting automatic backup 2018/02/26 22:16:05 - RCONFIG STATS: Backup now running since 2018-02-26 22:16:04 2018/02/26 22:16:05 - RCONFIG DEBUG: SQL: SELECT * FROM plugin_routerconfigs_devices WHERE enabled = 'on' 2018/02/26 22:16:05 - RCONFIG DEBUG: Attempting download for c2960-POP-Atrium 2018/02/26 22:16:05 - RCONFIG DEBUG: Base64 decoded: a:3:{i:1421755990;i:10712997;s:8:"password";s:16:"(16: chars)";i:62731792;i:352409267;} 2018/02/26 22:16:05 - RCONFIG DEBUG: Base64 decoded: 2018/02/26 22:16:05 - RCONFIG 172.25.232.56 -> DEBUG: Attempting to connect via Telnet 2018/02/26 22:16:05 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: SSH->Connect(Server: 172.25.232.56, User: rtripon, Password: (16 chars), Enablepw: (Not Set), Devicetype: {"id":"1","name":"Cisco IOS","username":"Username:","password":"Password:","copytftp":"copy run tftp:\/\/%SERVER%\/%FILE%","version":"show version","confirm":"y","forceconfirm":"on","checkendinconfig":"on"} 2018/02/26 22:16:05 - RCONFIG 172.25.232.56 (Telnet) -> Disconnect() 2018/02/26 22:16:05 - RCONFIG 172.25.232.56 (Telnet) -> Attempting to open socked to 172.25.232.56:23 2018/02/26 22:16:06 - RCONFIG 172.25.232.56 (Telnet) -> Looking for Username: 2018/02/26 22:16:08 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:16:08 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Sending username: rtripon 2018/02/26 22:16:09 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Found Prompt (Password) 2018/02/26 22:16:09 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Found prompt 'Password:', Sending password: (16 chars) 2018/02/26 22:16:10 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:16:10 - RCONFIG 172.25.232.56 (Telnet) -> NOTICE: Connected via telnet 2018/02/26 22:16:10 - RCONFIG 172.25.232.56 (Telnet) -> NOTICE: Ensuring process is enabled 2018/02/26 22:16:12 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:16:12 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Attempt 0 of 10 to find enabled prompt 2018/02/26 22:16:13 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:16:13 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Attempt 1 of 10 to find enabled prompt 2018/02/26 22:16:13 - RCONFIG 172.25.232.56 (Telnet) -> Process is enabled 2018/02/26 22:16:13 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: CHECKING FOR valid file at /var/lib/tftpboot/c2960-POP-Atrium 2018/02/26 22:16:13 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Attempting to open file at /var/lib/tftpboot/c2960-POP-Atrium 2018/02/26 22:16:13 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Configuration end check successful 2018/02/26 22:16:14 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Configuration Data Length 8202 2018/02/26 22:16:14 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Checking backup directory exists: /var/lib/tftpboot/ 2018/02/26 22:16:14 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Attempting to backup to filename '/var/lib/tftpboot/c2960-POP-Atrium-2018-02-26-2216' 2018/02/26 22:16:14 - RCONFIG 172.25.232.56 (Telnet) -> DEBUG: Backed up 2018/02/26 22:16:14 - RCONFIG NOTICE: Download successful for c2960-POP-Atrium 2018/02/26 22:16:14 - RCONFIG DEBUG: Attempting download for Gi2 2018/02/26 22:16:14 - RCONFIG DEBUG: Base64 decoded: a:3:{i:935581429;i:6942385;s:8:"password";s:16:"(16: chars)";i:1423103999;i:907308044;} 2018/02/26 22:16:14 - RCONFIG DEBUG: Base64 decoded: 2018/02/26 22:16:14 - RCONFIG 172.25.232.36 -> DEBUG: Attempting to connect via Telnet 2018/02/26 22:16:14 - RCONFIG 172.25.232.36 (Telnet) -> DEBUG: SSH->Connect(Server: 172.25.232.36, User: rtripon, Password: (16 chars), Enablepw: (Not Set), Devicetype: {"id":"1","name":"Cisco IOS","username":"Username:","password":"Password:","copytftp":"copy run tftp:\/\/%SERVER%\/%FILE%","version":"show version","confirm":"y","forceconfirm":"on","checkendinconfig":"on"} 2018/02/26 22:16:14 - RCONFIG 172.25.232.36 (Telnet) -> Disconnect() 2018/02/26 22:16:14 - RCONFIG 172.25.232.36 (Telnet) -> Attempting to open socked to 172.25.232.36:23 2018/02/26 22:16:15 - RCONFIG 172.25.232.36 (Telnet) -> Looking for Username: 2018/02/26 22:16:15 - RCONFIG 172.25.232.36 (Telnet) -> ERROR: Failed to find username prompt 2018/02/26 22:16:15 - RCONFIG ERROR: Failed to Connect to Device 'Gi2' using connection type: telnet 2018/02/26 22:16:15 - RCONFIG NOTICE: Failed to download for Gi2 2018/02/26 22:16:15 - RCONFIG DEBUG: Attempting download for ro-ar01a-c2960S-uav 2018/02/26 22:16:15 - RCONFIG DEBUG: Base64 decoded: a:3:{i:1421755990;i:10712997;s:8:"password";s:16:"(16: chars)";i:62731792;i:352409267;} 2018/02/26 22:16:15 - RCONFIG DEBUG: Base64 decoded: 2018/02/26 22:16:15 - RCONFIG 172.25.232.55 -> DEBUG: Attempting to connect via Telnet 2018/02/26 22:16:15 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: SSH->Connect(Server: 172.25.232.55, User: rtripon, Password: (16 chars), Enablepw: (Not Set), Devicetype: {"id":"1","name":"Cisco IOS","username":"Username:","password":"Password:","copytftp":"copy run tftp:\/\/%SERVER%\/%FILE%","version":"show version","confirm":"y","forceconfirm":"on","checkendinconfig":"on"} 2018/02/26 22:16:15 - RCONFIG 172.25.232.55 (Telnet) -> Disconnect() 2018/02/26 22:16:15 - RCONFIG 172.25.232.55 (Telnet) -> Attempting to open socked to 172.25.232.55:23 2018/02/26 22:16:16 - RCONFIG 172.25.232.55 (Telnet) -> Looking for Username: 2018/02/26 22:16:18 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:16:18 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Sending username: rtripon 2018/02/26 22:16:19 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Found Prompt (Password) 2018/02/26 22:16:19 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Found prompt 'Password:', Sending password: (16 chars) 2018/02/26 22:16:20 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:16:20 - RCONFIG 172.25.232.55 (Telnet) -> NOTICE: Connected via telnet 2018/02/26 22:16:20 - RCONFIG 172.25.232.55 (Telnet) -> NOTICE: Ensuring process is enabled 2018/02/26 22:16:22 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:16:22 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Attempt 0 of 10 to find enabled prompt 2018/02/26 22:16:23 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:16:23 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Attempt 1 of 10 to find enabled prompt 2018/02/26 22:16:23 - RCONFIG 172.25.232.55 (Telnet) -> Process is enabled 2018/02/26 22:16:24 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: CHECKING FOR valid file at /var/lib/tftpboot/ro-ar01a-c2960S-uav 2018/02/26 22:16:24 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Attempting to open file at /var/lib/tftpboot/ro-ar01a-c2960S-uav 2018/02/26 22:16:24 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Configuration end check successful 2018/02/26 22:16:24 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Configuration Data Length 12895 2018/02/26 22:16:24 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Checking backup directory exists: /var/lib/tftpboot/ 2018/02/26 22:16:24 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Attempting to backup to filename '/var/lib/tftpboot/ro-ar01a-c2960S-uav-2018-02-26-2216' 2018/02/26 22:16:25 - RCONFIG 172.25.232.55 (Telnet) -> DEBUG: Backed up 2018/02/26 22:16:25 - RCONFIG NOTICE: Download successful for ro-ar01a-c2960S-uav 2018/02/26 22:16:25 - RCONFIG DEBUG: Attempting download for SW-Pecica 2018/02/26 22:16:25 - RCONFIG DEBUG: Base64 decoded: a:3:{i:935581429;i:6942385;s:8:"password";s:16:"(16: chars)";i:1423103999;i:907308044;} 2018/02/26 22:16:25 - RCONFIG DEBUG: Base64 decoded: 2018/02/26 22:16:25 - RCONFIG 172.25.232.38 -> DEBUG: Attempting to connect via Telnet 2018/02/26 22:16:25 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: SSH->Connect(Server: 172.25.232.38, User: rtripon, Password: (16 chars), Enablepw: (Not Set), Devicetype: {"id":"1","name":"Cisco IOS","username":"Username:","password":"Password:","copytftp":"copy run tftp:\/\/%SERVER%\/%FILE%","version":"show version","confirm":"y","forceconfirm":"on","checkendinconfig":"on"} 2018/02/26 22:16:25 - RCONFIG 172.25.232.38 (Telnet) -> Disconnect() 2018/02/26 22:16:25 - RCONFIG 172.25.232.38 (Telnet) -> Attempting to open socked to 172.25.232.38:23 2018/02/26 22:16:26 - RCONFIG 172.25.232.38 (Telnet) -> Looking for Username: 2018/02/26 22:16:28 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:16:28 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Sending username: rtripon 2018/02/26 22:16:29 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Found Prompt (Password) 2018/02/26 22:16:29 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Found prompt 'Password:', Sending password: (16 chars) 2018/02/26 22:16:31 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:16:31 - RCONFIG 172.25.232.38 (Telnet) -> NOTICE: Connected via telnet 2018/02/26 22:16:31 - RCONFIG 172.25.232.38 (Telnet) -> NOTICE: Ensuring process is enabled 2018/02/26 22:16:33 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:16:33 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Attempt 0 of 10 to find enabled prompt 2018/02/26 22:16:34 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:16:34 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Attempt 1 of 10 to find enabled prompt 2018/02/26 22:16:34 - RCONFIG 172.25.232.38 (Telnet) -> Process is enabled 2018/02/26 22:16:34 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: CHECKING FOR valid file at /var/lib/tftpboot/SW-Pecica 2018/02/26 22:16:34 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Attempting to open file at /var/lib/tftpboot/SW-Pecica 2018/02/26 22:16:34 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Configuration end check successful 2018/02/26 22:16:36 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:16:36 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Configuration Data Length 11831 2018/02/26 22:16:36 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Checking backup directory exists: /var/lib/tftpboot/ 2018/02/26 22:16:36 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Attempting to backup to filename '/var/lib/tftpboot/SW-Pecica-2018-02-26-2216' 2018/02/26 22:16:36 - RCONFIG 172.25.232.38 (Telnet) -> DEBUG: Backed up 2018/02/26 22:16:36 - RCONFIG NOTICE: Download successful for SW-Pecica 2018/02/26 22:16:36 - RCONFIG DEBUG: Attempting download for gi11- 2018/02/26 22:16:36 - RCONFIG DEBUG: Base64 decoded: a:3:{i:935581429;i:6942385;s:8:"password";s:16:"(16: chars)";i:1423103999;i:907308044;} 2018/02/26 22:16:36 - RCONFIG DEBUG: Base64 decoded: 2018/02/26 22:16:36 - RCONFIG 172.25.232.39 -> DEBUG: Attempting to connect via Telnet 2018/02/26 22:16:36 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: SSH->Connect(Server: 172.25.232.39, User: rtripon, Password: (16 chars), Enablepw: (Not Set), Devicetype: {"id":"1","name":"Cisco IOS","username":"Username:","password":"Password:","copytftp":"copy run tftp:\/\/%SERVER%\/%FILE%","version":"show version","confirm":"y","forceconfirm":"on","checkendinconfig":"on"} 2018/02/26 22:16:36 - RCONFIG 172.25.232.39 (Telnet) -> Disconnect() 2018/02/26 22:16:36 - RCONFIG 172.25.232.39 (Telnet) -> Attempting to open socked to 172.25.232.39:23 2018/02/26 22:16:37 - RCONFIG 172.25.232.39 (Telnet) -> Looking for Username: 2018/02/26 22:16:39 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:16:39 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Sending username: rtripon 2018/02/26 22:16:41 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Found Prompt (Password) 2018/02/26 22:16:41 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Found prompt 'Password:', Sending password: (16 chars) 2018/02/26 22:16:42 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:16:44 - RCONFIG 172.25.232.39 (Telnet) -> NOTICE: Connected via telnet 2018/02/26 22:16:45 - RCONFIG 172.25.232.39 (Telnet) -> NOTICE: Ensuring process is enabled 2018/02/26 22:16:47 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:16:47 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Attempt 0 of 10 to find enabled prompt 2018/02/26 22:16:48 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:16:48 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Attempt 1 of 10 to find enabled prompt 2018/02/26 22:16:48 - RCONFIG 172.25.232.39 (Telnet) -> Process is enabled 2018/02/26 22:16:48 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Prompt match (1) returned 1 matches 2018/02/26 22:16:48 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Sending confirmation: y 2018/02/26 22:16:50 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Result: (0), Line: 0$tp://217.156.98.102/gi11- 2018/02/26 22:16:50 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Result: (0), Line: !!!! 2018/02/26 22:16:50 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Result: (0), Line: 10460 bytes copied in 1.448 secs (7224 bytes/sec) 2018/02/26 22:16:50 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Result: (0), Line: gi11-#y 2018/02/26 22:16:50 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Result: (0), Line: 2018/02/26 22:16:50 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: TFP TRANSFER SUCCESSFUL 2018/02/26 22:16:50 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: CHECKING FOR valid file at /var/lib/tftpboot/gi11- 2018/02/26 22:16:50 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Attempting to open file at /var/lib/tftpboot/gi11- 2018/02/26 22:16:50 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Configuration end check successful 2018/02/26 22:16:51 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Configuration Data Length 10876 2018/02/26 22:16:51 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Checking backup directory exists: /var/lib/tftpboot/ 2018/02/26 22:16:51 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Attempting to backup to filename '/var/lib/tftpboot/gi11-2018-02-26-2216' 2018/02/26 22:16:51 - RCONFIG 172.25.232.39 (Telnet) -> DEBUG: Backed up 2018/02/26 22:16:51 - RCONFIG NOTICE: Download successful for gi11- 2018/02/26 22:16:51 - RCONFIG DEBUG: Attempting download for GI9 2018/02/26 22:16:51 - RCONFIG DEBUG: Base64 decoded: a:3:{i:935581429;i:6942385;s:8:"password";s:16:"(16: chars)";i:1423103999;i:907308044;} 2018/02/26 22:16:51 - RCONFIG DEBUG: Base64 decoded: 2018/02/26 22:16:51 - RCONFIG 172.25.232.47 -> DEBUG: Attempting to connect via Telnet 2018/02/26 22:16:51 - RCONFIG 172.25.232.47 (Telnet) -> DEBUG: SSH->Connect(Server: 172.25.232.47, User: rtripon, Password: (16 chars), Enablepw: (Not Set), Devicetype: {"id":"1","name":"Cisco IOS","username":"Username:","password":"Password:","copytftp":"copy run tftp:\/\/%SERVER%\/%FILE%","version":"show version","confirm":"y","forceconfirm":"on","checkendinconfig":"on"} 2018/02/26 22:16:51 - RCONFIG 172.25.232.47 (Telnet) -> Disconnect() 2018/02/26 22:16:51 - RCONFIG 172.25.232.47 (Telnet) -> Attempting to open socked to 172.25.232.47:23 2018/02/26 22:16:52 - RCONFIG 172.25.232.47 (Telnet) -> Looking for Username: 2018/02/26 22:16:52 - RCONFIG 172.25.232.47 (Telnet) -> ERROR: Failed to find username prompt 2018/02/26 22:16:52 - RCONFIG ERROR: Failed to Connect to Device 'GI9' using connection type: telnet 2018/02/26 22:16:52 - RCONFIG NOTICE: Failed to download for GI9 2018/02/26 22:16:52 - RCONFIG DEBUG: Attempting download for ro-ar01a-sw13 2018/02/26 22:16:52 - RCONFIG DEBUG: Base64 decoded: a:3:{i:935581429;i:6942385;s:8:"password";s:16:"(16: chars)";i:1423103999;i:907308044;} 2018/02/26 22:16:52 - RCONFIG DEBUG: Base64 decoded: 2018/02/26 22:16:52 - RCONFIG 172.25.232.45 -> DEBUG: Attempting to connect via Telnet 2018/02/26 22:16:52 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: SSH->Connect(Server: 172.25.232.45, User: rtripon, Password: (16 chars), Enablepw: (Not Set), Devicetype: {"id":"1","name":"Cisco IOS","username":"Username:","password":"Password:","copytftp":"copy run tftp:\/\/%SERVER%\/%FILE%","version":"show version","confirm":"y","forceconfirm":"on","checkendinconfig":"on"} 2018/02/26 22:16:52 - RCONFIG 172.25.232.45 (Telnet) -> Disconnect() 2018/02/26 22:16:52 - RCONFIG 172.25.232.45 (Telnet) -> Attempting to open socked to 172.25.232.45:23 2018/02/26 22:16:53 - RCONFIG 172.25.232.45 (Telnet) -> Looking for Username: 2018/02/26 22:16:55 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:16:55 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Sending username: rtripon 2018/02/26 22:16:56 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Found Prompt (Password) 2018/02/26 22:16:56 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Found prompt 'Password:', Sending password: (16 chars) 2018/02/26 22:16:58 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:16:58 - RCONFIG 172.25.232.45 (Telnet) -> NOTICE: Connected via telnet 2018/02/26 22:16:58 - RCONFIG 172.25.232.45 (Telnet) -> NOTICE: Ensuring process is enabled 2018/02/26 22:17:00 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:17:00 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Attempt 0 of 10 to find enabled prompt 2018/02/26 22:17:01 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:17:01 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Attempt 1 of 10 to find enabled prompt 2018/02/26 22:17:01 - RCONFIG 172.25.232.45 (Telnet) -> Process is enabled 2018/02/26 22:17:01 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Prompt match (1) returned 1 matches 2018/02/26 22:17:01 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Sending confirmation: y 2018/02/26 22:17:02 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Result: (0), Line: 0$tp://217.156.98.102/ro-ar01a-sw13 2018/02/26 22:17:02 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Result: (0), Line: !! 2018/02/26 22:17:02 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Result: (0), Line: 15961 bytes copied in 0.980 secs (16287 bytes/sec) 2018/02/26 22:17:02 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Result: (0), Line: ro-ar01a-sw13#y 2018/02/26 22:17:02 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Result: (0), Line: 2018/02/26 22:17:02 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: TFP TRANSFER SUCCESSFUL 2018/02/26 22:17:02 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: CHECKING FOR valid file at /var/lib/tftpboot/ro-ar01a-sw13 2018/02/26 22:17:02 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Attempting to open file at /var/lib/tftpboot/ro-ar01a-sw13 2018/02/26 22:17:02 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Configuration end check successful 2018/02/26 22:17:03 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Configuration Data Length 16647 2018/02/26 22:17:03 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Checking backup directory exists: /var/lib/tftpboot/ 2018/02/26 22:17:03 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Attempting to backup to filename '/var/lib/tftpboot/ro-ar01a-sw13-2018-02-26-2217' 2018/02/26 22:17:03 - RCONFIG 172.25.232.45 (Telnet) -> DEBUG: Backed up 2018/02/26 22:17:03 - RCONFIG NOTICE: Download successful for ro-ar01a-sw13 2018/02/26 22:17:03 - RCONFIG DEBUG: Attempting download for ro-ar01a-ra 2018/02/26 22:17:03 - RCONFIG DEBUG: Base64 decoded: a:3:{i:935581429;i:6942385;s:8:"password";s:16:"(16: chars)";i:1423103999;i:907308044;} 2018/02/26 22:17:03 - RCONFIG DEBUG: Base64 decoded: 2018/02/26 22:17:03 - RCONFIG 172.25.232.33 -> DEBUG: Attempting to connect via Telnet 2018/02/26 22:17:03 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: SSH->Connect(Server: 172.25.232.33, User: rtripon, Password: (16 chars), Enablepw: (Not Set), Devicetype: {"id":"1","name":"Cisco IOS","username":"Username:","password":"Password:","copytftp":"copy run tftp:\/\/%SERVER%\/%FILE%","version":"show version","confirm":"y","forceconfirm":"on","checkendinconfig":"on"} 2018/02/26 22:17:03 - RCONFIG 172.25.232.33 (Telnet) -> Disconnect() 2018/02/26 22:17:03 - RCONFIG 172.25.232.33 (Telnet) -> Attempting to open socked to 172.25.232.33:23 2018/02/26 22:17:04 - RCONFIG 172.25.232.33 (Telnet) -> Looking for Username: 2018/02/26 22:17:06 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:17:06 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Sending username: rtripon 2018/02/26 22:17:07 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found Prompt (Password) 2018/02/26 22:17:07 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found prompt 'Password:', Sending password: (16 chars) 2018/02/26 22:17:09 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:17:09 - RCONFIG 172.25.232.33 (Telnet) -> NOTICE: Connected via telnet 2018/02/26 22:17:09 - RCONFIG 172.25.232.33 (Telnet) -> NOTICE: Ensuring process is enabled 2018/02/26 22:17:11 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached 2018/02/26 22:17:11 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Attempt 0 of 10 to find enabled prompt 2018/02/26 22:17:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:17:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Attempt 1 of 10 to find enabled prompt 2018/02/26 22:17:12 - RCONFIG 172.25.232.33 (Telnet) -> Process is enabled 2018/02/26 22:17:12 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: CHECKING FOR valid file at /var/lib/tftpboot/ro-ar01a-ra 2018/02/26 22:17:12 - RCONFIG 172.25.232.33 (Telnet) -> ERROR: Failed to find file at /var/lib/tftpboot/ro-ar01a-ra 2018/02/26 22:17:13 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Found Prompt (Enabled) 2018/02/26 22:17:13 - RCONFIG NOTICE: Failed to download for ro-ar01a-ra 2018/02/26 22:17:13 - RCONFIG WARNING: 5 Devices Backed Up and 3 Devices Failed in 68 seconds 2018/02/26 22:17:13 - RCONFIG DEBUG: 5 devices backed up successfully. 2018/02/26 22:17:13 - RCONFIG DEBUG: 3 devices failed to backup. 2018/02/26 22:17:13 - RCONFIG DEBUG: These devices failed to backup 2018/02/26 22:17:13 - RCONFIG DEBUG: ------------------------------ 2018/02/26 22:17:13 - RCONFIG DEBUG: Gi2 - ERROR: Failed to Connect to Device 'Gi2' using connection type: telnet 2018/02/26 22:17:13 - RCONFIG DEBUG: GI9 - ERROR: Failed to Connect to Device 'GI9' using connection type: telnet 2018/02/26 22:17:13 - RCONFIG DEBUG: ro-ar01a-ra - ERROR: TELNET no Config uploaded from Router 2018/02/26 22:17:14 - RCONFIG STATS: Time:69.35 Downloaded:5 Failed:3
For at least 2 hosts(Gi2+Gi9) I think one issue may be the fact that the "Username" prompt appears after few seconds(due to a tacacs server prolly), and its timed out.
Looking for Username: 2018/02/26 22:17:06 - RCONFIG 172.25.232.33 (Telnet) -> DEBUG: Timeout of 1 seconds has been reached
But I dont know why the last host(ro-ar01a-ra) isnt working.