How do I correct?

69 views
Skip to first unread message

John Clark

unread,
Aug 19, 2018, 12:48:21 AM8/19/18
to weewx-user

I can't view weewx either locally or on my website, but it still seems to ftp the info.

I think I see what I did, but I don't know how to correct it.

Aug 18 23:32:03 raspberrypi weewx[516]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Aug 18 23:32:03 raspberrypi weewx[516]: engine: Finished loading service weewx.wxservices.StdWXCalculate
Aug 18 23:32:03 raspberrypi weewx[516]: engine: Loading service weewx.engine.StdArchive
Aug 18 23:32:03 raspberrypi weewx[516]: engine: Archive will use data binding wx_binding
Aug 18 23:32:03 raspberrypi weewx[516]: engine: Record generation will be attempted in 'hardware'
Aug 18 23:32:03 raspberrypi weewx[516]: engine: Using archive interval of 300 seconds (specified in weewx configuration)
Aug 18 23:32:03 raspberrypi weewx[516]: engine: Use LOOP data in hi/low calculations: 1


/var/run/mysqld/mysqld.sock\ ?? me and my fat fingers.....

Aug 18 23:32:03 raspberrypi weewx[516]: engine: Database OperationalError exception: (2002, 'Can\'t connect to local MySQL server through socket \'/var/run/mysqld/mysqld.sock\' (2 "No such file or directory")')
Aug 18 23:32:03 raspberrypi weewx[516]:     ****  Waiting 2 minutes then retrying...


I suspect that " mysqld" is incorrect. If so, how do I fix it?

Pat

unread,
Aug 19, 2018, 7:20:52 AM8/19/18
to weewx-user
Quick guess is that your MySQL server isn't running. Try checking on it by typing sudo service mysql status, you should see somewhere in the output that it's running. If not, try sudo service mysql restart and then restart weewx and try again. 

John Clark

unread,
Aug 19, 2018, 5:25:32 PM8/19/18
to weewx-user

pi@raspberrypi:~ $ sudo service mysql status
Unit mysql.service could not be found.
pi@raspberrypi:~ $ sudo service mysql restart
Failed to restart mysql.service: Unit mysql.service not found.


pi@raspberrypi:~ $ sudo service mysqld status
Unit mysqld.service could not be found.
pi@raspberrypi:~ $ sudo service mariadb status
Unit mariadb.service could not be found.


and on the Dell that runs perfectly, I get

john@OptiPlex ~ $ sudo service mysql status
mysql start/running, process 1284
john@OptiPlex ~ $ sudo service mysqld status
mysqld: unrecognized service
john@OptiPlex ~ $ sudo service mariadb status
mariadb: unrecognized service

On 8/19/2018 9:20 AM, Pat O'Brien wrote:

I don’t have a raspberry pi with mysql installed. Try sudo service mysqld status or maybe sudo service mariadb status?

 

Also, we should probably reply on the users site so it’ll help others in future once we figure it out

 

 

From: John Clark [mailto:w0a...@gmail.com]
Sent: Sunday, August 19, 2018 8:59 AM
To: Pat <p...@obrienphoto.net>
Subject: Re: [weewx-user] Re: How do I correct?

 

I got

pi@raspberrypi:~ $ sudo service mysql status
Unit mysql.service could not be found.
pi@raspberrypi:~ $ sudo service mysql restart
Failed to restart mysql.service: Unit mysql.service not found.

--
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.
For more options, visit https://groups.google.com/d/optout.

 


Pat O'Brien

unread,
Aug 19, 2018, 6:35:22 PM8/19/18
to weewx...@googlegroups.com
Sounds like you don't have MySQL installed. Did you remove it? Or uninstall another software recently which may have removed it by mistake?

Try

sudo netstat -tulpn | grep 3306

Do you see anything?

If not may need to reinstall with 

Sudo apt-get install mariadb-server to reinstall


You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/CnkWFkpv8uw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

John Clark

unread,
Aug 19, 2018, 8:16:02 PM8/19/18
to weewx-user

Mysql was, and is installed. Went ahead and installed maria-server, restarted weewx, and got this for the syslog

pi@raspberrypi:~ $ tail -f /var/log/syslog
Aug 19 18:16:14 raspberrypi weewx[4515]:     ****    File "/home/weewx/bin/weewx/manager.py", line 127, in open_with_create
Aug 19 18:16:14 raspberrypi weewx[4515]:     ****      connection = weedb.connect(database_dict)
Aug 19 18:16:14 raspberrypi weewx[4515]:     ****    File "/home/weewx/bin/weedb/__init__.py", line 89, in connect
Aug 19 18:16:14 raspberrypi weewx[4515]:     ****      return driver_mod.connect(**db_dict)
Aug 19 18:16:14 raspberrypi weewx[4515]:     ****    File "/home/weewx/bin/weedb/mysql.py", line 57, in connect
Aug 19 18:16:14 raspberrypi weewx[4515]:     ****      database_name=database_name, engine=engine, autocommit=autocommit, **kwargs)
Aug 19 18:16:14 raspberrypi weewx[4515]:     ****    File "/home/weewx/bin/weedb/mysql.py", line 48, in guarded_fn
Aug 19 18:16:14 raspberrypi weewx[4515]:     ****      raise klass(e)
Aug 19 18:16:14 raspberrypi weewx[4515]:     ****  DatabaseError: (1698, "Access denied for user 'weewx'@'localhost'")
Aug 19 18:16:14 raspberrypi weewx[4515]:     ****  Exiting.


beginning to think of flush and reinstall. The funny thing is, when I unplug the Acurite from the Dell and plug it into the Pi, I have all these problems yet it seems it is ftp'ing to my website as there seems to be no interruptions to CWOP or my page at weather.w0avq.org and if it means anything, the radar refreshes fine but the web page doesn't update and  localhost says it doesn't exist (apache is installed and running)



On 8/19/2018 5:35 PM, Pat O'Brien wrote:
Sounds like you don't have MySQL installed. Did you remove it? Or uninstall another software recently which may have removed it by mistake?

Try

sudo netstat -tulpn | grep 3306

Do you see anything?

If not may need to reinstall with 

Sudo apt-get install mariadb-server to reinstall


On Sun, Aug 19, 2018, 5:25 PM John Clark <w0a...@gmail.com> wrote:

pi@raspberrypi:~ $ sudo service mysql status
Unit mysql.service could not be found.
pi@raspberrypi:~ $ sudo service mysql restart
Failed to restart mysql.service: Unit mysql.service not found.


pi@raspberrypi:~ $ sudo service mysqld status
Unit mysqld.service could not be found.
pi@raspberrypi:~ $ sudo service mariadb status
Unit mariadb.service could not be found.


and on the Dell that runs perfectly, I get

john@OptiPlex ~ $ sudo service mysql status
mysql start/running, process 1284
john@OptiPlex ~ $ sudo service mysqld status
mysqld: unrecognized service
john@OptiPlex ~ $ sudo service mariadb status
mariadb: unrecognized service


Thomas Keffer

unread,
Aug 19, 2018, 8:23:42 PM8/19/18
to weewx-user
This is a simple permission problem. See the User's Guide on Configuring MySQL (and Maria). In particular, pay attention to the instructions on setting permissions.

Suggestion: if you are unfamiliar with managing databases, stick with sqlite. It's a lot simpler. MySQL takes a lot more experience.

-tk

--
Reply all
Reply to author
Forward
0 new messages