5.9.8 - how do I manually restart a site's apache? Error 405

Issue Summary

When idling, Local has issues maintaining httpd on for apache based sites. It also fails to restart the process when restarting the site itself. The port the router is trying to proxy is not actively listening.

The only fix I found is restarting host – very poor user experience and I’m considering dumping Local.

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    Apache based sites, unable to determine frequency or race conditions.

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    Yes, I can do so with both nginx and apache.

Replication

Add apache site, work on it, leave it on overnight, come back to a borked router and error 405. The only fix is a system reboot.

System Details

  • Which version of Local is being used?
    5.9.8

  • What Operating System (OS) and OS version is being used?
    macOS Mojave 10.14.4

Logs don’t tell me anything interesting.

// I hit restart on the apache based site here
{"thread":"main","reason":{},"p":{},"level":"warn","message":"Unhandled Rejection.","timestamp":"2021-03-31T17:20:55.706Z"}
{"thread":"main","class":"Process","process":"mailhog","pid":20214,"level":"info","message":"Killing process","timestamp":"2021-03-31T17:21:04.318Z"}
{"thread":"main","class":"Process","process":"phpFpm","pid":20216,"level":"info","message":"Killing process","timestamp":"2021-03-31T17:21:04.332Z"}
{"thread":"main","class":"Process","process":"mysql","pid":20217,"level":"info","message":"Killing process","timestamp":"2021-03-31T17:21:04.347Z"}
{"thread":"main","class":"Process","process":"httpd","pid":20218,"level":"info","message":"Killing process","timestamp":"2021-03-31T17:21:04.369Z"}
{"thread":"main","class":"ConfigTemplatesService","message":"Compiling service configs...","level":"info","timestamp":"2021-03-31T17:21:05.418Z"}
{"thread":"main","class":"Process","process":"httpd","level":"warn","message":"AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using macpro.local. Set the 'ServerName' directive globally to suppress this message","timestamp":"2021-03-31T17:21:05.560Z"}
{"thread":"main","class":"Process","process":"nginx","pid":20220,"level":"info","message":"Killing process","timestamp":"2021-03-31T17:21:05.621Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.672266Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).","timestamp":"2021-03-31T17:21:05.675Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.672599Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled","timestamp":"2021-03-31T17:21:05.675Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.672656Z 0 [Note] %%userDataPath%%/lightning-services/mysql-5.7.28+4/bin/darwin/bin/mysqld (mysqld 5.7.28) starting as process 22107 ...","timestamp":"2021-03-31T17:21:05.676Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.672699Z 0 [ERROR] Can't find error-message file '/usr/local/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.","timestamp":"2021-03-31T17:21:05.676Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.673955Z 0 [Warning] Setting lower_case_table_names=2 because file system for %%site.runData%%/mysql/data/ is case insensitive","timestamp":"2021-03-31T17:21:05.676Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.676256Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins","timestamp":"2021-03-31T17:21:05.677Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.676276Z 0 [Note] InnoDB: Uses event mutexes","timestamp":"2021-03-31T17:21:05.677Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.676283Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier","timestamp":"2021-03-31T17:21:05.678Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.676288Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11","timestamp":"2021-03-31T17:21:05.678Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.676592Z 0 [Note] InnoDB: Number of pools: 1","timestamp":"2021-03-31T17:21:05.678Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.676713Z 0 [Note] InnoDB: Using CPU crc32 instructions","timestamp":"2021-03-31T17:21:05.678Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.678487Z 0 [Note] InnoDB: Initializing buffer pool, total size = 32M, instances = 1, chunk size = 32M","timestamp":"2021-03-31T17:21:05.679Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.683548Z 0 [Note] InnoDB: Completed initialization of buffer pool","timestamp":"2021-03-31T17:21:05.684Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.713582Z 0 [Note] InnoDB: Highest supported file format is Barracuda.","timestamp":"2021-03-31T17:21:05.714Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.748989Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables","timestamp":"2021-03-31T17:21:05.749Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.749190Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...","timestamp":"2021-03-31T17:21:05.750Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.789478Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.","timestamp":"2021-03-31T17:21:05.790Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.791689Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.","timestamp":"2021-03-31T17:21:05.793Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.791749Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.","timestamp":"2021-03-31T17:21:05.793Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.793580Z 0 [Note] InnoDB: 5.7.28 started; log sequence number 383895844","timestamp":"2021-03-31T17:21:05.794Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.793745Z 0 [Note] InnoDB: Loading buffer pool(s) from %%site.runData%%/mysql/data/ib_buffer_pool","timestamp":"2021-03-31T17:21:05.796Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.794209Z 0 [Note] Plugin 'FEDERATED' is disabled.","timestamp":"2021-03-31T17:21:05.797Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.809692Z 0 [Note] InnoDB: Buffer pool(s) load completed at 210331 13:21:05","timestamp":"2021-03-31T17:21:05.810Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.814619Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.","timestamp":"2021-03-31T17:21:05.815Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.814694Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.","timestamp":"2021-03-31T17:21:05.815Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.816820Z 0 [Warning] CA certificate ca.pem is self signed.","timestamp":"2021-03-31T17:21:05.817Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.817978Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.","timestamp":"2021-03-31T17:21:05.818Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.818287Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 10053","timestamp":"2021-03-31T17:21:05.818Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.818792Z 0 [Note]   - '127.0.0.1' resolves to '127.0.0.1';","timestamp":"2021-03-31T17:21:05.819Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.818885Z 0 [Note] Server socket created on IP: '127.0.0.1'.","timestamp":"2021-03-31T17:21:05.820Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.892047Z 0 [Note] Event Scheduler: Loaded 0 events","timestamp":"2021-03-31T17:21:05.897Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-31T17:21:05.892233Z 0 [Note] ","timestamp":"2021-03-31T17:21:05.898Z"}

Turned on debug logging, nothing about error 405 in the router’s logs, or site’s apache logs. Yet nginx pushes that 405 in my face like a vegan does kale.

curl wepamijoquefue.local --head
HTTP/1.1 405 Method Not Allowed
Server: nginx/1.16.0
Date: Wed, 31 Mar 2021 19:23:08 GMT
Connection: keep-alive

dammit

Canary Mail is listening on 127.0.0.1:10054 and httpd is set to *:10054 so it never complained about not being able to listen on the loopback interface.

A nice improvement idea: double check that the port is not in use when assigning one.

I guess I won’t dump Local yet, at least until I figure out docker.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.