What do you mean by this exactly? Normally you set a timezone relative to UTC.Nathan.Rivard wrote: ↑Thu Oct 03, 2019 4:32 pmI have already set the time zone as being relative to the Chicago timezone
Code: Select all
timedatectl
Code: Select all
Local time: Thu 2019-10-03 06:34:24 CDT
Universal time: Thu 2019-10-03 11:34:24 UTC
RTC time: n/a
Time zone: America/Chicago (CDT, -0500)
System clock synchronized: no
NTP service: inactive
RTC in local TZ: no
Code: Select all
ping 8.8.8.8
ping google.com
When I do that I getAndyroo wrote: ↑Thu Oct 03, 2019 8:54 pmDoes your Pi have internet connection correctly set up?
What happens if youCode: Select all
ping 8.8.8.8 ping google.com
Code: Select all
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
102 packets transmitted, 0 received, 100% packet loss, time 124ms
If a ping to 8.8.8.8 fails, it's clear there is no functional connection to the internet.knute wrote: ↑Mon Oct 07, 2019 8:13 pmIt looks like a DNS problem. The output from timedatectl shows not synced. No return from the google.com ping. All symptoms of DNS not working correctly.
You might post the last 15 or so lines of /etc/dhcpcd.conf if you are using a static IP.
If you are using dhcp then: cat /var/run/dnsmasq/resolv.conf.
Or maybe you aren't on line at all?
I am able to connect to google/anything on the web browser as well as transfer files to a remote computer on the VNC Server. The last 15 lines of the /etc/dhcpcd.conf arelpsw wrote:[/code]ime=1570480122 user_id=152029]If a ping to 8.8.8.8 fails, it's clear there is no functional connection to the internet.knute wrote: ↑Mon Oct 07, 2019 8:13 pmIt looks like a DNS problem. The output from timedatectl shows not synced. No return from the google.com ping. All symptoms of DNS not working correctly.
You might post the last 15 or so lines of /etc/dhcpcd.conf if you are using a static IP.
If you are using dhcp then: cat /var/run/dnsmasq/resolv.conf.
Or maybe you aren't on line at all?
Code: Select all
# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private
# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1
# fallback to static profile on eth0
#interface eth0
#fallback static_eth0
Code: Select all
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
Well that worked perfectly thank you so muchpcmanbob wrote: ↑Tue Oct 08, 2019 4:02 pmWhat happens if you try running this from command line ?
does it set the correct time and date for you ?Code: Select all
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
and does the pi then keep the correct time and date ?
I was wrong, it worked until the pi crashed while running a python program for a few hours. It is now 20 min behindNathan.Rivard wrote: ↑Tue Oct 08, 2019 4:45 pmWell that worked perfectly thank you so muchpcmanbob wrote: ↑Tue Oct 08, 2019 4:02 pmWhat happens if you try running this from command line ?
does it set the correct time and date for you ?Code: Select all
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
and does the pi then keep the correct time and date ?
Seeing the OP was able to set the time with the command I suggested which used Google to get the current time I would think the pi has a working internet connection.
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
102 packets transmitted, 0 received, 100% packet loss, time 124ms
Yes the information provided by the OP is very confusing , says the ping 8.8.8.8 does not work yet he can surf the web and the command to set the time using information from google.com works.
They may not be mutually exclusive if there's a firewall blocking ICMP/IP.