9 Replies Latest reply: Aug 27, 2015 7:27 AM by Michael RSS

    Setting the Clock on Nexus5k

    Steven Williams

      What does this mean exactly?

       

      NEXUS5K001# clock set 08:42:00 21 november 2012

      Setting clock from CLI is not allowed in this VDC.

       

      How else do I set the clock?

        • 1. Re: Setting the Clock on Nexus5k
          Rick Mur

          Are you sure you have the correct rights? Ensure you have 'network-admin' rights.

          • 2. Re: Setting the Clock on Nexus5k
            Steven Williams

            NEXUS5K001# show user-account

            user:admin

                    this user account has no expiry date

                    roles:network-admin

            NEXUS5K001#

            • 3. Re: Setting the Clock on Nexus5k
              krunal

              Do you have NTP server already configured? if so then you will have to use NTP servers as time source. You can override this using

               

              clock protocol none vdc 1

              then use clock set command

               

              sho run clock_manager to verify config.

              • 4. Re: Setting the Clock on Nexus5k
                Steven Williams

                This is what I have:

                 

                ntp server 10.70.1.200 use-vrf management

                ntp source 10.70.1.200

                • 5. Re: Setting the Clock on Nexus5k
                  Steven Williams

                  i did the clock protocol ntp, and still wont sync

                   

                  ntp commit? What does this do?

                  • 6. Re: Setting the Clock on Nexus5k
                    krunal

                    Can you reach NTP server using ping? Is is from vrf management or default?

                    "ntp commit" distributes ntp configuration using CFS protocol to other switches.

                     

                    Refer to configuration guides for more info.

                     

                    http://www.cisco.com/en/US/products/ps9670/products_installation_and_configuration_guides_list.html

                    • 7. Re: Setting the Clock on Nexus5k
                      Steven Williams

                      Yes I can ping the NTP server and it is working.

                       

                      NEXUS5K001# ntp sync-retry
                      NEXUS5K001# 2009 Feb  3 16:55:29.594701 ntp: ntp_process_mts_msg: Opcode received: MTS_OPC_NTP_RETRY_REQ
                      2009 Feb  3 16:55:29.594802 ntp: Successfully sent SIGKILL to ntpd
                      2009 Feb  3 16:55:29.594899 ntp: Sending cmi response with return_code = 0x0
                      2009 Feb  3 16:55:29.594984 ntp: setting global CMI msg req to NULL
                      2009 Feb  3 16:55:29.598286 ntp: ntp_sigchld_wait_and_fetch_status: waitpid() returns with status of 27168
                      2009 Feb  3 16:55:29.598375 ntp: ntp_sigchld_wait_and_fetch_status: Got a SIGCHLD from pid : 27168
                      2009 Feb  3 16:55:29.598462 ntp: ntp_sigchld_wait_and_fetch_status: NTPD PID is 27168
                      2009 Feb  3 16:55:29.598547 ntp: ntp_sigchld_wait_and_fetch_status: Child exited due a signal, status 9
                      2009 Feb  3 16:55:29.598634 ntp: ntp_sigchld_wait_and_fetch_status: Child exited with status 0
                      2009 Feb  3 16:55:29.629003 ntp: ntp_spawn_ntpd: Command: killall ntpd failed with return code 256, errno: 4
                      2009 Feb  3 16:55:29.629101 ntp: ntp_sigchld_wait_and_fetch_status: waitpid() returns with status of -1
                      2009 Feb  3 16:55:29.629191 ntp: ntp_sigchld_wait_and_fetch_status: waitpid() failed. No child exited, Errno = 10
                      2009 Feb  3 16:55:29.631349 ntp: ntp_spawn_ntpd: Parent gets the pid of child: 0
                      2009 Feb  3 16:55:29.633428 ntp: ntp_spawn_ntpd: Parent gets the pid of child: 27177
                      2009 Feb  3 16:55:29.633537 ntp: ntp_openhost: Binding to /tmp/ntp_client_1
                      2009 Feb  3 16:55:29.633663 ntp: ntp_openhost: Opening a client unix socket successful
                      2009 Feb  3 16:55:29.644624 ntp: ntp_dohello: sendrequest, num attempts = 30
                      2009 Feb  3 16:55:29.644727 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.644814 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.654978 ntp: ntp_dohello: sendrequest, num attempts = 29
                      2009 Feb  3 16:55:29.655082 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.655169 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.665333 ntp: ntp_dohello: sendrequest, num attempts = 28
                      2009 Feb  3 16:55:29.665435 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.665522 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.675689 ntp: ntp_dohello: sendrequest, num attempts = 27
                      2009 Feb  3 16:55:29.675794 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.675880 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.686036 ntp: ntp_dohello: sendrequest, num attempts = 26
                      2009 Feb  3 16:55:29.686143 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.686227 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.696380 ntp: ntp_dohello: sendrequest, num attempts = 25
                      2009 Feb  3 16:55:29.696487 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.696572 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.706739 ntp: ntp_dohello: sendrequest, num attempts = 24
                      2009 Feb  3 16:55:29.706842 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.706924 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.717092 ntp: ntp_dohello: sendrequest, num attempts = 23
                      2009 Feb  3 16:55:29.717202 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.717289 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.727443 ntp: ntp_dohello: sendrequest, num attempts = 22
                      2009 Feb  3 16:55:29.727548 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.727631 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.737786 ntp: ntp_dohello: sendrequest, num attempts = 21
                      2009 Feb  3 16:55:29.737889 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.737975 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.748127 ntp: ntp_dohello: sendrequest, num attempts = 20
                      2009 Feb  3 16:55:29.748230 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.748317 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.758467 ntp: ntp_dohello: sendrequest, num attempts = 19
                      2009 Feb  3 16:55:29.758570 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.758658 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.768807 ntp: ntp_dohello: sendrequest, num attempts = 18
                      2009 Feb  3 16:55:29.768908 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.768992 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.779140 ntp: ntp_dohello: sendrequest, num attempts = 17
                      2009 Feb  3 16:55:29.779240 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.779326 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.789474 ntp: ntp_dohello: sendrequest, num attempts = 16
                      2009 Feb  3 16:55:29.789575 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.789658 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.799810 ntp: ntp_dohello: sendrequest, num attempts = 15
                      2009 Feb  3 16:55:29.799912 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.799998 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.810210 ntp: ntp_dohello: sendrequest, num attempts = 14
                      2009 Feb  3 16:55:29.810312 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.810398 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.820571 ntp: ntp_dohello: sendrequest, num attempts = 13
                      2009 Feb  3 16:55:29.820675 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.820758 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.830909 ntp: ntp_dohello: sendrequest, num attempts = 12
                      2009 Feb  3 16:55:29.831012 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.831097 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.841251 ntp: ntp_dohello: sendrequest, num attempts = 11
                      2009 Feb  3 16:55:29.841350 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.841434 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.851582 ntp: ntp_dohello: sendrequest, num attempts = 10
                      2009 Feb  3 16:55:29.851684 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.851773 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.861921 ntp: ntp_dohello: sendrequest, num attempts = 9
                      2009 Feb  3 16:55:29.862022 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.862105 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.872254 ntp: ntp_dohello: sendrequest, num attempts = 8
                      2009 Feb  3 16:55:29.872356 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.872441 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.882592 ntp: ntp_dohello: sendrequest, num attempts = 7
                      2009 Feb  3 16:55:29.882693 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.882778 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.892929 ntp: ntp_dohello: sendrequest, num attempts = 6
                      2009 Feb  3 16:55:29.893032 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.893118 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.903268 ntp: ntp_dohello: sendrequest, num attempts = 5
                      2009 Feb  3 16:55:29.903370 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.903453 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.913601 ntp: ntp_dohello: sendrequest, num attempts = 4
                      2009 Feb  3 16:55:29.913703 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.913788 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.923936 ntp: ntp_dohello: sendrequest, num attempts = 3
                      2009 Feb  3 16:55:29.924037 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.924120 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.934271 ntp: ntp_dohello: sendrequest, num attempts = 2
                      2009 Feb  3 16:55:29.934374 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.934458 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.944606 ntp: ntp_dohello: sendrequest, num attempts = 1
                      2009 Feb  3 16:55:29.944707 ntp: sendpkt: sendto() failed, errno = 111
                      2009 Feb  3 16:55:29.944790 ntp: ntp_dohello: Error while sending the request to NTPd, ret_val = -1
                      2009 Feb  3 16:55:29.944874 ntp: ntp_dohello: ntp_dohello through
                      2009 Feb  3 16:55:29.944959 ntp: ntp_handle_hello_sanity: Hello sanity check failed, ret_val = 1077346330, count = 1
                      2009 Feb  3 16:55:30.955229 ntp: ntp_dohello: sendrequest, num attempts = 30
                      2009 Feb  3 16:55:30.955339 ntp: Hello sanity check passed
                      2009 Feb  3 16:55:30.955428 ntp: ntp_create_un_socket: Connection with ntpd successful
                      2009 Feb  3 16:55:30.955888 ntp: getnetnum: Obtaining ip for host localhost
                      2009 Feb  3 16:55:30.956143 ntp: getnetnum: start_up_seq = 0
                      2009 Feb  3 16:55:30.956232 ntp: ntp_open_events_socket: TO BIND address 100007f
                      2009 Feb  3 16:55:30.960634 ntp: ntp_doquery: Pending data present. Receiving them
                      2009 Feb  3 16:55:30.970825 ntp: ntp_doquery: sendrequest, num attempts = 30
                      2009 Feb  3 16:55:30.970980 ntp: getnetnum: Obtaining ip for host localhost
                      2009 Feb  3 16:55:30.971200 ntp: getnetnum: start_up_seq = 0
                      2009 Feb  3 16:55:30.981365 ntp: ntp_doquery: sendrequest, num attempts = 30
                      2009 Feb  3 16:55:30.991636 ntp: ntp_doquery: sendrequest, num attempts = 30
                      2009 Feb  3 16:55:30.992030 ntp: ntp_config_source_for_sync_retry: Reconfiguring Source IP for ntp sync-retry
                      2009 Feb  3 16:55:31.002194 ntp: ntp_doquery: sendrequest, num attempts = 30
                      2009 Feb  3 16:55:31.002403 ntp: ntp_config_source_intf_for_sync_retry: Reconfiguring Source interface for ntp sync-retry
                      2009 Feb  3 16:55:31.002509 ntp: get_control_msg: Got a valid ntp control pkt

                      NEXUS5K001# show clock
                      16:56:12.110 UTC Tue Feb 03 2009
                      NEXUS5K001# 2009 Feb  3 16:56:12.110968 ntp: ntp_process_mts_msg: Opcode received: MTS_OPC_GET_CLOCK_DISPLAY_FORMAT
                      2009 Feb  3 16:56:12.111061 ntp: Received get clock display opc
                      2009 Feb  3 16:56:12.111144 ntp: Sending clock format
                      2009 Feb  3 16:56:12.111242 ntp: Sending cmi response with return_code = 0x0
                      2009 Feb  3 16:56:12.111327 ntp: setting global CMI msg req to NULL

                      • 8. Re: Setting the Clock on Nexus5k
                        Carole Warner Reece

                        Steve -

                         

                        I hope you've worked out the issue by now. I just ran into it as well, and thought I would reply in case someone else runs into this. The sympton you described is a bug in 5.2(1) NX-OS software on Nexus 5000s. See for example: https://tools.cisco.com/bugsearch/bug/CSCub52048

                         

                        You either need to remove the clock protocol with the clock protocol none command and use the clock set command, or else use NTP (or PTP) to set the clock with this bug.

                         

                        Carole

                         

                        ps - If you want more details, I wrote up a brief note as well:
                        http://www.netcraftsmen.net/blogs/entry/setting-the-clock-on-a-nexus-5k.htmll

                        • 9. Re: Setting the Clock on Nexus5k
                          Michael

                          I'm a little late to this party but I'll post it anyway in hopes that this helps someone else. I have had this problem on ten 5K's ranging from 5020's to 5596's for years. I was aware of it and chalked it up to "it will be fixed in a future release". That never came and I had some time to dig into it. Carole is correct, and thank you for the post. I wanted to elaborate on your answer just a little, because I found the problem to be a little more complicated.

                           

                          Basically, you MUST type clock protocol none and then apply clock protocol NTP  (or PTP). I tried to type clock protocol NTP without first applying the none (and it appeared to take it), but then I did a show run Nothing! I tried show run all, nothing! Not until I applied the clock protocol none, and then clock protocol NTP, did the command show up in a show run all.

                           

                          In addition, I seem to have to add more than one ntp server before the time would update correctly, even though the show ntp peer-status showed the single server being reached. Here is my final config that works for me:

                           

                          ntp server 10.10.10.1 use-vrf management

                          ntp server 10.20.10.1 use-vrf management

                          ntp server 10.30.10.1 use-vrf management

                          ntp source-interface  mgmt0

                          clock protocol ntp                            ..............(ONLY WORKS AFTER APPLYING clock protocol none)............

                          clock timezone PST -8 0

                          clock summer-time PDT 1 Sunday March 02:00 1 Sunday November 02:00 60

                           

                          I hope this helps,

                           

                          -Michael