init services not startable?
I was having problems with cron and noticed the daemon wasn't running, and now it seems maybe init isn't starting any services. Is that possible?
...gives no output. Nor does "start cron" or "status cron". When I do Ctrl+Alt+F1 (,F2, etc.) it looks like the consoles haven't even started. It does seem like some stuff is started, but I'm not familiar with this enough to have a clue what's going on:
Code:
$ ps aux | grep daemon
root 361 0.0 0.0 17052 292 ? S 13:26 0:00 upstart-udev-bridge --daemon
root 383 0.0 0.0 21856 924 ? S<s 13:26 0:00 udevd --daemon
102 872 0.0 0.1 24952 2196 ? Ss 13:26 0:03 dbus-daemon --system --fork --activation=upstart
avahi 894 0.0 0.0 32128 992 ? S 13:26 0:00 avahi-daemon: running [slartibartfast.local]
avahi 895 0.0 0.0 32008 132 ? S 13:26 0:00 avahi-daemon: chroot helper
root 901 0.0 0.1 61972 2472 ? Sl 13:26 0:00 /usr/sbin/console-kit-daemon --no-daemon
macho 1061 0.0 0.1 26528 2692 ? Ss 13:26 0:01 //bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
macho 1077 0.0 0.0 88548 1500 ? Sl 13:26 0:00 /usr/bin/gnome-keyring-daemon --start --components=pkcs11
macho 1080 0.0 0.5 424660 9152 ? Ssl 13:26 0:01 /usr/lib/gnome-settings-daemon/gnome-settings-daemon
macho 1091 0.0 0.0 81008 1100 ? Ssl 13:26 0:00 /usr/lib/gvfs//gvfs-fuse-daemon /home/macho/.gvfs
rtkit 1100 0.0 0.0 37628 876 ? SNl 13:26 0:00 /usr/lib/rtkit/rtkit-daemon
macho 1157 0.0 0.4 116516 7520 ? Sl 13:26 0:00 /usr/bin/python /usr/bin/zeitgeist-daemon
root 1299 0.0 0.1 62148 2240 ? Sl 13:27 0:00 /usr/lib/udisks/udisks-daemon
root 1300 0.0 0.0 45168 496 ? S 13:27 0:00 udisks-daemon: polling /dev/sr0
macho 1411 0.0 0.3 221972 6860 ? S 13:27 0:00 /usr/lib/bamf/bamfdaemon
macho 1425 0.0 0.1 111376 2356 ? Sl 13:27 0:00 /usr/lib/unity-place-files/unity-files-daemon
macho 1426 0.0 0.2 134820 5288 ? Sl 13:27 0:00 /usr/lib/unity-place-applications/unity-applications-daemon
macho 1544 0.0 0.2 176844 4084 ? S 13:27 0:00 /usr/lib/gnome-disk-utility/gdu-notification-daemon
macho 1565 0.1 0.4 298912 8780 ? Sl 13:27 0:05 /usr/bin/python /usr/lib/ubuntuone-client/ubuntuone-syncdaemon
macho 4622 0.0 0.0 9140 1020 pts/1 S+ 14:51 0:00 grep daemon
Any thoughts?
Re: init services not startable?
Re: init services not startable?
To see your init.d
to check if cron is running
Code:
ps -ef | grep -i cron
to start|stop|restart a service (like cron)
Code:
sudo service cron start|restart|stop
Re: init services not startable?
Thanks. For some reason this doesn't seem to work:
Code:
$ sudo service cron start
This gives no output (apart from asking for my password).
Code:
$ ps -ef | grep -i cron
macho 6446 6438 0 08:13 pts/0 00:00:00 grep -i cron
$ ls /etc/init.d/ -1
acpid
acpi-support
alsa-restore
alsa-store
anacron
apparmor
apport
atd
atieventsd
avahi-daemon
binfmt-support
bluetooth
bootlogd
brltty
console-setup
cron
cups
dbus
dmesg
dns-clean
ecryptfs-utils-restore
ecryptfs-utils-save
failsafe-x
fancontrol
gdm
grub-common
halt
hostname
hwclock
hwclock-save
irqbalance
kerneloops
killprocs
lm-sensors
module-init-tools
networking
network-interface
network-interface-security
network-manager
ondemand
pcmciautils
plymouth
plymouth-log
plymouth-splash
plymouth-stop
plymouth-upstart-bridge
pppd-dns
procps
pulseaudio
rc
rc.local
rcS
README
reboot
rsync
rsyslog
saned
screen-cleanup
sendsigs
setvtrgb
single
skeleton
speech-dispatcher
stop-bootlogd
stop-bootlogd-single
sudo
udev
udev-fallback-graphics
udev-finish
udevmonitor
udevtrigger
ufw
umountfs
umountnfs.sh
umountroot
unattended-upgrades
urandom
x11-common
Re: init services not startable?
Does
Code:
sudo service cron restart
give any output? Maybe something like:
cron start/running, process 12345?
Re: init services not startable?
No output for "sudo service cron restart".
I checked /var/log/syslog afterward and I can see pam_sm_authenticate stuff for the invocation of sudo, but nothing else.
Re: init services not startable?
Can you please run the following commands
Code:
sudo apt-get purge upstart
sudo apt-get install upstart
then log out, log back in, and retry
Code:
sudo service cron restart
Re: init services not startable?
What is the O/P of
Code:
dpkg -L cron
grep -v ^# /etc/init/cron.conf
sudo start cron;tail -10 /var/log/syslog
sudo /etc/init.d/cron start
Re: init services not startable?
Thanks. I couldn't purge upstart, seemingly because of dependency problems:
Code:
$ sudo apt-get purge upstart
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:
The following packages have unmet dependencies:
procps : Depends: upstart-job
Depends: initscripts but it is not going to be installed
E: Broken packages
webofunni: here's the output.
Code:
$ dpkg -L cron
/.
/usr
/usr/bin
/usr/bin/crontab
/usr/sbin
/usr/sbin/cron
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/crontab.1.gz
/usr/share/man/man5
/usr/share/man/man5/crontab.5.gz
/usr/share/man/man8
/usr/share/man/man8/cron.8.gz
/usr/share/doc
/usr/share/doc/cron
/usr/share/doc/cron/FEATURES
/usr/share/doc/cron/THANKS
/usr/share/doc/cron/README
/usr/share/doc/cron/README.anacron
/usr/share/doc/cron/README.Debian
/usr/share/doc/cron/TODO.Debian
/usr/share/doc/cron/copyright
/usr/share/doc/cron/examples
/usr/share/doc/cron/examples/stats-cron.pl.gz
/usr/share/doc/cron/examples/crontab2english.pl.gz
/usr/share/doc/cron/NEWS.Debian.gz
/usr/share/doc/cron/changelog.Debian.gz
/usr/share/bug
/usr/share/bug/cron
/usr/share/bug/cron/script
/usr/share/bug/cron/control
/etc
/etc/cron.hourly
/etc/cron.hourly/.placeholder
/etc/cron.daily
/etc/cron.daily/.placeholder
/etc/cron.daily/standard
/etc/cron.weekly
/etc/cron.weekly/.placeholder
/etc/cron.monthly
/etc/cron.monthly/.placeholder
/etc/cron.d
/etc/cron.d/.placeholder
/etc/init.d
/etc/pam.d
/etc/pam.d/cron
/etc/init
/etc/init/cron.conf
/etc/default
/etc/default/cron
/etc/crontab
/var
/var/spool
/var/spool/cron
/var/spool/cron/crontabs
/etc/init.d/cron
Code:
$ grep -v ^# /etc/init/cron.conf
description "regular background program processing daemon"
start on runlevel [2345]
stop on runlevel [!2345]
expect fork
respawn
exec cron
Code:
$ sudo start cron;tail -10 /var/log/syslog
May 24 03:45:56 localhost kernel: [51546.572735] wlan0: RX AssocResp from 00:1c:f0:43:7f:72 (capab=0x431 status=0 aid=1)
May 24 03:45:56 localhost kernel: [51546.572737] wlan0: associated
May 24 05:39:23 localhost sudo: pam_sm_authenticate: Called
May 24 05:39:23 localhost sudo: pam_sm_authenticate: username = [macho]
May 24 08:13:50 localhost sudo: pam_sm_authenticate: Called
May 24 08:13:50 localhost sudo: pam_sm_authenticate: username = [macho]
May 24 09:09:03 localhost sudo: pam_sm_authenticate: Called
May 24 09:09:03 localhost sudo: pam_sm_authenticate: username = [macho]
May 24 23:13:24 localhost sudo: pam_sm_authenticate: Called
May 24 23:13:24 localhost sudo: pam_sm_authenticate: username = [macho]
Code:
$ sudo /etc/init.d/cron start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service cron start
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start cron
Re: init services not startable?
Are you able to start it using
Code:
sudo /usr/sbin/cron
?
You can try the following commands for upstart to avoid dep problem.
Code:
sudo dpkg -P --force depends upstart
sudo apt-get install upstart