Software > WeeWX
Instalar Sftp Raspberry
jantoni:
Pero sigo sin enterarme, será la edad *+* *+* *+* *+* *+* *+*
¿Cuando?
¿Al arrancar Weewx?
¿Con weectl? Si es con Weectl, ¿usas el sudo para ello? ¿has parado previamente weewx?
Qué haces ¿sustituyes una base de datos por otra en el directorio donde se alojan?
Ah......y el tema de los permisos.....¿lo has revisado?
Ojo.....tanto el archivo con la base de datos, así como el directorio donde se encuentra alojado deben tener los permisos correctamente establecidos.
pachu:
Lo mío también debe ser la edad *-* *-* *-*
Paro weewx y sustituyo una base por otra...
He visto en la web de Weewx para reconstruir BBDD en la versión 5.1 https://weewx.com/docs/5.1/utilities/weectl-database/
Así que he probado y por un momento funcionó todo y me cargó todos los NOAA en la web *-* *-*
--- Código: ---weectl database check
--- Fin del código ---
--- Código: ---weectl database update
--- Fin del código ---
--- Código: ---weectl database reconfigure
--- Fin del código ---
Pero solo unos minutos *+* *+* *+* pero ya con el avance el sftp me doy por contento :;
No doy con los permisos para el archivo ,no se como... :(
--- Código: ---root@raspberrypi:~# sudo systemctl status weewx
● weewx.service - WeeWX
Loaded: loaded (/lib/systemd/system/weewx.service; enabled; preset: enabled)
Active: active (running) since Tue 2024-10-29 12:27:45 CET; 8min ago
Docs: https://weewx.com/docs
Main PID: 972 (python3)
Tasks: 2 (limit: 755)
CPU: 33.758s
CGroup: /system.slice/weewx.service
└─972 python3 /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
oct 29 12:35:14 raspberrypi weewxd[972]: ERROR weewx.manager: Replace failed for database weewx.sdb: attempt to write a readonly database
oct 29 12:35:14 raspberrypi weewxd[972]: ERROR weewx.manager: Unable to add record 2024-10-29 12:35:00 CET (1730201700) to database 'weewx.sdb': attempt to write a readonly database
oct 29 12:35:18 raspberrypi weewxd[972]: INFO weewx.cheetahgenerator: Generated 9 files for report SeasonsReport in 3.79 seconds
oct 29 12:35:19 raspberrypi weewxd[972]: INFO weewx.imagegenerator: Generated 11 images for report SeasonsReport in 1.13 seconds
oct 29 12:35:19 raspberrypi weewxd[972]: INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
oct 29 12:35:20 raspberrypi weewxd[972]: INFO paramiko.transport: Connected (version 2.0, client OpenSSH_8.4p1)
oct 29 12:35:20 raspberrypi weewxd[972]: INFO paramiko.transport: Authentication (password) successful!
oct 29 12:35:20 raspberrypi weewxd[972]: INFO paramiko.transport.sftp: [chan 0] Opened sftp connection (server version 3)
oct 29 12:35:24 raspberrypi weewxd[972]: INFO paramiko.transport.sftp: [chan 0] sftp session closed.
oct 29 12:35:24 raspberrypi weewxd[972]: INFO user.sftp: sftpgenerator: transferred 20 files in 4.23 seconds
--- Fin del código ---
jantoni:
Mira este comando, tanto al fichero como al directorio
Si lo tienes en el directorio estándar
--- Código: ---ls -la /var/lib
--- Fin del código ---
--- Citar ---jantoni@virtualdebian:~$ ls -la /var/lib
total 104
drwxr-xr-x 25 root root 4096 ago 9 11:50 .
drwxr-xr-x 12 root root 4096 jul 16 12:46 ..
drwxr-xr-x 5 root root 4096 jul 16 12:48 apache2
drwxr-xr-x 5 root root 4096 oct 20 13:23 apt
drwxr-xr-x 2 root root 4096 jul 16 12:48 aspell
drwxr-xr-x 2 root root 4096 jul 16 12:48 dbus
drwxr-xr-x 2 root root 4096 jul 16 12:52 dhcp
drwxr-xr-x 5 root root 4096 jul 16 12:47 dictionaries-common
drwxr-xr-x 7 root root 4096 oct 20 13:23 dpkg
drwxr-xr-x 3 root root 4096 jul 16 12:47 emacsen-common
drwxr-xr-x 3 root root 4096 jul 16 12:49 grub
drwxr-xr-x 2 root root 4096 jul 16 12:48 ispell
drwxr-xr-x 2 root root 4096 oct 29 00:00 logrotate
drwxr-xr-x 2 root root 4096 jul 16 12:48 man-db
drwxr-xr-x 2 root root 4096 mar 29 2024 misc
drwxr-xr-x 2 root root 4096 jul 18 2022 os-prober
drwxr-xr-x 2 root root 4096 jul 16 12:48 pam
drwxr-xr-x 4 root root 4096 ago 9 11:50 php
drwx------ 2 root root 4096 jul 16 12:41 private
drwxr-xr-x 2 root root 4096 jul 16 12:46 python
-rw-r--r-- 1 root root 94 jul 16 12:41 shells.state
drwxr-xr-x 3 root root 4096 jul 16 12:56 sudo
drwxr-xr-x 10 root root 4096 jul 16 13:14 systemd
drwxr-xr-x 3 root root 4096 sep 10 09:18 ucf
drwxr-xr-x 3 root root 4096 jul 16 12:41 vim
drwxrwsr-x 2 weewx weewx 4096 oct 29 12:45 weewx
--- Fin de la cita ---
Y al fichero
--- Código: ---ls -la /var/lib/weewx/weewx.sdb
--- Fin del código ---
--- Citar ---jantoni@virtualdebian:~$ ls -la /var/lib/weewx/weewx.sdb
-rw-r--r-- 1 weewx weewx 11218944 oct 29 12:45 /var/lib/weewx/weewx.sdb
jantoni@virtualdebian:~$
--- Fin de la cita ---
Si los permisos no te salen como te he puesto, tendrás que modificarlos para que se pueda escribir en la b ase de datos.
Si no te aparecen así, di como te aparecen para decirte algo.
Otra cosa que podría pasar es que weectl no haya terminado el proceso cuando intentas arrancar weewx.
No lo he usado nunca, y menos con la 5.1
Podrías comprobarlo, por si ha quedado en segundo plano con
--- Código: ---ps aux|grep weectl
--- Fin del código ---
Y por último se me ocurre que el weectl te haya marcado la base de datos como solo lectura......pero seguro que no has utilizado la base de datos original para pasarlo por weectl, sino una copia.......me imagino
jantoni:
Ah...si por algún motivo la base de datos está marcada como solo lectura, se podría revertir.....
Creo recordar que era con el comando PRAGMA pero nunca lo he hecho, no he tenido nunca necesidad y habría que buscar documentación para ello.
En realidad una base de datos sqlite no se puede marcar como de solo lectura.....el pragma era un apaño.....y luego están los permisos, que seguro es donde está el problema
Edito.....lo he encontrado.....
PRAGMA query_only=boolean;
Pero no lo toques, a menos que sea una copia *+* *+* *+* *+* *+* *+* *+* *+* *+*
pachu:
--- Código: ---root@raspberrypi:~# ls -la /var/lib
total 192
drwxr-xr-x 47 root root 4096 oct 25 19:36 .
drwxr-xr-x 12 root root 4096 oct 25 19:27 ..
drwxrwxr-x 4 root root 4096 jul 4 02:09 AccountsService
drwxr-xr-x 2 root root 4096 oct 29 12:41 alsa
drwxr-xr-x 5 root root 4096 oct 25 19:37 apache2
drwxr-xr-x 5 root root 4096 oct 25 19:36 apt
drwxr-xr-x 2 root root 4096 jul 4 02:07 aspell
drwx------ 3 root root 4096 jul 4 02:16 bluetooth
drwxr-xr-x 3 colord colord 4096 jul 4 02:09 colord
drwxr-xr-x 2 root root 4096 jul 4 02:16 dbus
drwxr-xr-x 2 root root 4096 abr 17 2023 dhcp
drwxr-xr-x 4 root root 4096 jul 4 02:09 dictionaries-common
drwxr-xr-x 7 root root 4096 oct 25 19:37 dpkg
drwxr-xr-x 3 root root 4096 jul 4 02:07 emacsen-common
drwxr-xr-x 4 root root 4096 jul 4 02:08 ghostscript
drwxr-xr-x 2 root root 4096 feb 28 2023 git
drwxr-xr-x 2 root root 4096 mar 5 2023 hp
drwxr-xr-x 2 root root 4096 jul 4 02:07 ispell
drwxr-x--- 3 lightdm lightdm 4096 jul 4 02:17 lightdm
drwxr-xr-x 2 root root 4096 oct 29 11:03 logrotate
drwxr-xr-x 2 root root 4096 jul 4 02:06 man-db
drwxr-xr-x 2 root root 4096 mar 29 2024 misc
drwx------ 2 root root 4096 oct 29 23:08 NetworkManager
drwxr-xr-x 4 root root 4096 jul 4 02:06 nfs
drwxr-xr-x 2 root root 4096 feb 9 2023 openbox
drwxr-xr-x 2 root root 4096 oct 29 12:41 PackageKit
drwxr-xr-x 2 root root 4096 jul 4 02:06 pam
drwxr-xr-x 2 root root 4096 jul 4 02:17 plymouth
drwx------ 3 polkitd root 4096 jul 4 02:06 polkit-1
drwx------ 2 root root 4096 jul 4 02:04 private
drwxr-xr-x 2 root root 4096 jul 4 02:05 python
drwxr-xr-x 3 root root 4096 jul 4 02:06 raspberrypi
drwxr-xr-x 2 saned saned 4096 jul 4 02:09 saned
drwxr-xr-x 2 root root 4096 jul 4 02:09 sgml-base
-rw-r--r-- 1 root root 94 jul 4 02:04 shells.state
drwxr-xr-x 2 root root 4096 ene 3 2023 snmp
drwxr-xr-x 3 root root 4096 jul 4 02:06 sudo
drwxr-xr-x 11 root root 4096 jul 4 02:17 systemd
drwxr-xr-x 3 root root 4096 jul 4 02:07 ucf
drwx------ 2 root root 4096 jul 4 02:17 udisks2
drwxr-xr-x 2 root root 4096 jun 1 2022 usb_modeswitch
drwxr-xr-x 2 root root 4096 jul 4 02:09 usbutils
drwxr-xr-x 2 root root 4096 jul 4 02:29 userconf-pi
drwxr-xr-x 3 root root 4096 jul 4 02:04 vim
drwxrwsr-x 2 weewx weewx 4096 oct 29 12:27 weewx
drwxr-xr-x 2 root root 4096 jul 4 02:07 xfonts
drwxr-xr-x 2 root root 4096 oct 29 12:41 xkb
drwxr-xr-x 2 root root 4096 jul 4 02:09 xml-core
root@raspberrypi:~#
--- Fin del código ---
--- Código: ---root@raspberrypi:~# ls -la /var/lib/weewx/weewx.sdb
-rw-r--r-- 1 root weewx 58822656 oct 29 11:47 /var/lib/weewx/weewx.sdb
--- Fin del código ---
--- Código: ---root@raspberrypi:~# ps aux|grep weectl
root 2144 0.0 0.2 6108 1920 pts/0 S+ 23:28 0:00 grep weectl
--- Fin del código ---
Navegación
[#] Página Siguiente
[*] Página Anterior
Ir a la versión completa