LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-09-2015, 06:15 PM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
"start rc-local" failed


My box is centos 7.1 x64 as guest on windows 10 x64 as host.

My box does not execute "/etc/rc.d/rc.local" at booting time, so I should do a command "source /etc/rc.d/rc.local" at every booting time.

This is the result.

Quote:
[root@localhost ~]# systemctl start rc-local
Job for rc-local.service failed. See 'systemctl status rc-local.service' and 'journalctl -xn' for details.
[root@localhost ~]# systemctl status rc-local.service
rc-local.service - /etc/rc.d/rc.local Compatibility
Loaded: loaded (/usr/lib/systemd/system/rc-local.service; static)
Active: failed (Result: exit-code) since Mon 2015-11-09 18:10:13 EST; 8s ago
Process: 2255 ExecStart=/etc/rc.d/rc.local start (code=exited, status=1/FAILURE)

Nov 09 18:10:13 localhost.localdomain systemd[1]: Starting /etc/rc.d/rc.local Compatibility...
Nov 09 18:10:13 localhost.localdomain rc.local[2255]: sudo: sorry, you must have a tty to run sudo
Nov 09 18:10:13 localhost.localdomain rc.local[2255]: sudo: sorry, you must have a tty to run sudo
Nov 09 18:10:13 localhost.localdomain rc.local[2255]: sudo: sorry, you must have a tty to run sudo
Nov 09 18:10:13 localhost.localdomain rc.local[2255]: sudo: sorry, you must have a tty to run sudo
Nov 09 18:10:13 localhost.localdomain rc.local[2255]: sudo: sorry, you must have a tty to run sudo
Nov 09 18:10:13 localhost.localdomain rc.local[2255]: sudo: sorry, you must have a tty to run sudo
Nov 09 18:10:13 localhost.localdomain systemd[1]: rc-local.service: control process exited, code=exited status=1
Nov 09 18:10:13 localhost.localdomain systemd[1]: Failed to start /etc/rc.d/rc.local Compatibility.
Nov 09 18:10:13 localhost.localdomain systemd[1]: Unit rc-local.service entered failed state.
[root@localhost ~]# journalctl -xn
-- Logs begin at Mon 2015-11-09 02:57:44 EST, end at Mon 2015-11-09 18:10:35 EST. --
Nov 09 18:10:13 localhost.localdomain rc.local[2255]: sudo: sorry, you must have a tty to run sudo
Nov 09 18:10:13 localhost.localdomain rc.local[2255]: sudo: sorry, you must have a tty to run sudo
Nov 09 18:10:13 localhost.localdomain rc.local[2255]: sudo: sorry, you must have a tty to run sudo
Nov 09 18:10:13 localhost.localdomain systemd[1]: rc-local.service: control process exited, code=exited status=1
Nov 09 18:10:13 localhost.localdomain systemd[1]: Failed to start /etc/rc.d/rc.local Compatibility.
-- Subject: Unit rc-local.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman.../systemd-devel
--
-- Unit rc-local.service has failed.
--
-- The result is failed.
Nov 09 18:10:13 localhost.localdomain systemd[1]: Unit rc-local.service entered failed state.
Nov 09 18:10:19 localhost.localdomain /etc/gdm/Xsession[1653]: plasma-desktop(1914)/plasma StatusNotifierItemSource::refreshCallback: DBu
Nov 09 18:10:26 localhost.localdomain /etc/gdm/Xsession[1653]: plasma-desktop(1914)/plasma StatusNotifierItemSource::refreshCallback: DBu
Nov 09 18:10:35 localhost.localdomain /etc/gdm/Xsession[1653]: plasma-desktop(1914)/plasma StatusNotifierItemSource::refreshCallback: DBu
Nov 09 18:10:35 localhost.localdomain /etc/gdm/Xsession[1653]: plasma-desktop(1914)/plasma StatusNotifierItemSource::refreshCallback: DBu
Any helpful comments would be appreciated.

Thanks in advance.
 
Old 11-09-2015, 07:54 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,970
Blog Entries: 1

Rep: Reputation: 208Reputation: 208Reputation: 208
The error is right there. Why are you trying to run sudo in side the rc.local file?
 
1 members found this post helpful.
Old 11-09-2015, 08:02 PM   #3
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Thanks a lot!
It solved!

Last edited by windstory; 11-14-2015 at 03:03 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wine and Auto-start service L"MountMgr" failed to start: 2 gw1500se Linux - Software 0 09-12-2015 07:45 PM
Job Failed Error after trying to use the "service mysqld start" command? j3llimari3 Linux - Newbie 2 09-04-2015 11:28 AM
[SOLVED] "net rpc" "failed to connect to ipc$ share on" or "unable to find a suitable server" larieu Linux - General 0 11-09-2014 01:45 AM
[SOLVED] IPv6 "link-local" fe80:: vs "unique local address (ULA)" fc00:: + fd00:: psycroptic Linux - Networking 4 08-07-2014 01:51 AM
failed Local FTP "ls" blizunt7 Linux - Server 0 01-08-2008 03:10 PM


All times are GMT -5. The time now is 08:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration