RE: systemctl start service as non-root
Found out I needed to install polkit. Haven't come across this before but looks interesting! bash-4.3$ systemctl start tomcat@instance1 AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to manage system services or units. Authenticating as: Fedora Cloud User (fedora) Password: AUTHENTICATION COMPLETE === bash-4.3$ ps -ef | grep java tomcat 11056 1 0 09:44 ?00:00:02 /usr/lib/jvm/jre/bin/java -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/lib/java/commons-daemon.jar -Dcatalina.base=/var/lib/tomcats/instance1 -Dcatalina.home=/usr/share/tomcat -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat/temp -Djava.util.logging.config.file=/var/lib/tomcats/instance1/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start From: edwardqu...@hotmail.com To: users@lists.fedoraproject.org Subject: systemctl start service as non-root Date: Sun, 14 Jun 2015 09:57:12 + Hi Fedora Users, Does anyone know if it's possible to start a service using systemctl without root privileges? For example, I've set up a tomcat instance, which starts up fine when issuing systemctl start with root: [root@fedora22 tomcats]# systemctl start tomcat@instance1 [root@fedora22 tomcats]# ps -ef | grep java tomcat 11056 1 46 09:44 ?00:00:01 /usr/lib/jvm/jre/bin/java -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/lib/java/commons-daemon.jar -Dcatalina.base=/var/lib/tomcats/instance1 -Dcatalina.home=/usr/share/tomcat -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat/temp -Djava.util.logging.config.file=/var/lib/tomcats/instance1/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start But when trying to run the command as the tomcat user which owns the instance there's a message below I'm not sure about: [root@fedora22 system]# sudo -u tomcat bash bash-4.3$ id uid=91(tomcat) gid=91(tomcat) groups=91(tomcat) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 bash-4.3$ systemctl start tomcat@instance1 Failed to start tomcat@instance1.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files bash-4.3$ Thanks for any help. Edward -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
systemctl start service as non-root
Hi Fedora Users, Does anyone know if it's possible to start a service using systemctl without root privileges? For example, I've set up a tomcat instance, which starts up fine when issuing systemctl start with root: [root@fedora22 tomcats]# systemctl start tomcat@instance1 [root@fedora22 tomcats]# ps -ef | grep java tomcat 11056 1 46 09:44 ?00:00:01 /usr/lib/jvm/jre/bin/java -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/lib/java/commons-daemon.jar -Dcatalina.base=/var/lib/tomcats/instance1 -Dcatalina.home=/usr/share/tomcat -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat/temp -Djava.util.logging.config.file=/var/lib/tomcats/instance1/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start But when trying to run the command as the tomcat user which owns the instance there's a message below I'm not sure about: [root@fedora22 system]# sudo -u tomcat bash bash-4.3$ id uid=91(tomcat) gid=91(tomcat) groups=91(tomcat) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 bash-4.3$ systemctl start tomcat@instance1 Failed to start tomcat@instance1.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files bash-4.3$ Thanks for any help. Edward -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
RE: multiple instances of tomcat
I figured out. Just replying so I don't waste anyone's time. The problem in my case was after upgrading to Fedora 21, I needed to replace /etc/tomcat/tomcat.conf with /etc/tomcat/tomcat.conf.rpmnew Doh! :) From: edwardqu...@hotmail.com To: users@lists.fedoraproject.org Subject: multiple instances of tomcat Date: Sat, 23 May 2015 14:49:15 + Hi, First just to say I'm running F21. I found a post on setting up multiple tomcat instances at https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20130708/1055381.html which states: In the new world, if you need an instance, you'll create a directory /var/lib/tomcats/name, create {conf temp work webapps} in it, and then systemctl enable tomcat at name.service. So I created /var/lib/tomcats/instance1, /var/lib/tomcats/instance2 and /var/lib/tomcats/instance3 (and their contents) I then ran: [root@laptop system]# systemctl enable tomcat@instance1.service Created symlink from /etc/systemd/system/multi-user.target.wants /tomcat@instance1.service to /usr/lib/systemd/system/tomcat@.service. [root@laptop system]# systemctl enable tomcat@instance2.service Created symlink from /etc/systemd/system/multi-user.target.wants /tomcat@instance2.service to /usr/lib/systemd/system/tomcat@.service. [root@laptop system]# systemctl enable tomcat@instance3.service Created symlink from /etc/systemd/system/multi-user.target.wants/tomcat@instance3.service to /usr/lib/systemd/system/tomcat@.service. And created these sysconfig files, changing the CATALINA_BASE to match the corresponding directory under /var/lib/tomcats: [root@laptop system]# ls -l /etc/sysconfig/*tomcat* -rw-rw-r--. 1 root tomcat 490 Feb 14 21:29 /etc/sysconfig/tomcat -rw-r--r--. 1 root root194 May 23 14:58 /etc/sysconfig/tomcat@instance1 -rw-r--r--. 1 root root194 May 23 14:59 /etc/sysconfig/tomcat@instance2 -rw-r--r--. 1 root root194 May 23 15:00 /etc/sysconfig/tomcat@instance3 Unfortunately everytime I try to start one of these instances, for example, if I run systemctl start tomcat@instance2 it just starts up the system installed tomcat with CATALINA_BASE /usr/share/tomcat. Please could you tell me if I am doing anything obviously wrong here? :) Thanks for any help. Edward P.S. Just a note to add that I did get this working but only after adding the following files. The discussion in the attached link seemed to indicate that I shouldn't need to do this. [root@laptop logs]# cat /etc/sysconfig/tomcat@instance1 TOMCAT_CFG_LOADED=1 CATALINA_HOME="/usr/share/tomcat" CATALINA_BASE="/var/lib/tomcats/instance1" CATALINA_TMPDIR="/var/lib/tomcats/instance1/temp" TOMCAT_USER="tomcat" CATALINA_PID="/var/lib/tomcats/instance1/logs/tomcat.pid" [root@laptop logs]# cat /etc/sysconfig/tomcat@instance2 TOMCAT_CFG_LOADED=1 CATALINA_HOME="/usr/share/tomcat" CATALINA_BASE="/var/lib/tomcats/instance2" CATALINA_TMPDIR="/var/lib/tomcats/instance2/temp" TOMCAT_USER="tomcat" CATALINA_PID="/var/lib/tomcats/instance2/logs/tomcat.pid" [root@laptop logs]# cat /etc/sysconfig/tomcat@instance3 TOMCAT_CFG_LOADED=1 CATALINA_HOME="/usr/share/tomcat" CATALINA_BASE="/var/lib/tomcats/instance3" CATALINA_TMPDIR="/var/lib/tomcats/instance3/temp" TOMCAT_USER="tomcat" CATALINA_PID="/var/lib/tomcats/instance3/logs/tomcat.pid" -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
RE: multiple instances of tomcat
From: edwardqu...@hotmail.com To: users@lists.fedoraproject.org Subject: multiple instances of tomcat Date: Sat, 23 May 2015 14:49:15 + Hi, First just to say I'm running F21. I found a post on setting up multiple tomcat instances at https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20130708/1055381.html which states: In the new world, if you need an instance, you'll create a directory /var/lib/tomcats/name, create {conf temp work webapps} in it, and then systemctl enable tomcat at name.service. So I created /var/lib/tomcats/instance1, /var/lib/tomcats/instance2 and /var/lib/tomcats/instance3 (and their contents) I then ran: [root@laptop system]# systemctl enable tomcat@instance1.service Created symlink from /etc/systemd/system/multi-user.target.wants /tomcat@instance1.service to /usr/lib/systemd/system/tomcat@.service. [root@laptop system]# systemctl enable tomcat@instance2.service Created symlink from /etc/systemd/system/multi-user.target.wants /tomcat@instance2.service to /usr/lib/systemd/system/tomcat@.service. [root@laptop system]# systemctl enable tomcat@instance3.service Created symlink from /etc/systemd/system/multi-user.target.wants/tomcat@instance3.service to /usr/lib/systemd/system/tomcat@.service. And created these sysconfig files, changing the CATALINA_BASE to match the corresponding directory under /var/lib/tomcats: [root@laptop system]# ls -l /etc/sysconfig/*tomcat* -rw-rw-r--. 1 root tomcat 490 Feb 14 21:29 /etc/sysconfig/tomcat -rw-r--r--. 1 root root194 May 23 14:58 /etc/sysconfig/tomcat@instance1 -rw-r--r--. 1 root root194 May 23 14:59 /etc/sysconfig/tomcat@instance2 -rw-r--r--. 1 root root194 May 23 15:00 /etc/sysconfig/tomcat@instance3 Unfortunately everytime I try to start one of these instances, for example, if I run systemctl start tomcat@instance2 it just starts up the system installed tomcat with CATALINA_BASE /usr/share/tomcat. Please could you tell me if I am doing anything obviously wrong here? :) Thanks for any help. Edward P.S. Just a note to add that I did get this working but only after adding the following files. The discussion in the attached link seemed to indicate that I shouldn't need to do this. [root@laptop logs]# cat /etc/sysconfig/tomcat@instance1 TOMCAT_CFG_LOADED=1 CATALINA_HOME="/usr/share/tomcat" CATALINA_BASE="/var/lib/tomcats/instance1" CATALINA_TMPDIR="/var/lib/tomcats/instance1/temp" TOMCAT_USER="tomcat" CATALINA_PID="/var/lib/tomcats/instance1/logs/tomcat.pid" [root@laptop logs]# cat /etc/sysconfig/tomcat@instance2 TOMCAT_CFG_LOADED=1 CATALINA_HOME="/usr/share/tomcat" CATALINA_BASE="/var/lib/tomcats/instance2" CATALINA_TMPDIR="/var/lib/tomcats/instance2/temp" TOMCAT_USER="tomcat" CATALINA_PID="/var/lib/tomcats/instance2/logs/tomcat.pid" [root@laptop logs]# cat /etc/sysconfig/tomcat@instance3 TOMCAT_CFG_LOADED=1 CATALINA_HOME="/usr/share/tomcat" CATALINA_BASE="/var/lib/tomcats/instance3" CATALINA_TMPDIR="/var/lib/tomcats/instance3/temp" TOMCAT_USER="tomcat" CATALINA_PID="/var/lib/tomcats/instance3/logs/tomcat.pid" -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
multiple instances of tomcat
Hi, First just to say I'm running F21. I found a post on setting up multiple tomcat instances at https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20130708/1055381.html which states: In the new world, if you need an instance, you'll create a directory /var/lib/tomcats/name, create {conf temp work webapps} in it, and then systemctl enable tomcat at name.service. So I created /var/lib/tomcats/instance1, /var/lib/tomcats/instance2 and /var/lib/tomcats/instance3 I then ran: [root@laptop system]# systemctl enable tomcat@instance1.service Created symlink from /etc/systemd/system/multi-user.target.wants /tomcat@instance1.service to /usr/lib/systemd/system/tomcat@.service. [root@laptop system]# systemctl enable tomcat@instance2.service Created symlink from /etc/systemd/system/multi-user.target.wants /tomcat@instance2.service to /usr/lib/systemd/system/tomcat@.service. [root@laptop system]# systemctl enable tomcat@instance3.service Created symlink from /etc/systemd/system/multi-user.target.wants/tomcat@instance3.service to /usr/lib/systemd/system/tomcat@.service. And created these sysconfig files, changing the CATALINA_BASE to match the corresponding directory under /var/lib/tomcats: [root@laptop system]# ls -l /etc/sysconfig/*tomcat* -rw-rw-r--. 1 root tomcat 490 Feb 14 21:29 /etc/sysconfig/tomcat -rw-r--r--. 1 root root194 May 23 14:58 /etc/sysconfig/tomcat@instance1 -rw-r--r--. 1 root root194 May 23 14:59 /etc/sysconfig/tomcat@instance2 -rw-r--r--. 1 root root194 May 23 15:00 /etc/sysconfig/tomcat@instance3 Unfortunately everytime I try to start one of these instances, for example, if I run systemctl start tomcat@instance2 it just starts up the system installed tomcat with CATALINA_BASE /usr/share/tomcat. Please could you tell me if I am doing anything obviously wrong here? :) Thanks for any help. Edward -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
RE: Problems booting Fedora 19 with UEFI
> From: tchollingswo...@gmail.com > Date: Sat, 28 Sep 2013 01:40:29 -0700 > Subject: Re: Problems booting Fedora 19 with UEFI > To: users@lists.fedoraproject.org > > Hi! > > Sorry for the lack of response; UEFI gives *all of us* nothing but grief. ;-) > > On Sun, Sep 22, 2013 at 2:11 AM, Edward Quick wrote: > > Hi, > > > > I recently purchased a Dell Inspiron 5721 which came with Windows 8. I > > would like to dual boot this with Fedora but am having problems running > > the Fedora Install. I have Fedora-19-x86_64-DVD.iso on usb, and whenever > > I boot with UEFI (secure on or off), the > > boot process hangs at the line, Reached target Basic System: > > > > [ 197.574126] localhost dracut-initqueue[395]: Warning: /dev/root does not > > exist > > Hmm, so the boot process can't find the root image on the USB drive. > This could be because whatever made the USB drive didn't set the > kernel command line arguments properly. > > How did you make the USB drive? With liveusb-creator, unetbootin, dd, > or something else? > > If it was anything but liveusb-creator, it might not have done the > necessary magic to make UEFI boot work properly. Grab it from > https://fedorahosted.org/liveusb-creator/ and try remaking the USB > drive with it, and see if it works. > > > Please note that if I install in basic graphics mode, I still get the > > same result. The only way I can get the install to work, is if I boot in > > legacy mode. Unfortunately after doing this, I can no longer boot up > > Windows. > > > > If anyone knows how to fix this, I'd be really grateful for some help :-) > > -T.C. > -- Thank you TC, that was spot on! I was trying to install fedora with a usb created from unetbootin. The usb created by liveusb-creator booted fine though and now I can see Windows in the grub menu. Oddly (and not a major issue), I can only boot Windows if secure mode is off. Fedora boots fine if secure mode is on or off. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
RE: Problems booting Fedora 19 with UEFI
> > Hi, > > > > > > I recently purchased a Dell Inspiron 5721 which came with Windows 8. I > would like to dual boot this with Fedora but am having problems running > the Fedora Install. I have Fedora-19-x86_64-DVD.iso on usb, and whenever > I boot with UEFI (secure on or off), the > boot process hangs at the line, Reached target Basic System: > > > > > > [ 12.650116] localhost systemd[1]: Started Dispatch Password Requests to > Console Directory Watch. > [ 12.650553] localhost systemd[1]: Starting Paths. > [ 12.650962] localhost systemd[1]: Reached target Paths. > [ 12.651376] localhost systemd[1]: Starting Basic System. > [ 12.651829] localhost systemd[1]: Reached target Basic System. > > > > > > And then bails out after a few minutes and starts up the Dracut Emergency > Shell: > > > > > > [ 35.729286] localhost multipathd[108]: sdc: add path (uevent) > > > [ 35.915042] localhost multipathd[108]: sdc: update path write_protect to > '0' (uevent) > > > [ 36.008982] localhost multipathd[108]: sdc: update path write_protect to > '1' (uevent) > > > [ 197.571596] localhost dracut-initqueue[395]: Warning: Could not boot. > > > [ 197.574126] localhost dracut-initqueue[395]: Warning: /dev/root does not > exist > > > [ 197.578383] localhost systemd[1]: Starting Dracut Emergency Shell... > > > > > > I have pasted the full sosreport.txt at http://pastebin.com/4stUgUDN > > > > > > Please note that if I install in basic graphics mode, I still get the > same result. The only way I can get the install to work, is if I boot in > legacy mode. Unfortunately after doing this, I can no longer boot up > Windows. > > > > > > If anyone knows how to fix this, I'd be really grateful for some help :-) > > > > > > Many thanks, > > > > > > Ed > -- Just resending to see if I can get any help. Thanks. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Problems booting Fedora 19 with UEFI
Hi, I recently purchased a Dell Inspiron 5721 which came with Windows 8. I would like to dual boot this with Fedora but am having problems running the Fedora Install. I have Fedora-19-x86_64-DVD.iso on usb, and whenever I boot with UEFI (secure on or off), the boot process hangs at the line, Reached target Basic System: [ 12.650116] localhost systemd[1]: Started Dispatch Password Requests to Console Directory Watch. [ 12.650553] localhost systemd[1]: Starting Paths. [ 12.650962] localhost systemd[1]: Reached target Paths. [ 12.651376] localhost systemd[1]: Starting Basic System. [ 12.651829] localhost systemd[1]: Reached target Basic System. And then bails out after a few minutes and starts up the Dracut Emergency Shell: [ 35.729286] localhost multipathd[108]: sdc: add path (uevent) [ 35.915042] localhost multipathd[108]: sdc: update path write_protect to '0' (uevent) [ 36.008982] localhost multipathd[108]: sdc: update path write_protect to '1' (uevent) [ 197.571596] localhost dracut-initqueue[395]: Warning: Could not boot. [ 197.574126] localhost dracut-initqueue[395]: Warning: /dev/root does not exist [ 197.578383] localhost systemd[1]: Starting Dracut Emergency Shell... I have pasted the full sosreport.txt at http://pastebin.com/4stUgUDN Please note that if I install in basic graphics mode, I still get the same result. The only way I can get the install to work, is if I boot in legacy mode. Unfortunately after doing this, I can no longer boot up Windows. If anyone knows how to fix this, I'd be really grateful for some help :-) Many thanks, Ed -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org