Varying-Vagrant-Vagrants / VVV

An open source Vagrant configuration for developing with WordPress
https://varyingvagrantvagrants.org
MIT License
4.54k stars 848 forks source link

BUG: ntpdate[584]: Can't adjust the time of day: Operation not permitted #2649

Closed abder closed 1 year ago

abder commented 1 year ago

Are you using the latest stable or develop branch version of VVV?

Yes (develop)

Is it a new VVV or an existing VVV that used to work?

Existing, worked but now broken

Whats the problem?

I keep getting the following error when creating the VM using vagrant up

ntpdate[584]: Can't adjust the time of day: Operation not permitted

I tried to run the command with sudo and that didn't work either

I have also fixed the date and time in the virtual machine manually following this tutorial, and that didn't work either.

Any ideas?

http://blog.peschla.net/2011/09/trouble-with-ntpdate/

How do we reproduce it?

Just try to setup vvv in mac M1

VVV Status screen

ntpdate[584]: Can't adjust the time of day: Operation not permitted

Which Operating System are you using?

Apple MacOS (Arm/Apple Silicon)

Which provider are you using?

Parallels (Apple Silicon/Arm)

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the issue template and include your OS/Vagrant/VVV versions! Don't forget you can get support in the VVV slack at https://varyingvagrantvagrants.org/docs/en-US/slack/

VVV
VVV Slack Workspace
Join the VVV Slack Workspace
tomjn commented 1 year ago

Hello!

I see you didn’t include the VVV status screen and you heavily censored the terminal output to a single line removing all the context. Can you edit your issue to contain the information it asked for in full?

On Tue, 3 Jan 2023 at 11:19, welcome[bot] @.***> wrote:

Thanks for opening your first issue here! Be sure to follow the issue template and include your OS/Vagrant/VVV versions! Don't forget you can get support in the VVV slack at https://varyingvagrantvagrants.org/docs/en-US/slack/

https://camo.githubusercontent.com/3e970fd174a8f4e54062348f83e134cf11c6b25afa60b92657e2a52794f87a2d/68747470733a2f2f76617279696e6776616772616e7476616772616e74732e6f72672f696d616765732f7676762e706e67 http:///images/vvv.png VVV VVV Slack Workspace https://varyingvagrantvagrants.org/docs/en-US/slack/ Join the VVV Slack Workspace

— Reply to this email directly, view it on GitHub https://github.com/Varying-Vagrant-Vagrants/VVV/issues/2649#issuecomment-1369652898, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOLZYVLEKVSF2SN75OP23WQQDKLANCNFSM6AAAAAATPSTDHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

tomjn commented 1 year ago

http://blog.peschla.net/2011/09/trouble-with-ntpdate/

did you try any of these commands? There are multiple places with the ntpupdate command and it's not possible to tell where it happened with such limited output.

I also can't confirm which version of VVV you're on as you didn't share the VVV splash with the commit hash or the version number, and all the other debug data

Jonas' weblog – Trouble with ntpdate: „Can’t adjust the time of day“
tomjn commented 1 year ago

Also you said you were using an existing VM that used to work but is now broken, but then said that you were trying to create a VM, did you skip most of the questions in the issue template?

tomjn commented 1 year ago

@douara I've checked all the places we use ntpdate and they all have checks that print messages if they fail then continue with provisioning.

So this should not be breaking provisioning, we need more information!

They all take this form:

if [ -x "$(command -v ntpdate)" ]; then
    echo " * Syncing clocks"
    if sudo ntpdate -u ntp.ubuntu.com; then
        echo " * clocks synced"
    else
        vvv_warn " - clock synchronisation failed"
    fi
else
    echo " - skipping ntpdate clock sync, not installed yet"
fi

Are you sure this is the actual problem? Or is this just something you saw during provisioning that you're reporting? Or the last thing that popped up in the terminal before the actual problem occurred?

tomjn commented 1 year ago

Tests here suggest the check is working fine too:

❯ if sudo ntpdate -u ntp.ubuntu.com; then echo "yes"; else echo "nay"; fi
Password:
sudo: ntpdate: command not found
nay

That was run on MacOS so ntpdate isn't present, so the use of sudo isn't throwing it off

tomjn commented 1 year ago

Closing as the reporter has not responded and I can't reproduce the error without downgrading VVV to an older version