Ok, Hopefully this is the last thing that I need help with on my rebuild. I have another server that is running MySQL and I am able to log into it with now issues. I have created an account for weewx. I have verified that I can log with that account. I have a DNS entry point to mysql. I have even tried using the IP of the MySQL server and still get the same results. Does anyone have any idea on why I can not connect to the server while running weewx?
I have attached the log and highlighted the error in red.
Thanks for all your help
Dave
ct 1 03:28:08 raspberrypi systemd[1]: Starting LSB: weewx weather system...
Oct 1 03:28:08 raspberrypi weewx[1480] INFO __main__: Initializing weewx version 4.5.1
Oct 1 03:28:08 raspberrypi weewx[1480] INFO __main__: Using Python 3.7.3 (default, Jan 22 2021, 20:04:44) #012[GCC 8.3.0]
Oct 1 03:28:08 raspberrypi weewx[1480] INFO __main__: Platform Linux-5.10.60-v7+-armv7l-with-debian-10.10
Oct 1 03:28:08 raspberrypi weewx[1480] INFO __main__: Locale is 'en_US.UTF-8'
Oct 1 03:28:08 raspberrypi weewx[1480] INFO __main__: PID file is /var/run/weewx.pid
Oct 1 03:28:08 raspberrypi weewx[1484] INFO __main__: Using configuration file /home/weewx/weewx.conf
Oct 1 03:28:08 raspberrypi weewx[1484] INFO __main__: Debug is 0
Oct 1 03:28:08 raspberrypi weewx[1484] INFO weewx.engine: Loading station type SDR (user.sdr)
Oct 1 03:28:08 raspberrypi weewx[1470]: Starting weewx weather system: weewx.
Oct 1 03:28:08 raspberrypi systemd[1]: Started LSB: weewx weather system.
Oct 1 03:28:08 raspberrypi weewx[1484] INFO user.sdr: driver version is 0.78
Oct 1 03:28:08 raspberrypi weewx[1484] INFO user.sdr: sensor map is {'outTemp': 'temperature.0010.AcuriteAtlasPacket', 'outHumidity': 'humidity.0010.AcuriteAtlasPacket', 'outBatteryStatus': 'battery.0010.AcuriteAtlasPacket', 'rain_total': 'rain_total.0010.AcuriteAtlasPacket', 'windSpeed': 'wind_speed.0010.AcuriteAtlasPacket', 'windDir': 'wind_speed.0010.AcuriteAtlasPacket'}
Oct 1 03:28:08 raspberrypi weewx[1484] INFO user.sdr: deltas is {'rain': 'rain_total', 'strikes': 'strikes_total'}
Oct 1 03:28:08 raspberrypi weewx[1484] INFO user.sdr: startup process 'sudo /usr/local/bin/rtl_433 -M utc -F json'
Oct 1 03:28:08 raspberrypi weewx[1484] INFO weewx.engine: StdConvert target unit is 0x1
Oct 1 03:28:08 raspberrypi weewx[1484] INFO user.sdr: shutdown process sudo /usr/local/bin/rtl_433 -M utc -F json
Oct 1 03:28:09 raspberrypi kernel: [ 1756.310053] r820t 12-001a: destroying instance
Oct 1 03:28:09 raspberrypi kernel: [ 1756.310646] dvb_usb_v2: 'Realtek RTL2832U reference design:1-1.1.2' successfully deinitialized and disconnected
Oct 1 03:28:28 raspberrypi weewx[1484] INFO user.sdr: timed out waiting for stderr-thread
Oct 1 03:28:31 raspberrypi kernel: [ 1779.066292] usb 1-1.1.2: dvb_usb_v2: found a 'Realtek RTL2832U reference design' in warm state
Oct 1 03:28:31 raspberrypi kernel: [ 1779.120633] usb 1-1.1.2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
Oct 1 03:28:31 raspberrypi kernel: [ 1779.120679] dvbdev: DVB: registering new adapter (Realtek RTL2832U reference design)
Oct 1 03:28:31 raspberrypi kernel: [ 1779.120699] usb 1-1.1.2: media controller created
Oct 1 03:28:31 raspberrypi kernel: [ 1779.123765] dvbdev: dvb_create_media_entity: media entity 'dvb-demux' registered.
Oct 1 03:28:31 raspberrypi kernel: [ 1779.141830] i2c i2c-11: Added multiplexed i2c bus 12
Oct 1 03:28:31 raspberrypi kernel: [ 1779.141856] rtl2832 11-0010: Realtek RTL2832 successfully attached
Oct 1 03:28:31 raspberrypi kernel: [ 1779.141950] usb 1-1.1.2: DVB: registering adapter 0 frontend 0 (Realtek RTL2832 (DVB-T))...
Oct 1 03:28:31 raspberrypi kernel: [ 1779.141984] dvbdev: dvb_create_media_entity: media entity 'Realtek RTL2832 (DVB-T)' registered.
Oct 1 03:28:31 raspberrypi kernel: [ 1779.142268] r820t 12-001a: creating new instance
Oct 1 03:28:31 raspberrypi kernel: [ 1779.149430] r820t 12-001a: Rafael Micro r820t successfully identified
Oct 1 03:28:31 raspberrypi kernel: [ 1779.163816] rtl2832_sdr rtl2832_sdr.0.auto: Registered as swradio0
Oct 1 03:28:31 raspberrypi kernel: [ 1779.163840] rtl2832_sdr rtl2832_sdr.0.auto: Realtek RTL2832 SDR attached
Oct 1 03:28:31 raspberrypi kernel: [ 1779.163854] rtl2832_sdr rtl2832_sdr.0.auto: SDR API is still slightly experimental and functionality changes may follow
Oct 1 03:28:31 raspberrypi kernel: [ 1779.176856] Registered IR keymap rc-empty
Oct 1 03:28:31 raspberrypi kernel: [ 1779.177023] rc rc0: Realtek RTL2832U reference design as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/rc/rc0
Oct 1 03:28:31 raspberrypi kernel: [ 1779.177233] rc rc0: lirc_dev: driver dvb_usb_rtl28xxu registered at minor = 0, raw IR receiver, no transmitter
Oct 1 03:28:31 raspberrypi kernel: [ 1779.177435] input: Realtek RTL2832U reference design as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/rc/rc0/input14
Oct 1 03:28:31 raspberrypi kernel: [ 1779.177840] usb 1-1.1.2: dvb_usb_v2: schedule remote query interval to 200 msecs
Oct 1 03:28:31 raspberrypi kernel: [ 1779.186235] usb 1-1.1.2: dvb_usb_v2: 'Realtek RTL2832U reference design' successfully initialized and connected
Oct 1 03:28:31 raspberrypi weewx[1484] CRITICAL __main__: Database connection exception: (2002, "Can't connect to MySQL server on 'mysql' (115)")
Oct 1 03:28:31 raspberrypi weewx[1484] CRITICAL __main__: **** Waiting 60 seconds then retrying...
Oct 1 03:28:32 raspberrypi systemd-udevd[1516]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/016d01d7b66d%24088feee0%2419afcca0%24%40gmail.com.
Yes my pi can resolve mysql. I have even tried using the IP address and still have the same issue. I have also check iptables -L and nothing is there either on the PI or mysql server.
I am successful at connecting to mysql through the CLI. So it is not a password issue
Any other ideas?
Thanks
Dave
From: weewx...@googlegroups.com <weewx...@googlegroups.com> On Behalf Of vince
Sent: Friday, October 1, 2021 11:30 AM
To: weewx-user <weewx...@googlegroups.com>
Subject: Re: [weewx-user] Weewx MySQL help
I suspect it's DNS related on the LAN. Can the raspberry resolve a host 'mysql' to the server running that ?
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/f2bda3a0-652f-4666-9304-d75e4560a82bn%40googlegroups.com.
Any other ideas?
I have attached a copy of the syslog file and weewx.conf file. Hopefully that will help decipher the issue that I am having with connecting to MySQL. I have redacted the password in the mysql section.
Litte bit more information: I am trying to make a MySQL connection. MySQL is running on Ubuntu Server 20.04 LTS. This is also a brand new server as my old server died during an upgrade
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
I am able to cli into the mysql using cli, mysql -u weewx -p. I have check iptables -L and there are no rules for the firewall. I did check both the MySQL server and the RPi and both have no firewall rules.
I have run weewx with MySQL connection in the past with no issues, but that was on a much older system.
Thanks for any information that may help get a connection to MySQL server
Thanks
Dave
From: weewx...@googlegroups.com <weewx...@googlegroups.com> On Behalf Of vince
Sent: Friday, October 1, 2021 3:27 PM
To: weewx-user <weewx...@googlegroups.com>
Subject: Re: [weewx-user] Weewx MySQL help
On Friday, October 1, 2021 at 2:23:56 PM UTC-7 dave.sp...@gmail.com wrote:
Any other ideas?
Not without seeing your weewx.conf file - see https://github.com/weewx/weewx/wiki/faq-how-to-report-a-problem and https://github.com/weewx/weewx/wiki/Help!-Posting-to-weewx-user
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web vis https://groups.google.com/d/msgid/weewx-user/ae72c99b-a72d-41bd-8b54-6933a96cd4b8n%40googlegroups.com.
Thank you everyone for helping me get my issue fixed. With everyone’s input, it lead me to look more closely at MySQL server. There were several things that I modified that made it work. I changed the binding address in mysql to the IP address of the server instead of it using 127.0.0.1. Next from what I could tell, was the password encryption that mysql was using. Once I change it back to mysql_native and recreated the user, everything connect and is now working.
Thank you so much.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/75cd921b-3f15-4ce3-99f6-13908eca5187n%40googlegroups.com.