3

I'm in a difficult situation.

Using Debian Jessie / Stretch, apt-get -f install fails.

The system is effectively stuck. I've sshed in now. As far as login terminals, only one was becoming available. (Namely, only alt-ctrl-F1 brought up a login terminal on the actual machine, alt-ctrl-f[2-5] failed).

It seems to be related to the bug listed here. Though there are multiple problems: krb-kdc doesn't unpack because PolicyKit timeout was reached (g-io-error-quark, 24), then errors unpacking krb5-admin-server, the an error message that LDAP must be enabled (though it is and connects fine).

Namely, there are multiple time-outs with apt-get (to PolicyKit bits it seems). As far as the network, I've set the timeout time to 1200, with no seeming effect. The full error message:

The following extra packages will be installed:
  krb5-admin-server krb5-kdc
Suggested packages:
  openbsd-inetd inet-superserver krb5-kdc-ldap
The following packages will be upgraded:
  krb5-admin-server krb5-kdc
2 upgraded, 0 newly installed, 0 to remove and 73 not upgraded.
9 not fully installed or removed.
Need to get 0 B/320 kB of archives.
After this operation, 115 kB disk space will be freed.
Do you want to continue? [Y/n]
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 296869 files and directories currently installed.)
Preparing to unpack .../krb5-kdc_1.13.2+dfsg-2_amd64.deb ...
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to stop krb5-kdc.service: Connection timed out
Failed to get load state of krb5-kdc.service: Connection timed out
invoke-rc.d: initscript krb5-kdc, action "stop" failed.
failed to stop krb5-kdc
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to stop krb5-kdc.service: Connection timed out
Failed to get load state of krb5-kdc.service: Connection timed out
invoke-rc.d: initscript krb5-kdc, action "stop" failed.
failed to stop krb5-kdc
dpkg: error processing archive /var/cache/apt/archives/krb5-kdc_1.13.2+dfsg-2_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to start krb5-kdc.service: Connection timed out
invoke-rc.d: initscript krb5-kdc, action "start" failed.
Preparing to unpack .../krb5-admin-server_1.13.2+dfsg-2_amd64.deb ...
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to stop krb5-admin-server.service: Connection timed out
Failed to get load state of krb5-admin-server.service: Connection timed out
invoke-rc.d: initscript krb5-admin-server, action "stop" failed.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Activation of org.freedesktop.PolicyKit1 timed out (g-dbus-error-quark, 20)
Failed to stop krb5-admin-server.service: Connection timed out
Failed to get load state of krb5-admin-server.service: Connection timed out
invoke-rc.d: initscript krb5-admin-server, action "stop" failed.
dpkg: error processing archive /var/cache/apt/archives/krb5-admin-server_1.13.2+dfsg-2_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
insserv: Service ldap has to be enabled to start service krb5-admin-server
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/krb5-kdc_1.13.2+dfsg-2_amd64.deb
 /var/cache/apt/archives/krb5-admin-server_1.13.2+dfsg-2_amd64.deb
Error: Timeout was reached
E: Sub-process /usr/bin/dpkg returned an error code (1)

Questions:

  1. What else can I do to force apt-get -f install?
  2. Would it help to force a roll-back to Jessie?

closed as too broad by Braiam, garethTheRed, jimmij, slm Jul 5 '16 at 19:36

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • (Simple mentioning: alt/ctrl/f1 doesn't get you a virtual terminal, but a real. The virtual terminal is what belongs to, f.e. a remote ssh session, i.e. there is no hardware character device behind it.) – peterh Sep 12 '15 at 14:52
  • I don't think apt-get is the issue, and PolicyKit doesn't involve the network (at least, the Internet network). If you run systemctl status, are there any failed jobs that might explain the error? – saiarcot895 Sep 12 '15 at 15:11
  • I didn't mean to imply that PolKit was a network issue. The collocation was in hopes to elicit a way to increase timeout or ignore polkit failures. systemctl tells me there are "3 units" failed but I don't see what they are. It's probably kerberos / LDAP, procps related. krb5-admin-server is attempting to start but says LDAP must be enabled - LDAP is running - not sure what it wants. As far as procps, it says it's in a "very bad inconsistent state" – Donnied Sep 12 '15 at 15:18
  • well, I've kludged away at a few prerm and postinst scripts (to exit 0). Now I'm pretty much left with the "Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24) Failed to execute operation: Connection timed out" problem. – Donnied Sep 12 '15 at 15:28

Browse other questions tagged or ask your own question.