DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 29th January 2024
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 653
Default Service won't start in FreeBSD jail

I asked this on the FreeBSD forums. but no one answered. (Maybe it's my breath?--hrrm, doesn't make sense).
Anyway, I have a simple jail that I use for testing. There is no /etc/rc.conf. I installed nginx and set it up. I created an /etc/rc.conf.d/nginx file that reads

Code:
nginx_enable="YES"
This is what I do on my main workstation, use /etc/rc.conf.d rather than /etc/rc.conf

However, when I run service nginx start, I get
Code:
ngingx does not exist in /etc/rc.d or the local startup
directories (/etc/rc.d), or is not executable
I can start it by cd-ing (in the jail) to /usr/local/etc/rc.d and then running

Code:
 ./nginx start
Doing some web searching has found nothing relevant so I suspect I'm missing something obvious but I can't figure out what it is that I'm missing.
Reply With Quote
  #2   (View Single Post)  
Old 30th January 2024
Onauk's Avatar
Onauk Onauk is offline
Real Name: Thomas
Fdisk Soldier
 
Join Date: Jan 2023
Location: France
Posts: 60
Default

Quote:
Originally Posted by scottro View Post
However, when I run service nginx start, I get
Code:
ngingx does not exist in /etc/rc.d or the local startup
directories (/etc/rc.d), or is not executable
I don't know much about jails but I understand that there is some chroot-ing going on. Have you placed your configuration file in the correct directory within the chroot?
Reply With Quote
  #3   (View Single Post)  
Old 30th January 2024
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 653
Default

I believe so. I think it was put there by the installation of the package. The config is in /usr/local/nginx which is normal for a non-base program.
Reply With Quote
  #4   (View Single Post)  
Old 31st January 2024
Onauk's Avatar
Onauk Onauk is offline
Real Name: Thomas
Fdisk Soldier
 
Join Date: Jan 2023
Location: France
Posts: 60
Default

Quote:
Originally Posted by scottro View Post
However, when I run service nginx start [...]
Can you enable it with service -j jail nginx start ?
Reply With Quote
  #5   (View Single Post)  
Old 1st February 2024
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 653
Default

Good idea, but same message.
Code:
sudo service -j webjail nginx start
nginx does not exist in /etc/rc.d or the local startup
directories (/etc/rc.d), or is not executable
I do thank you for the suggestions. It's not that big a deal if it doesn't work, I'm just sort of curious what I might have missed, as it works every other time I've used it (on work machines, etc.)
Reply With Quote
  #6   (View Single Post)  
Old 29th February 2024
c-c-c-c c-c-c-c is offline
New User
 
Join Date: Nov 2019
Posts: 6
Default

Quote:
Originally Posted by scottro View Post
However, when I run service nginx start, I get
Code:
ngingx does not exist in /etc/rc.d or the local startup
directories (/etc/rc.d), or is not executable
Could it be as simple as a misspelling?
Reply With Quote
  #7   (View Single Post)  
Old 1st March 2024
blackhole's Avatar
blackhole blackhole is offline
Spam Deminer
 
Join Date: Mar 2014
Posts: 319
Default

@c-c-c-c: well spotted, but I think that typo was corrected in a later post:
Quote:
Originally Posted by scottro View Post
Good idea, but same message.
Code:
sudo service -j webjail nginx start
nginx does not exist in /etc/rc.d or the local startup
directories (/etc/rc.d), or is not executable
I do thank you for the suggestions. It's not that big a deal if it doesn't work, I'm just sort of curious what I might have missed, as it works every other time I've used it (on work machines, etc.)
The emphasised part above is what stands out for me. If I try to start a non-existent service, albeit not in a jail, I see the following:
Code:
# service foobar start
foobar does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable
Your nginx rc script is probably installed under /usr/local

For some reason service(8) is not searching that path.

https://man.freebsd.org/cgi/man.cgi?service(8)
Quote:
...the local startup directories. As described in rc.conf(5) this is usually /usr/local/etc/rc.d.
Perhaps double check the jail configuration in /etc/rc.conf ?
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD jail inherited user accounts and env variables sysfu FreeBSD General 0 3rd November 2013 05:01 PM
How do I start Xorg from within a jail? Mr-Biscuit FreeBSD General 7 17th May 2010 05:51 PM
Best way to check if freebsd server is running a nameserver service/daemon Yuka FreeBSD General 7 6th November 2008 01:26 AM
Firefox 2 & 3 won't start in FreeBSD 6.2 Mantazz FreeBSD Ports and Packages 8 9th October 2008 05:41 AM
Freebsd 7.0 natd problem with jail bsduser FreeBSD Installation and Upgrading 2 26th July 2008 12:40 AM


All times are GMT. The time now is 09:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick