cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
most_ahdy
Contributor
Contributor

NV7100 python backup fail

Jump to solution

Dears,

       I have NV7100 unit with below show version output:

NV7100#show version

ADTRAN, Inc. OS version R11.2.0.E

  Mainline Version: ENM.14.50

  P4 Changelist: 144527

  Checksum: D6C65D7A

  Built on: Tue Jun  3 17:51:59 2014

  Upgrade key: dfb63d0c822b40a03c8fa00b646b57d0

Boot ROM version A2.06.B2.01

  Checksum: C9E6

  Built on: Fri Jan 20 11:09:57 2012

Copyright (c) 1999-2014, ADTRAN, Inc.

Platform: NetVanta 7100, part number 1200796E1

Serial number LBADTN1032AK294

Flash: 33554432 bytes  DRAM: 134217728 bytes

NV7100 uptime is 0 days, 6 hours, 52 minutes, 2 seconds

slot 0, DSP 1

  DSP software version: G2.R10.8.M.4b

  DSP hardware version: Freescale MSC7119

  Total channels: 30

System returned to ROM by Software Watchdog

Current system image file is "CFLASH:/NV7100A-R11-2-0-E.biz"

Primary boot system image file is "CFLASH:/NV7100A-R11-2-0-E.biz"

Backup boot system image file is "NV7100A-A4-10-00-E.biz"

Primary system configuration file is "startup-config"

NV7100#

I am trying to backup unit using the Python script:

I entered the right data in backup menu of NV7100 , then download the script at the PC "windows server 2012 R2" with Python 2.7.3 run on it.

Then run the script, but it failed to connect to 7100 with the below error appear on the terminal , although when I tried to connect to the 7100 with FTP client from the same server with the same credential of the script it can reach to 7100 normally.

C:\Windows\system32>c://python27/python D:\Configuration\NV7100Misrtech\backup-NV7100.py

Processing your request.

Logging into 7100 using:

       IP: aa.bb.cc.dd

Username: admin

Password: **************

  Archive: zip

Traceback (most recent call last):

  File "D:\Configuration\NV7100Misrtech\backup-NV7100.py", line 466, in <module>

    main()

  File "D:\Configuration\NV7100Misrtech\backup-NV7100.py", line 314, in main

    f = urllib2.urlopen('https://%s/dbutil' % ip, urllib.urlencode(query))

  File "c:\python27\lib\urllib2.py", line 126, in urlopen

    return _opener.open(url, data, timeout)

  File "c:\python27\lib\urllib2.py", line 400, in open

    response = self._open(req, data)

  File "c:\python27\lib\urllib2.py", line 418, in _open

    '_open', req)

  File "c:\python27\lib\urllib2.py", line 378, in _call_chain

    result = func(*args)

  File "c:\python27\lib\urllib2.py", line 1215, in https_open

    return self.do_open(httplib.HTTPSConnection, req)

  File "c:\python27\lib\urllib2.py", line 1177, in do_open

    raise URLError(err)

urllib2.URLError: <urlopen error [Errno 10060] A connection attempt failed because the connected party did not properly

respond after a period of time, or established connection failed because connected host has failed to respond>


Thanks,

Mostafa Aly

0 Kudos
1 Solution

Accepted Solutions

Re: NV7100 python backup fail

Jump to solution

I got the cause of this issue , the problem was that the server IP address is only permitted to access FTP and ping of the NV7100 , and HTTP and HTTPS access is blocked my an access rule in NV7100 , I enabled them and every thing is ok now.

Thanks all for your help.

View solution in original post

0 Kudos
15 Replies
jayh
Honored Contributor
Honored Contributor

Re: NV7100 python backup fail

Jump to solution

This sounds like a potential issue with your Python script, not  the Adtran device.  Potential options:

RANCID http://www.shrubbery.net/rancid/  has a powerful Adtran backup utility (also does Cisco, which was its original intent).  Free, runs on Linux/UNIX.

AOS/N-Command (Adtran server and software).  Not free, does backup and a lot more.

CRON job to pull config periodically.

Anonymous
Not applicable

Re: NV7100 python backup fail

Jump to solution

Mostafa,

Were you able to resolve this?  We have a document that covers this process here: Performing NetVanta 7060/7100 Backup via FTP

Thanks,

Matt

Re: NV7100 python backup fail

Jump to solution

Thanks Matt for your reply, but I need to perform this backup using python to be automatically and periodically.

Anonymous
Not applicable

Re: NV7100 python backup fail

Jump to solution

You might be interested in this feature request submitted by another user:

If you agree with it, make sure to vote it up.

Thanks,

Matt

Anonymous
Not applicable

Re: NV7100 python backup fail

Jump to solution

The NetVanta 7100 can generate a Python script.  Go to Utilities > Backup and you should see the options and additional instructions:

backup.jpg

Thanks,

Matt

Re: NV7100 python backup fail

Jump to solution

The backup instruction that involved in this feature request, backup only the running-config , but I think that the running-config is not enough to backup the 7100 configuration, because I tried this before , and it only backup very few configuration of the 7100, and this did not contain the VOIP configuration , am I right?

So what I want to do is to backup the whole files in flash and cflash periodically and I want it to be automatically, and I think it is available using the python script in 7100, but it did not work with me as I mentioned in my first post.

Thanks,

Mostafa Aly

Re: NV7100 python backup fail

Jump to solution

I tried this as I mentioned in my first post and it did not work

Anonymous
Not applicable

Re: NV7100 python backup fail

Jump to solution

You may have tried this already, but if not could you see if you can FTP out any file from the 7100 using the login credentials and path specified by the python script. I see no reason for it to fail like it is.

Re: NV7100 python backup fail

Jump to solution

Yes, I tried to ftp to my 7100 box from the same server where the python script run , with the same credential as in the python script generated from NV7100,

I received the below error when run the script:

C:\Windows\system32>c://python27/python D:\Configuration\NV7100Misrtech\backup-NV7100.py

Processing your request.

Logging into 7100 using:

       IP: aa.bb.cc.dd

Username: admin

Password: **************

  Archive: zip

Traceback (most recent call last):

  File "D:\Configuration\NV7100Misrtech\backup-NV7100.py", line 466, in <module>

    main()

  File "D:\Configuration\NV7100Misrtech\backup-NV7100.py", line 314, in main

    f = urllib2.urlopen('https://%s/dbutil' % ip, urllib.urlencode(query))

  File "c:\python27\lib\urllib2.py", line 126, in urlopen

    return _opener.open(url, data, timeout)

  File "c:\python27\lib\urllib2.py", line 400, in open

    response = self._open(req, data)

  File "c:\python27\lib\urllib2.py", line 418, in _open

    '_open', req)

  File "c:\python27\lib\urllib2.py", line 378, in _call_chain

    result = func(*args)

  File "c:\python27\lib\urllib2.py", line 1215, in https_open

    return self.do_open(httplib.HTTPSConnection, req)

  File "c:\python27\lib\urllib2.py", line 1177, in do_open

    raise URLError(err)

urllib2.URLError: <urlopen error [Errno 10060] A connection attempt failed because the connected party did not properly

respond after a period of time, or established connection failed because connected host has failed to respond>

Anonymous
Not applicable

Re: NV7100 python backup fail

Jump to solution

Could you verify if "https" access is turned on your 7100? Just looking through the error logs it seems the "https"  urlopen function failed.

Re: NV7100 python backup fail

Jump to solution

Yes, Https server is turned on in 7100 device.

Anonymous
Not applicable

Re: NV7100 python backup fail

Jump to solution

I talked to one more person about it and he has suggested that you make sure that https access is enabled on the default port number. This HTTPS connection is used by the script to verify that FTP is enabled and reachable.

In his opinion, the only other thing that can go wrong is that you may have accidently entered incorrect parameters into the IP Address, Username, and Password fields. As a note the IP address field does not need to have the /admin suffix.

If this doesn't help either then I recommend you reach out to tech support for help, OR, investigate if you can use your Python installation to open sockets to other web sites. It may be that some firewall or networking issue within your installation is preventing access.

Re: NV7100 python backup fail

Jump to solution

The https access is enabled on the default port number , I reviewed the parameter once again and all things are ok.

I may try this python installation to other web sites , but it is the first time I use python so I may have difficulties to test it.

Anonymous
Not applicable

Re: NV7100 python backup fail

Jump to solution

most_ahdy,

     Might sound stupid but have you verified there is no firewall on the server blocking the connections?  Try in a web browser on the server accessing https://aa.bb.cc.dd and verify the Adtran login opens up, then copy and paste the user name and password from your script and verify it logs in.  If any of these fail you have the starting point to troubleshoot with.  If they work then you will need to check your Python install to ensure it has all the proper libraries installed and that those libraries have proper permissions to run.  You may also have to run the script as an Administrator on the server.

John Wable

P.S.

      It could be because the Certificate on the 7100 is self signed, you may have to do an additional step somewhere to allow the self signed cert to work.

Re: NV7100 python backup fail

Jump to solution

I got the cause of this issue , the problem was that the server IP address is only permitted to access FTP and ping of the NV7100 , and HTTP and HTTPS access is blocked my an access rule in NV7100 , I enabled them and every thing is ok now.

Thanks all for your help.

0 Kudos