"Failed to resolve unit specifiers in cp .. Invalid slot"

Ask questions about Arch Linux ARM. Please search before making a new topic.

"Failed to resolve unit specifiers in cp .. Invalid slot"

Postby welp » Tue Aug 21, 2018 11:48 am

Hello,

I have the following service

$this->bbcode_second_pass_code('', '/etc/systemd/system/wxdb.service
[Unit]
Description=wxdb

[Service]
Type=oneshot
ExecStart=/usr/bin/bash -c 'cp /home/weewx/archive/weewx.sdb /home/weewx/archive/wxbkp.sdb.$(date +"%F")'
ExecStart=/usr/bin/bash -c 'tar -czf /home/weewx/archive/wxbkp.$(date +"%F").tar.gz /home/weewx/archive/wxbkp.sdb.$(date +"%F")'
ExecStart=/usr/bin/bash -c 'rsync /home/weewx/archive/wxbkp.$(date +"%F").tar.gz -e ssh user@hostname:/home/db'
ExecStart=/usr/bin/bash -c 'rm /home/weewx/archive/wxbkp.sdb.$(date +"%F") /home/weewx/archive/wxbkp.$(date +"%F").tar.gz'
')

which is started by timer:

$this->bbcode_second_pass_code('', '[Unit]
Description=wxdb.service

[Timer]
OnCalendar=*-*-* 14:38:00
Persistent=true

[Install]
WantedBy=timers.target
')

I have exactly the same on two R-Pis and it worked for quite a while on R-Pi1 without a problem but it no longer does, on R-Pi2 it works as expected.

on R-Pi1 I get the following error:
$this->bbcode_second_pass_code('', '/etc/systemd/system/wxdb.service:6: Failed to resolve unit specifiers in cp /home/weewx/archive/weewx.sdb /home/weewx/archive/wxbkp.sdb.$(date +"%F"): Invalid slot

wxdb.timer: Refusing to start, unit to trigger not loaded.

Failed to start wxdb.service.')

I wonder if this has something to do with updating R-Pi1 which runs:
Linux alarmpi 4.14.52-1-ARCH #1 SMP Thu Jun 28 00:44:47 UTC 2018 armv6l GNU/Linux

whereas R-Pi2 is: Linux alarmpi 4.9.61-1-ARCH #1 SMP Sun Nov 12 00:26:55 UTC 2017 armv6l GNU/Linux

From what it seems it doesn't like something about the specified parameters but I'm really not sure what the issue is. Any clues?!
welp
 
Posts: 14
Joined: Tue Apr 15, 2014 10:26 am

Re: "Failed to resolve unit specifiers in cp .. Invalid slot

Postby TheSaint » Tue Aug 21, 2018 1:22 pm

I might need to downgrade the kernel and see.
TheSaint
 
Posts: 346
Joined: Mon Jul 23, 2018 7:57 am

Re: "Failed to resolve unit specifiers in cp .. Invalid slot

Postby welp » Tue Oct 23, 2018 7:59 pm

I'm scared to do any kernel changes and I have never done so that's why it's not an option for me.

I didn't have time to further troubleshoot the problem and now when I have attempted to run the service I see different error message without me doing absolutely no changes or package updates/modifications since I started the thread:

$this->bbcode_second_pass_code('', '# systemctl status wxdb.service
* wxdb.service - wxdb
Loaded: bad-setting (Reason: Unit wxdb.service has a bad unit file setting.)
Active: inactive (dead)')

no longer the "Invalid slot" error from before :|
welp
 
Posts: 14
Joined: Tue Apr 15, 2014 10:26 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 8 guests