You are not logged in.

#1 2018-05-16 21:52:35

Kabir
Member
From: India
Registered: 2016-12-06
Posts: 46

[Solved]The '--data' path does not exist; trying to set up taskd

Hi,

Ive been looking for some todo task applications, found taskwarrior which seems good, and now I want to set up taskd for use with Android, but when I try:

% taskd config --force client.cert $TASKDATA/client.cert.pem

I get:

ERROR: The '--data' path does not exist.

I dont understand this, because isnt the path:

% echo $TASKDATA
/var/lib/taskd

If anyone else uses taskd, any idea how to resolve this?
The steps listed in the wiki until copying the *.pem files to /var/lib/taskd didnt give any errors.

Thanks, appreciate any tips.

Last edited by Kabir (2018-05-20 16:40:48)

Offline

#2 2018-05-16 22:29:30

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,271

Re: [Solved]The '--data' path does not exist; trying to set up taskd

Wiki indicates it should be TASKD DATA (without the space) so with double D .


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#3 2018-05-16 22:41:39

Kabir
Member
From: India
Registered: 2016-12-06
Posts: 46

Re: [Solved]The '--data' path does not exist; trying to set up taskd

oh my bad!, thanks for pointing that out smile

Offline

#4 2018-05-16 23:12:42

Kabir
Member
From: India
Registered: 2016-12-06
Posts: 46

Re: [Solved]The '--data' path does not exist; trying to set up taskd

I changed the variable to TASKDDATA but it still gives the same error when I try:

taskd config --force client.cert $TASKDDATA/client.cert.pem

But when I append --data /var/lib/taskd to the taskd command it passes:

% sudo taskd config --force client.cert $TASKDDATA/client.cert.pem
[sudo] password for kabir: 
ERROR: The '--data' path does not exist.

% sudo taskd config --force client.cert $TASKDDATA/client.cert.pem --data /var/lib/taskd      
[sudo] password for kabir:                                                              
Config file /var/lib/taskd/config modified.

Why is the taskd command not working, the path seems fine now:

% echo $TASKDDATA
/var/lib/taskd

Offline

#5 2018-05-17 10:00:30

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,271

Re: [Solved]The '--data' path does not exist; trying to set up taskd

$TASKDDATA is an evironment variable and every user has their own set of environment variables.
In default setup Sudo doesn't pass any environment variables to the root account.

You could configure sudo to pass this var, but setting it systemwide is an alternative .

see https://wiki.archlinux.org/index.php/Su … _variables and https://wiki.archlinux.org/index.php/En … _variables

Last edited by Lone_Wolf (2018-05-17 10:01:24)


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#6 2018-05-18 03:17:45

Kabir
Member
From: India
Registered: 2016-12-06
Posts: 46

Re: [Solved]The '--data' path does not exist; trying to set up taskd

Thanks, $TASKDDATA seems fine now, I added it in /etc/sudoers and that error no longer shows up. However, I still cant get Taskd to work. I finished all the configurations and at the time of running task sync init I get:

% task sync init 
Please confirm that you wish to upload all your pending tasks to the Taskserver (yes/no) yes
Syncing with aries:55389

Bad CA file. Error while reading file.
Sync failed.  Could not connect to the Taskserver.

I tried syncing after running taskdctl start, as well as systemd

% taskdctl start
/usr/bin/taskdctl start: daemon started
aries [taskdctl start] ~                                                     18-05-18  8:34AM
% task sync init
Please confirm that you wish to upload all your pending tasks to the Taskserver (yes/no) yes
Syncing with aries:55389

Bad CA file. Error while reading file.
Sync failed.  Could not connect to the Taskserver.
aries [task sync init] ~

% systemctl start taskd.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
Authentication is required to start 'taskd.service'.
Authenticating as: kabir
Password: 
==== AUTHENTICATION COMPLETE ====
aries [systemctl start taskd.service] ~                                      18-05-18  8:37AM
% task sync init
Please confirm that you wish to upload all your pending tasks to the Taskserver (yes/no) yes
Syncing with aries:55389

Bad CA file. Error while reading file.
Sync failed.  Could not connect to the Taskserver.

% systemctl status taskd.service 
● taskd.service - Secure server providing multi-user, multi-client access to task data
   Loaded: loaded (/usr/lib/systemd/system/taskd.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: http://taskwarrior.org/docs/

May 18 08:10:54 aries systemd[1]: Started Secure server providing multi-user, multi-client ac>
lines 1-6/6 (END)...skipping...
● taskd.service - Secure server providing multi-user, multi-client access to task data
   Loaded: loaded (/usr/lib/systemd/system/taskd.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: http://taskwarrior.org/docs/

May 18 08:10:54 aries systemd[1]: Started Secure server providing multi-user, multi-client access to task data.

The taskd logs after starting taskd.service:

2018-05-18 02:40:54 ==== taskd 1.1.0  ====
2018-05-18 02:40:54 Serving from /var/lib/taskd
2018-05-18 02:40:54 Using address aries
2018-05-18 02:40:54 Using port 55389
2018-05-18 02:40:54 Using family IPv4
2018-05-18 02:40:54 Queue size 10 requests
2018-05-18 02:40:54 Request size limit 1048576 bytes
2018-05-18 02:40:54 IP logging on
2018-05-18 02:40:54 CA          /var/lib/taskd/ca.cert.pem
2018-05-18 02:40:54 CA Certificate not readable: '/var/lib/taskd/ca.cert.pem'

And I opened port 55389 by running:

iptables -A INPUT -p tcp --dport 55389 -j ACCEPT
iptables-save

I couldnt find the Bad CA file error anywhere in the Taskwarrior docs.. so I have no idea how to work around this issue..
All directories and sub-directories in /var/lib/taskd are owned by taskd, however the individual *.pem files are owned by root, but this shouldnt be why the certificate file is not readable right? What am I missing?

Is the port not open? Ive never done this before, opening ports and setting up servers, so maybe Im missing something trivial, because ss -lntu | grep "55389" doesnt output anything, nor can I see the port in the ss list..

Offline

#7 2018-05-18 11:33:12

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,271

Re: [Solved]The '--data' path does not exist; trying to set up taskd

It does look like a permission problem, post ls -l /var/lib/taskd/taskd

I'm not familiar with ss , but a quick check suggests it only shows ports that are actively used.
Atm the taskd server fails to start, so nothing is listening on that port.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#8 2018-05-18 22:43:30

Kabir
Member
From: India
Registered: 2016-12-06
Posts: 46

Re: [Solved]The '--data' path does not exist; trying to set up taskd

yes, youre right, so I changed all the /var/lib/taskd file permissions from root:root to taskd:taskd and now I can see the port is up and systemd shows an active status for taskd.service, but the command task sync init still gives Bad CA file error, maybe the certificate file is corrupt?

% sudo ls -l /var/lib/taskd               
total 76
-rw------- 1 taskd taskd  1952 May 18 07:50 ca.cert.pem
-rw------- 1 taskd taskd 10725 May 18 07:50 ca.key.pem
-rw------- 1 taskd taskd  1948 May 18 07:50 client.cert.pem
-rw------- 1 taskd taskd 10732 May 18 07:50 client.key.pem
-rw------- 1 taskd taskd   456 May 18 07:57 config
-rw------- 1 taskd taskd  1948 May 18 07:50 kabir_g.cert.pem
-rw------- 1 taskd taskd 10725 May 18 07:50 kabir_g.key.pem
drwx------ 3 taskd taskd  4096 May 17 06:23 orgs
-rw------- 1 taskd taskd  1948 May 18 07:50 server.cert.pem
-rw------- 1 taskd taskd  1048 May 18 07:50 server.crl.pem
-rw------- 1 taskd taskd 10722 May 18 07:50 server.key.pem
% systemctl status taskd.service
● taskd.service - Secure server providing multi-user, multi-client access to task data
   Loaded: loaded (/usr/lib/systemd/system/taskd.service; disabled; vendor preset: disabled)
   Active: active (running) since Sat 2018-05-19 02:34:11 IST; 12min ago
     Docs: http://taskwarrior.org/docs/
 Main PID: 5822 (taskd)
    Tasks: 1 (limit: 4915)
   Memory: 1.3M
   CGroup: /system.slice/taskd.service
           └─5822 /usr/bin/taskd server --data /var/lib/taskd

May 19 02:34:11 aries systemd[1]: Started Secure server providing multi-user, multi-client access to task data.

% task init sync
Please confirm that you wish to upload all your pending tasks to the Taskserver (yes/no) yes
Syncing with aries:55389

Bad CA file. Error while reading file.
Sync failed.  Could not connect to the Taskserver.

% ss -lntu | grep "55389"
tcp  LISTEN 0      10                             127.0.1.1:55389       0.0.0.0:*    

I cant think of anything else except that two warnings were sent to stdout at the time of running ./generate but the certificate files were created anyway, so I ignored the warnings:
1. which: no gnutls_certtool in (/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
2. expiration time exceeds the certificate time, something like that. I dont know why, I didnt edit the days parameter in /usr/share/doc/taskd/pki/vars, which defaults to 365

The patch in this link suggests a fix for the first warning (no gnutls) has been added to the package's git version, but I dont think the non-git package has been updated because it shows last updated in 2015, also taskd-git has been flagged out of date.

Offline

#9 2018-05-19 12:56:24

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,271

Re: [Solved]The '--data' path does not exist; trying to set up taskd

Yes, that patch looks like it is needed.
On the aur page for taskd someone else had the same error you got.
There's also a comment there from the package maintainer jck they don't use taskd actively anymore.

taskd-git also doesn't appear to be in great shape .

Updating the pkgbuild to include  a patch is not hard, but 3 years without a release is a bit long.
Do you want help with adding the patch to the PKGBUILD ?

Last edited by Lone_Wolf (2018-05-19 12:57:39)


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#10 2018-05-20 16:40:19

Kabir
Member
From: India
Registered: 2016-12-06
Posts: 46

Re: [Solved]The '--data' path does not exist; trying to set up taskd

Thanks so much for offering to help, though Im a little on the fence about using this application now that it isnt being actively maintained. I guess I'll leave it for now, and look for another cli application that syncs tasks across devices. Marking this solved. Wish i had  the know-how on maintaining packages myself..

Offline

Board footer

Powered by FluxBB