Systemctl : not-found (Reason: No such file or directory)


#1

I am using Jetson-tx image on local and development mode.
The installed services are enabled apparently,

root@balena:/# systemctl list-unit-files | grep enabled
mnt-storage.mount                          enabled 
argus-daemon.service                       enabled 
autovt@.service                            enabled 
binfmt-support.service                     enabled 
getty@.service                             enabled 
isc-dhcp-server.service                    enabled 
isc-dhcp-server6.service                   enabled 
nv-l4t-usb-device-mode.service             enabled 
nv.service                                 enabled 
nvcamera-daemon.service                    enabled 
nvfb.service                               enabled 
serial-getty@.service                      enabled 
ssh.service                                enabled 
sshd.service                               enabled 
systemd-timesyncd.service                  enabled 
remote-fs.target                           enabled 
apt-daily-upgrade.timer                    enabled 
apt-daily.timer                            enabled

but it is not possible to get status or restart the services,

root@balena:/# systemctl status isc-dhcp-server.service
● isc-dhcp-server.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

root@balena:/# systemctl status mnt-storage.mount 
● mnt-storage.mount
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

root@balena:/# systemctl status apt-daily.timer
● apt-daily.timer
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

Does anyone have any feedback? thanks!


#4

Hi
can you give us some more information on what you are running on the device and in what context you are running the above commands ?
So basically what version of Balena you are running and where you are executing the above commands - in a container or on the host OS ?
Regards
Thomas


#5

@samothx
I run the command on my container( or app).
my base container is arm64v8/ros:kinetic-ros-base-xenial and it has,

ENV INITSYSTEM on
ENV DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket

OS version,

root@balena:~# cat /etc/issue.net
balenaOS 2.29.2 %h

root@balena:~# uname -a
Linux balena 4.4.38-l4t-r28.2+g174510d #2 SMP PREEMPT Fri Feb 1 01:35:29 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux 

basically, systemctl status/start/stop does not work for any service and I get the same error message.


#6

Hi Farzad, I can take a quick look at the device if you enable support access and give me the device URL


#7

@samothx
Just sent you a message


#8

HI Farzad, the short ID you send does not work for me. To be honest I am not 100% sure if I can actually see a local mode device. Please send me the full ID and I will give it another try.
Regards
Thomas


#16

Sorry about that. Just sent you the correct one.
Thanks


#19

Hi Farzad,
I received your message. By the way it is safe to openly put your device id into the forums. The device will only be accessible to support agents with admin rights in balena. Posting it openly will allow other support agents to take over while I am not on support. Support agents in balena only do about 8 hours of support a week so you better be prepared for a long wait if stick to one agent :wink:


#20

oh I see! Thanks for letting me know.
UUID:fa82d373f110cd9fcab5e55574ed3387


#27

Hi @Farzad, a little note on what Thomas just said: posting the uuid is safe, but if you enable/use Public Device URLs then sharing the uuid also means anyone could attempt connecting to that (e.g. if your device exposes something on port 80)


#33

right. it is disable. thanks


#34

About your issue @Farzad, could you tell us a bit more about what you’re trying to achieve? In general, modifying or affecting systemd services from the host is not supported and considered dangerous, but it would help us to understand what your goal is.

I’m not sure if using systemctl through dbus always works very well, but you can also use something like dbus-send to interact with systemd’s dbus API https://www.freedesktop.org/wiki/Software/systemd/dbus/ which allows you to do those same things


#35

I see. So does it mean there is no way to access systemd services from container?

  1. The mount service doesn’t work. I have posted the issue in the following link,
    Mounting SSD storage (Jetson tx2)
    I cannot get the status of the service and I cannot figure out what is wrong with that service.
  2. I need to restart networking and isc-dhcp-server. I guess I can restart isc-dhcp-server using init. how about networking? how can I restart the service?

#36

@Farzad I see - the thing is, you’re trying to talk to the host’s systemd, because you have set ENV DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket. For the storage mount, you want to do that with your container’s systemd instead, so you should remove that DBUS_SYSTEM_BUS_ADDRESS variable to let systemctl talk to the container’s systemd.

As for the DHCP server, you’re starting a server in your container, right? (Since afaik there’s no DHCP server in the host balenaOS) If that’s the case, the same DBUS address change should also fix that. What do you mean by “restart networking” though? Could you tell us a bit more about what you want to achieve wrt networking and DHCP?


#37

Hi
removed ENV DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket and still systemctl is not functional.

Fixed the issue of isc-dhcp-server by staring it via \etc\init.d and you are right we don’t really need to restart networking.
In the following post,cyplo, mentioned it might be because of not using base image.