Preface
This article introduces you in detail the relevant content on solving the not found problem. The article introduces it in detail. Let’s take a look at the detailed introduction below:
Environment introduction
Environment: ubuntu 16.04 64
php version: php-7.1.4
Discover problems
Normally compile and install php according to the previous process,-fpm
Copy to /etc//php-fpm
Then prepare to executeservice php-fpm start
An error occurred while
The error is as follows
Failed to start : Unit not found.
hint not found
At first I thought it was a problem with php compilation and installation, so I went to the php directory to execute php-fpm, and everything was normal
But it can't be managed with service
Check the php-fpm management script directly, try debugging, and finally find executionservice
This script was not executed at all when the command was
Basically exclude php problems
Solution
Finally searchedservice
Command information to find a solution
In ubuntu 16.04, in addition to copying the file to the /etc// directory, adding a service also requires the following command
php-fpm defaults // Add to ServiceName defaults // delete ServiceName remove
After solving it, I found that I had run php-fpm separately before. Nowservice
There is a problem with the operation
[05-May-2017 17:09:32] ERROR: An another FPM instance seems to already listen on /run/php/php7. [05-May-2017 17:09:32] ERROR: FPM initialization failed
We already have a php-fpm running. Since I run it in sock mode, I didn't find the pid. I looked at the code of the php-fpm management script and found a solution.
stop) echo -n "Gracefully shutting down php-fpm " if [ ! -r $php_fpm_PID ] ; then echo "warning, no pid file found - php-fpm is not running ?" exit 1 fi kill -QUIT `cat $php_fpm_PID` wait_for_pid removed $php_fpm_PID if [ -n "$try" ] ; then echo " failed. Use force-quit" exit 1 else echo " done" fi ;;
Direct execution
kill -QUIT `cat php_fpm_PIDThe path`
Summarize
The above is the entire content of this article. I hope the content of this article will be of some help to your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support.