health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Health-dev] [bug #62608] health webdav not running


From: Gerald Wiese
Subject: [Health-dev] [bug #62608] health webdav not running
Date: Tue, 14 Jun 2022 09:45:23 -0400 (EDT)

Follow-up Comment #2, bug #62608 (project health):

Hey Luis,
I had to test accessing it in the browser and look at details with
journalctl.
I'm running it installed by pip in venv and called from systemd using

User=gnuhealth
ExecStart=/opt/gnuhealth/venv/bin/gnuhealth-webdav-server -c
/opt/gnuhealth/etc/trytond.conf -vv

Using "sudo journalctl -u gnuhealth_webdav" I see an OSError twice:
"OSError: Database '/opt/gnuhealth/var/lib/health.sqlite' doesn't exist!"

Then I add 'Environment="TRYTOND_CONFIG=/opt/gnuhealth/etc/trytond.conf"' to
resolve it which is strange because it's already given by -c flag.

Afterwards I see "AttributeError: type object 'MemoryCache' has no attribute
'clean'" and same with 'resets' instead of 'clean'.

So I change "Cache.resets(dbname)" to "pass" and outcomment
"Cache.clean(dbname)" in
/opt/gnuhealth/venv/lib/python3.8/site-packages/trytond/modules/health_webdav3_server/protocol.py

Now I get "NameError: name 'os' is not defined" from the same protocol.py thus
I add "import os".

Next one is KeyError: 'GNUHEALTH_VERSION' so I add 
"Environment="GNUHEALTH_VERSION=4.0.3""
to the .service file and now it's running and accessible :)

Now when I reproduced it step by step it was quite strange that sometimes I
had to access it to trigger an error and sometimes I had to restart more than
one time to see the error. Everytime having an error it was "running" and
listenning to the right port but not working. Of course I run "sudo systemctl
daemon-reload" before "sudo systemctl restart gnuhealth_webdav" when changing
the .service file.

To sum up I would still say:
- Add "import os" in health_webdav3_server/protocol.py. I don't see it in
mercurial/health/tryton/health_webdav3_server/protocol.py
- Still in the same protocol.py line 560 "Cache.resets(dbname)" and line 621
"Cache.clean(dbname)" have to be removed or changed.

The complete .service file I have now when it's running:
[Unit]
Description=GNU Health WebDAV Server
After=syslog.target
Requires=gnuhealth.service

[Service]
User=gnuhealth
ExecStart=/opt/gnuhealth/venv/bin/gnuhealth-webdav-server -vv
Environment="TRYTOND_CONFIG=/opt/gnuhealth/etc/trytond.conf"
Environment="GNUHEALTH_VERSION=4.0.3"
Restart=always
KillSignal=SIGQUIT
Type=simple
StandardError=syslog
NotifyAccess=all

[Install]
WantedBy=multi-user.target


[comment #1 comment #1:]
> Dear Gerald
> 
> Thank you for reporting!
> 
> I can't reproduce it.. are you actually executing the webdav server from the
"bin" dir (gnuhealth-webdav-server)? Notice the "os" package is there.
> 
> It seems to run OK on my box...
> 
> lfm@beastie:~/gnuhealth/tryton/server/modules/health_webdav3_server/bin $
./gnuhealth-webdav-server -vv
> 2285198 140280141563712 [2022-06-14 12:35:16,322] INFO
trytond.modules.health_webdav3_server.server using
/home/lfm/gnuhealth/tryton/server/config/trytond.conf as configuration file
> 2285198 140280141563712 [2022-06-14 12:35:16,322] INFO
trytond.modules.health_webdav3_server.server initialising distributed objects
services
> 2285198 140280141563712 [2022-06-14 12:35:16,357] INFO
trytond.modules.health_webdav3_server.server starting WebDAV protocol on
*:8080
> 


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62608>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]