[Rezolvat] Automatizare cu Raspberry Pi 3 Model B si Arduino Mega 2560
#1
Posted 12 June 2017 - 15:52
Ziua buna,
Am o problema... destul de grava as spune. Automatizarea serei este facuta cu Arduino Mega 2560 si un Raspberyy Pi 3 Model B A mers bine, am avut indicatii si control prin internet, dar acum imi arata ca in foto de mai jos. [attachment=1893798:phpMyAdmin.jpg] [attachment=1893799:index.php.jpg] Inclin sa cred ca problema pleaca din baza de date, undeva-ceva nu se mai conecteza. Am cautat pe net si am gasit "n" solutii pe care le-am incercat dar nu am reusit. Multumesc antipicpat pentru orice sfat la obiect Edited by shogun1, 18 June 2017 - 07:39. |
#2
Posted 12 June 2017 - 16:03
#3
Posted 12 June 2017 - 16:10
Am incercat... inclusiv acea solutie.
Am arat stackoverflow si alte site-uri... dar am nevoie de un sfat pentru cineva mai putin avizat, care vine din era Windows si este la inceput de Raspbian (adica eu) |
#4
Posted 12 June 2017 - 16:46
Pe ce rula serverul mySQL?
Dintr-un anume motiv, acesta nu mai raspunde, adica fie e oprit, fie e corupt sistemul (chestie destul de comuna ca cardurile SD de pe aceste sisteme). |
#5
Posted 12 June 2017 - 16:50
1. sudo service mysql restart sau sudo service mysqld restart
2. df -h <- ce zice? 3. Ce ai pe ultimele linii de la fisierele acestea? /var/log/syslog /var/log/mysql.log /var/log/messages /var/log/mysql.err Edited by dexterash, 12 June 2017 - 16:50. |
#6
Posted 12 June 2017 - 17:18
Adm, on 12 iunie 2017 - 16:46, said:
Pe ce rula serverul mySQL? Dintr-un anume motiv, acesta nu mai raspunde, adica fie e oprit, fie e corupt sistemul (chestie destul de comuna ca cardurile SD de pe aceste sisteme). Arduino Mega 2560 Placa de retea plantata pe Mega 2560 Router TP-Link cuplat la placa de retea Raspberry Pi 3 Card 32 GB Serverul MySQL este pe Raspberry Pi 3 |
#7
Posted 12 June 2017 - 17:37
dexterash, on 12 iunie 2017 - 16:50, said:
1. sudo service mysql restart sau sudo service mysqld restart 2. df -h <- ce zice? 3. Ce ai pe ultimele linii de la fisierele acestea? /var/log/syslog /var/log/mysql.log /var/log/messages /var/log/mysql.err 1. pi@filisera:~ $ sudo service mysql restart Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details. pi@filisera:~ $ sudo service mysqld restart Failed to restart mysqld.service: Unit mysqld.service failed to load: No such file or directory. pi@filisera:~ $ 2. pi@filisera:~ $ df -h Sistem de fișiere Dimens Utilizat Liber Uz% Montat pe /dev/root 29G 5,8G 22G 22% / devtmpfs 458M 0 458M 0% /dev tmpfs 462M 43M 420M 10% /dev/shm tmpfs 462M 6,4M 456M 2% /run tmpfs 5,0M 4,0K 5,0M 1% /run/lock tmpfs 462M 0 462M 0% /sys/fs/cgroup /dev/mmcblk0p1 63M 22M 42M 35% /boot tmpfs 93M 4,0K 93M 1% /run/user/1000 pi@filisera:~ $ 3. - vezi fisiere atasate, arhivate direct din Linux |
#8
Posted 12 June 2017 - 18:59
Pare ca ai modificat o cale pe acolo.
Unit mysqld.service failed to load: No such file or directory. De obicei, problema e acolo unde ai umblat ultima oara. Ai modificat configurarea mysql? Edited by FlorinManea, 12 June 2017 - 19:10. |
#9
Posted 12 June 2017 - 19:18
Adm, on 12 iunie 2017 - 16:46, said:
Pe ce rula serverul mySQL? Dintr-un anume motiv, acesta nu mai raspunde, adica fie e oprit, fie e corupt sistemul (chestie destul de comuna ca cardurile SD de pe aceste sisteme). Sau poate routerul i-a alocat un alt ip... Verifica si asta Edited by Daniel2222, 12 June 2017 - 19:20. |
#10
Posted 12 June 2017 - 19:30
FlorinManea, on 12 iunie 2017 - 18:59, said:
Pare ca ai modificat o cale pe acolo. Unit mysqld.service failed to load: No such file or directory. De obicei, problema e acolo unde ai umblat ultima oara. Ai modificat configurarea mysql? Problema initiala a fost ca au disparut indicatiile din pagina de web... apoi a aparut mesajul dupa cum am spus Daniel2222, on 12 iunie 2017 - 19:18, said:
Sau poate routerul i-a alocat un alt ip... Verifica si asta [attachment=1893866:Ping.jpg] 192.168.1.166 este placa de retea de pe Arduino 192.168.1.200 este Raspberry Edited by Costi_68, 12 June 2017 - 19:41. |
|
#11
Posted 12 June 2017 - 20:52
Costi_68, on 12 iunie 2017 - 17:37, said:
1. pi@filisera:~ $ sudo service mysql restart Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details. pi@filisera:~ $ sudo service mysqld restart Failed to restart mysqld.service: Unit mysqld.service failed to load: No such file or directory. pi@filisera:~ $ Costi_68, on 12 iunie 2017 - 17:37, said:
2. pi@filisera:~ $ df -h Sistem de fișiere Dimens Utilizat Liber Uz% Montat pe /dev/root 29G 5,8G 22G 22% / devtmpfs 458M 0 458M 0% /dev tmpfs 462M 43M 420M 10% /dev/shm tmpfs 462M 6,4M 456M 2% /run tmpfs 5,0M 4,0K 5,0M 1% /run/lock tmpfs 462M 0 462M 0% /sys/fs/cgroup /dev/mmcblk0p1 63M 22M 42M 35% /boot tmpfs 93M 4,0K 93M 1% /run/user/1000 pi@filisera:~ $ Costi_68, on 12 iunie 2017 - 17:37, said:
3. - vezi fisiere atasate, arhivate direct din Linux Da un restart la serviciul de mySQL (cel de mai sus - service mysql restart) si vezi exact ce erori iti apar la coada fisierelor mentionate de mine. |
#12
Posted 12 June 2017 - 22:04
Intrebare rapida, poti sa te autentifici in baza de date folosind un SQL Developer sau MySQL Workbench?
Incearca inainte de orice sa vezi daca poti ajunge pe serverul de SQL si dupa mai vedem noi... Candva am avut exact problema ta la vreo 2-3 proiecte, exact acel nenorocit de 2002 mi-a mancat vreo 2 nopti pana sa-l rezolv, insa sincer nu-mi mai aduc aminte exact cum, a trecut ceva timp de atunci... |
#13
Posted 13 June 2017 - 07:30
dexterash, on 12 iunie 2017 - 20:52, said:
Le-ai trantit intr-o scarba ceva de speriat. Da un restart la serviciul de mySQL (cel de mai sus - service mysql restart) si vezi exact ce erori iti apar la coada fisierelor mentionate de mine. Parol... am descarcat fisierele exact asa cum sunt. Am facut toata treaba prin VNC ca nu aveam altfel cum sa o fac, fiiserele arhivate au iesit intr-un format de care -sincer- nu am auzit niciodata. Am dat un restart acum la mysql... astea sunt mesajele: syslog Jun 13 04:47:20 filisera /etc/init.d/mysql[17570]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in Jun 13 04:47:20 filisera /etc/init.d/mysql[17570]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed Jun 13 04:47:20 filisera /etc/init.d/mysql[17570]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Jun 13 04:47:20 filisera /etc/init.d/mysql[17570]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Jun 13 04:47:20 filisera /etc/init.d/mysql[17570]: Jun 13 04:47:20 filisera mysql[16838]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed! Jun 13 04:47:20 filisera systemd[1]: mysql.service: control process exited, code=exited status=1 Jun 13 04:47:20 filisera systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon. Jun 13 04:47:20 filisera systemd[1]: Unit mysql.service entered failed state. Jun 13 04:52:58 filisera rsyslogd-2007: action 'action 17' suspended, next retry is Tue Jun 13 04:54:28 2017 [try http://www.rsyslog.com/e/2007 ] Jun 13 04:52:58 filisera systemd[1]: Starting Session c9 of user pi. Jun 13 04:52:58 filisera systemd[1]: Started Session c9 of user pi. mysql log este fisierul gol varlog messages Jun 13 04:34:20 filisera vncserver-x11[704]: Connections: blacklist timeout expired for 217.231.253.41 Jun 13 04:34:20 filisera rsyslogd-2007: action 'action 17' suspended, next retry is Tue Jun 13 04:35:50 2017 [try http://www.rsyslog.com/e/2007 ] Jun 13 04:34:20 filisera vncserver-x11[704]: Connections: connected: 217.231.253.41::55204 Jun 13 04:34:20 filisera vncserver-x11[704]: Connections: disconnected: 217.231.253.41::55204 ([EndOfStream] Disconnection by client) Jun 13 04:39:01 filisera rsyslogd-2007: action 'action 17' suspended, next retry is Tue Jun 13 04:40:31 2017 [try http://www.rsyslog.com/e/2007 ] Jun 13 04:39:32 filisera vncserver-x11[704]: Connections: rejecting blacklisted connection: 217.231.253.41 Jun 13 04:41:44 filisera rsyslogd-2007: action 'action 17' suspended, next retry is Tue Jun 13 04:43:14 2017 [try http://www.rsyslog.com/e/2007 ] Jun 13 04:46:47 filisera rsyslogd-2007: action 'action 17' suspended, next retry is Tue Jun 13 04:48:17 2017 [try http://www.rsyslog.com/e/2007 ] Jun 13 04:52:58 filisera rsyslogd-2007: action 'action 17' suspended, next retry is Tue Jun 13 04:54:28 2017 [try http://www.rsyslog.com/e/2007 ] varlog mysql.err - fisier gol *********************** Am instalat WinScp, acum pot accesa toate fisierele de pe Raspberry direct de pe calculator 13YTe, on 12 iunie 2017 - 22:04, said:
Intrebare rapida, poti sa te autentifici in baza de date folosind un SQL Developer sau MySQL Workbench? Incearca inainte de orice sa vezi daca poti ajunge pe serverul de SQL si dupa mai vedem noi... Candva am avut exact problema ta la vreo 2-3 proiecte, exact acel nenorocit de 2002 mi-a mancat vreo 2 nopti pana sa-l rezolv, insa sincer nu-mi mai aduc aminte exact cum, a trecut ceva timp de atunci... M-am uitat la SQL Developer sau MySQL Workbench - mi-e teama ca-mi prind urechile... Spre nedumerirea mea, se pare ca ora de pe Raspberyy nu mai este cea reala (vezi inregistrarile de mai sus), asta chiar ca nu mai am idee de ce... ************************************************** Pe monitorul serial pot vedea ca Arduino munceste, nu-i blocat... [attachment=1894071:Monitorizare serial.jpg] Edited by Costi_68, 13 June 2017 - 07:38. |
#14
Posted 13 June 2017 - 10:01
Pana rezolva moderatorii cu celalalt topic... postez aici...
Am dat rebooot la Raspberry si s-a actualizat ora. De ce a aparut diferenta de fus orar... greu de spus, eu cel putin nu stiu deocamdata. OK, pe celalalt topic cu acelasi nume, am vrut sa postez tot intreg syslog si atunci s-a blocat topicul... Acum l-am atasat in format document, pentru a evita alte neplaceri. Rog un moderator sa puna impreuna cele doua topicuri, pentru a avea o logica... Multumesc si sper ca nu am cauzat neplaceri prea mari. |
#15
Posted 13 June 2017 - 11:38
dexterash, on 12 iunie 2017 - 20:52, said:
Da un restart la serviciul de mySQL (cel de mai sus - service mysql restart) si vezi exact ce erori iti apar la coada fisierelor mentionate de mine. Jun 13 12:33:02 filisera /etc/init.d/mysql[6013]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in Jun 13 12:33:02 filisera /etc/init.d/mysql[6013]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed Jun 13 12:33:02 filisera /etc/init.d/mysql[6013]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Jun 13 12:33:02 filisera /etc/init.d/mysql[6013]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Jun 13 12:33:02 filisera /etc/init.d/mysql[6013]: Jun 13 12:33:02 filisera mysql[5282]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed! Jun 13 12:33:02 filisera systemd[1]: mysql.service: control process exited, code=exited status=1 Jun 13 12:33:02 filisera systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon. Jun 13 12:33:02 filisera systemd[1]: Unit mysql.service entered failed state. |
|
#17
Posted 13 June 2017 - 11:46
dexterash, on 13 iunie 2017 - 11:42, said:
Ia fa asa: sudo service mysql stop sudo mysqld_safe Acesta este rezoltatul... pi@filisera:~ $ sudo service mysql stop pi@filisera:~ $ sudo mysqld_safe 170613 12:46:00 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect. 170613 12:46:00 mysqld_safe Logging to '/var/log/mysql/error.log'. 170613 12:46:00 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 170613 12:46:01 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended pi@filisera:~ $ |
Anunturi
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users