Jump to content

Dbus error when using systemctl


falcon03

Recommended Posts

Hi,

 

I am using Armbian_jessie_4.5 with kernel 4.3.x on a Banana pi. When entering any systemctl related command, I get the  following error:

 

Failed to get D-Bus connection: Unknown error -1

 
Any idea on what the problem might be? It's a fresh install.
Link to comment
Share on other sites

as igor's are saying, it seems I should do modify the setenv of /boot/boot.cmd.

 

In the case of cubietruck

setenv bootargs "init=/bin/systemd console=tty1 root=/dev/sda1 rootwait rootfstype=ext4 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 loglevel=1"

to re-start it to regenerate the boot.scr

mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
Link to comment
Share on other sites

Hi! After applying this I'm getting the following:

 

 

systemctl status ramlog.service 
â— ramlog.service - LSB: moves /var/log into ramdisk
   Loaded: loaded (/etc/init.d/ramlog)
   Active: failed (Result: exit-code) since Thu 2015-11-05 13:54:52 CET; 1min 48s ago
  Process: 444 ExecStart=/etc/init.d/ramlog start (code=exited, status=102)

If I understand well, the only thing that's happening is a script in init.d that no longer moves the logs to ramdisk. Can I port the script to systemd and remove the current one?

I like to keep a "clean" log.

 

Thank you so much Igor, I looked for a long time for a debian jessie for my cubie :)

Link to comment
Share on other sites

@veribaka

You can try to port it with settings like these:

[Unit]
DefaultDependencies=no
Before=systemd-journald.service

[Service]
...

[Install]
WantedBy=local-fs.target

You don't need to remove existing script, systemd service unit with same name (ramlog.service) will have priority over init script.

Also settings like these in [service] section may be required

Type=oneshot
RemainAfterExit=yes
Link to comment
Share on other sites

How come systemd is disabled ? kinda the point with Jessie is the switch to systemd instead of sysvinit

There were issues with systemd (please read this message and check first 2 links in it)

 

It is fixed now, but there were no new images that include that fix.

If you are using latest Armbian (or recent self-compiled) kernel (version 4.3.3 or higher), you can revert to systemd by installing 2 packages: fake-hwclock and systemd-sysv

Link to comment
Share on other sites

There were issues with systemd (please read this message and check first 2 links in it)

 

It is fixed now, but there were no new images that include that fix.

If you are using latest Armbian (or recent self-compiled) kernel (version 4.3.3 or higher), you can revert to systemd by installing 2 packages: fake-hwclock and systemd-sysv

that explains why i got that message then

Link to comment
Share on other sites

Hello,

 

So if I sum things up, we have to follow these steps with super user rights:

 

# Disable ramlog

$ service ramlog disable

 

# Install necessary packages for systemd

$ apt-get update && apt-get install fake-hwclock systemd-sysv

 

# Backup old working boot.cmd and boot.scr files

$ cp /boot/boot.cmd /boot/boot.cmd.nosystemd

$ cp /boot/boot.cmd /boot/boot.scr.nosystemd

 

# Edit boot.cmd to insert 'init=/bin/systemd' at the first arg of bootargs

$ nano /boot/boot.cmd

setenv bootargs "init=/bin/systemd console=tty1 (...)"

 

# Recompile boot script

$ mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

 

# Reboot

reboot

 

For me that worked :)

 

Maybe we could add this in the main docs http://www.armbian.com/documentation/ ?

Link to comment
Share on other sites

# Backup old working boot.cmd and boot.scr files

$ cp /boot/boot.cmd /boot/boot.cmd.nosystemd

$ cp /boot/boot.cmd /boot/boot.scr.nosystemd

 

# Edit boot.cmd to insert 'init=/bin/systemd' at the first arg of bootargs

$ nano /boot/boot.cmd

setenv bootargs "init=/bin/systemd console=tty1 (...)"

 

# Recompile boot script

$ mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

If you installed systemd-sysv, you don't need to edit boot script (though it doesn't break anything).

Link to comment
Share on other sites

i installed systemd as described above (not edited the boot script).

it worked for sytemctl.

when i did an apt-get upgrade i get the error

Setting up rsyslog (8.4.2-1+deb8u2) ...
insserv: Service ramlog has to be enabled to start service rsyslog
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package rsyslog (--configure):
 subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

is this related? how to fix it? what is the effect?

 

thank you for a very good system!

Link to comment
Share on other sites

thank you for the quick help! - the error is not possible to ignore: i cannot install other packages while the error in apt-get persists. could you help me to clear it?

 

i tried apt-get remove ramlog

but get the following error:

Removing ramlog (2.0.0) ...
[....] Disabling ramlog...insserv: script ramlog.uninst: service ramlog already provided!
rsync: change_dir "/var/log.hdd" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]
 failed!
dpkg: error processing package ramlog (--remove):
 subprocess installed post-removal script returned error exit status 23
Errors were encountered while processing:
 ramlog
E: Sub-process /usr/bin/dpkg returned an error code (1)
 

(apt-get purge gives the same). the error persists.

do i have to reinstall rsyslog afterwards?

Link to comment
Share on other sites

dpkg: error processing package ramlog (--remove):

 subprocess installed post-removal script returned error exit status 23

You'll probably need to manually edit /var/lib/dpkg/info/ramlog.postrm, and insert "exit 0" on a first line (or comment out all lines in file), after that it should remove fine.

 

 

do i have to reinstall rsyslog afterwards?

No, just reboot after you uninstalled ramlog

Link to comment
Share on other sites

i did edit the ramlog.postrm as per your instructions - this worked. now i am stuck with the pending install of rsyslog:

Removing ramlog (2.0.0) ...
Setting up rsyslog (8.4.2-1+deb8u2) ...
insserv: Service ramlog has to be enabled to start service rsyslog
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package rsyslog (--configure):
 subprocess installed post-installation script returned error exit status 1

 

do i need rsyslog? i can remove it. and then reinstall it, but i get the message:

Setting up rsyslog (8.4.2-1+deb8u2) ...
insserv: script ramlog: service ramlog already provided!
Processing triggers for systemd (215-17+deb8u3) ...

 

is this ok (after i have removed ramlog!)

 

Link to comment
Share on other sites

Thank you all for this topic!

 

I was going crazy because of this error message... could not find the reason! Now it works :)

 

Some errors are normal since RAMlog is not compatible ... the question is - was ramlog removed after reboot?

Do you already know when the new ARMBian with SystemD will be released? :)

Link to comment
Share on other sites

root@cubieboard2:/home# sudo dpkg -r ramlog
(Reading database ... 49912 files and directories currently installed.)
Removing ramlog (2.0.0) ...
[....] Disabling ramlog...insserv: script ramlog.uninst: service ramlog already provided!
rsync: change_dir "/var/log.hdd" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]
 failed!
dpkg: error processing package ramlog (--remove):
 subprocess installed post-removal script returned error exit status 23
Errors were encountered while processing:
 ramlog

:(

 

after reboot 

 apt-get install rsyslog
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  rsyslog-mysql rsyslog-pgsql rsyslog-mongodb rsyslog-doc rsyslog-gnutls rsyslog-gssapi rsyslog-relp
The following NEW packages will be installed:
  rsyslog
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/505 kB of archives.
After this operation, 1,268 kB of additional disk space will be used.
Selecting previously unselected package rsyslog.
(Reading database ... 48906 files and directories currently installed.)
Preparing to unpack .../rsyslog_8.4.2-1+deb8u2_armhf.deb ...
Unpacking rsyslog (8.4.2-1+deb8u2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for systemd (215-17+deb8u4) ...
Setting up rsyslog (8.4.2-1+deb8u2) ...

Configuration file '/etc/init.d/rsyslog'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** rsyslog (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/init.d/rsyslog ...
insserv: script ramlog.uninst: service ramlog already provided!
Processing triggers for systemd (215-17+deb8u4) ...

and all ok

Link to comment
Share on other sites

help edit /var/lib/dpkg/info/ramlog.postrm, and insert "exit 0"  

 

but 

Processing triggers for libc-bin (2.19-18+deb8u4) ...Processing triggers for man-db (2.7.0.2-5) ...
Setting up rsyslog (8.4.2-1+deb8u2) ...
insserv: Service ramlog has to be enabled to start service rsyslog
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package rsyslog (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 rsyslog
Link to comment
Share on other sites


service ramlog disable

[....] Disabling ramlog...insserv: script ramlog.uninst: service ramlog already provided!

rsync: change_dir "/var/log.hdd" failed: No such file or directory (2)

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]

failed!

 

Link to comment
Share on other sites

  • Igor unpinned this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines