Raspberry pi NTP working without conf file [closed] - raspberry-pi

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
On raspberry, I was looking at the NTP configuration file under /etc/systemd/timesyncd.conf. All lines are commented (by default) but when I run the timedatectl status command, I get:
...
Network time on : yes
NTP synchronized : yes
...
How NTP works without configuration in conf file ? Where are NTP server links ?
Raspberry pi 3 ; Raspbian 9.13 (stretch)

The NTP management of systemd is called systemd-timesyncd. On my Ubuntu system, the corresponding systemd service is /lib/systemd/system/systemd-timesyncd.service. Typically, when you don't have items activated in a configuration file, daemons use default values. Moreover, if you look at the comment in the configuration file, you will see that the commented items are actually default values:
Entries in this file show the compile time defaults.
You can change settings by editing this file.
Defaults can be restored by simply deleting this file.

Related

Bad configuration option (SSH) [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 months ago.
Improve this question
macbookair#Furqans-MacBook-2021 ~ % ssh -T furqanistic#github.com
/etc/ssh/sshd_config.d/100-macos.conf: line 2: Bad configuration option: usepam
/etc/ssh/sshd_config.d/100-macos.conf: line 3: Bad configuration option: acceptenv
/etc/ssh/sshd_config.d/100-macos.conf: line 4: Bad configuration option: subsystem
/etc/ssh/sshd_config.d/100-macos.conf: terminating, 3 bad configuration options
macbookair#Furqans-MacBook-2021 ~ % sudo nano /etc/ssh/sshd_config
When ever i try "ssh -T furqanistic#github.com " OR "ssh root#" OR push my branch it shows me this error
So i got the solution,I completely messed up the ssh_config and sshd_config files...
Man pages for sshd_config (the server-side config, which includes the AcceptEnv, AuthorizedKeysFile, Subsystem, and UsePAM keywords) vs ssh_config (the client-side config, which doesn't have any of those -- although it does have some related ones, like SendEnv, SetEnv, and SessionType ).
I took the latest files of ssh_config and sshd_config from github and also updated the config file by entering...
sudo nano ~/.ssh/config
and updated my host settings
This may look similar but there is another issue, files are different ... is there any way to reset my whole ssh folder ?
First, as explained here, you can add any setting you need for sshd_config to a file in /etc/ssh/sshd_config.d/*.conf.
The file 100-macos.conf comes with MacOS Monterey.
Editing that file would likely get reverted upon the next patch, so it is best to leave it alone, and add a new conf file if you need custom settings.
Check if Time Machine is activated to restore the original content of 100-macos.conf (unless you can upgrade your OS, which would reset its content)

vapor: Address already in use (errno: 98) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I deployed my vapor project to Ubuntu. And made the configuration of supervisor and Nginx.
When I invoke my server. first call is success but When I try second call I get 502 bad gateway error from browser. When I check error log, the error is
"Fatal error: Error raised at top level: bind(descriptor:ptr:bytes:) failed: Address already in use (errno: 98) : file /home/buildnode/jenkins/wo$"
If I kill the port(8080) process. And after, I try to connect again first try is success then get fail again.
What should I do to get rid of this error?
This might be caused by another process using that port.
I had the same issue and was able to solve it by listing all the processes on port :8080:
$ sudo lsof -i :8080
and then killing all of them one by one by typing:
$ kill {PID of the process}
After that, my app built again properly.
taken from here
I had the same issue. This worked for me:
$ kill -9 {PID of the process}
Hope this helps!

Is it possible to use distinct supervisor (config) for each user (directory) individually? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
Is it possible to use distinct supervisor configuration for each account on the server. So that every user can use supervisor with different specification on his account. I mean instead of using all the same config file on the server they using a local copy of the conf file and run it separately?
Okay I came across with an article by Peter Ojo in medium that in some way answered my question. It is actually about installing supervisor on a shared hosting but I guess it will do it.
What you need to do is use the — install-dir flag to install
supervisor in a custom location to which your user has full access.
You can use the bin directory in your subfolder, i.e.
/home/yoursiteuser/bin, or create it if it doesn’t already exist. Add
this directory to the PYTHONPATH environmental variable by running the
following command;
export PYTHONPATH=$PYTHONPATH:/home/yoursiteuser/bin
Now you can verify that you have your custom bin directory in the
PYTHONPATH environmental variable by typing
echo $PYTHONPATH
ACTUALLY INSTALLING SUPERVISOR
Now you can install Supervisor using the easy_install command like so
> easy_install — install-dir=/home/yoursiteuser/bin supervisor This
should successfully install Supervisor on your server. Yaay!
USING SUPERVISOR
To use supervisor, you first need to create a configuration file with
the sample configuration. You can do this by running the following
command:
echo_supervisord_conf > supervisord.conf This will create the
configuration file named supervisord.conf in the current directory.
Now you can run supervisor like so;
supervisord –c supervisord.conf The -c flag tells supervisor where to
find the configuration file, in this case it’s right there in the same
current directory.

how to install initctl on a centos-7 box [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
service autofs restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service autofs restart
/etc/init.d/autofs: line 54: initctl: command not found
I have looked up on the web and do not see any yum package that can install initctl. can you please help.
CentOS 7 comes with systemctl to manage service. You don't need to use initctl.
service autofs restart should point to systemctl restart autofs
You can check the status of this service with systemctl status autofs and post us the output if not able to restart.

Start systemd service after specific service? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I have a general question. How does one start a systemd unit *.service after a particular *.service has started successfully?
More specific question is, how do I start website.service only after mongodb.service has started? In other words website.service should depend on mongodb.service.
In the .service file under the [Unit] section:
[Unit]
Description=My Website
After=syslog.target network.target mongodb.service
The important part is the mongodb.service
The manpage describes it however due to formatting it's not as clear on first sight
systemd.unit - well formatted
systemd.unit - not so well formatted
After= dependency is only effective when service including After= and service included by After= are both scheduled to start as part of your boot up.
Ex:
a.service
[Unit]
After=b.service
This way, if both a.service and b.service are enabled, then systemd will order b.service after a.service.
If I am not misunderstanding, what you are asking is how to start b.service when a.service starts even though b.service is not enabled.
The directive for this is Wants= or Requires= under [Unit].
website.service
[Unit]
Wants=mongodb.service
After=mongodb.service
The difference between Wants= and Requires= is that with Requires=, a failure to start b.service will cause the startup of a.service to fail, whereas with Wants=, a.service will start even if b.service fails. This is explained in detail on the man page of .unit.