Local 5.0.6+976 - Can't set hosts info on Windows 10

Got a suggestion from support to try the beta, but don’t work for me.

To replicate:

  1. download and install (Windows) Releases - Local
  2. install on different folder then suggested (option “anyone uses this computer”), since I wanted to put it in a folder named “beta”.
  3. login in to flywheel (have teams so I selected my organization)
  4. change preferenses for admin email and site paths (to put beta sites in separate folder)
  5. select local sites
  6. create a new site, default settings

During site creation this popped up:
image
(Uh-oh Could not update hosts file. Local ran into an EPERM error when trying to update the hosts file. Pleas ensure that the hosts file is no set to read-only and/or locked by antivirus.)

and then a warning banner in local saying “Missing hosts entry…”

Clicking [FIX IT] produces same “Uh-oh” as above)

I have done nothing with the host file and/or virus software, and it works fine with 3.3.0.

So I wont try this new local until alpha/rc again, pleas tell your support staff not to recommend this until it is stable :wink:

Kind regards
Håkan


error.log
2019/10/08 10:46:18 [emerg] 2660#17944: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)
2019/10/08 10:46:20 [emerg] 17920#12172: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)
2019/10/08 10:46:21 [emerg] 18268#18272: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)
2019/10/08 10:46:22 [emerg] 17900#18104: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)


local-lightning.log
{“thread”:“main”,“reason”:{“message”:“connect ECANCELED 142.93.187.111:443”,“stack”:“Error: connect ECANCELED 142.93.187.111:443\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)”},“p”:{},“level”:“warn”,“message”:“Unhandled Rejection.”,“timestamp”:“2019-10-08T08:42:06.320Z”}
{“thread”:“main”,“class”:“SiteProvisionerService”,“message”:“Creating site folders…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:00.104Z”}
{“thread”:“main”,“class”:“SiteProvisionerService”,“message”:“Copying service config templates…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:00.112Z”}
{“thread”:“main”,“class”:“ConfigTemplatesService”,“message”:“Compiling service configs…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:00.344Z”}
{“thread”:“main”,“class”:“ConfigTemplatesService”,“message”:“Adding MySQL config…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:00.344Z”}
{“thread”:“main”,“class”:“ConfigTemplatesService”,“message”:“Adding PHP config…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:00.398Z”}
{“thread”:“main”,“class”:“ConfigTemplatesService”,“message”:“Adding Nginx config…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:00.427Z”}
{“thread”:“main”,“class”:“SiteProvisionerService”,“message”:“Initializing MySQL datadir…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:00.474Z”}
{“thread”:“main”,“class”:“ConfigTemplatesService”,“message”:“Compiling service configs…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:06.881Z”}
{“thread”:“main”,“class”:“ConfigTemplatesService”,“message”:“Adding MySQL config…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:06.882Z”}
{“thread”:“main”,“class”:“ConfigTemplatesService”,“message”:“Adding PHP config…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:06.893Z”}
{“thread”:“main”,“class”:“ConfigTemplatesService”,“message”:“Adding Nginx config…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:06.912Z”}
{“thread”:“main”,“class”:“HostsFileService”,“level”:“info”,“message”:“Updating hosts with”,“timestamp”:“2019-10-08T08:46:08.340Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2019-10-08T08:46:07.385977Z 0 [System] [MY-010116] [Server] C:\Program Files (x86)\LocalBeta\resources\extraResources\site-binaries-win32\mysql-8.0.16\bin\mysqld.exe (mysqld 8.0.16) starting as process 18016”,“timestamp”:“2019-10-08T08:46:10.733Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2019-10-08T08:46:10.556819Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.”,“timestamp”:“2019-10-08T08:46:10.734Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2019-10-08T08:46:10.819745Z 0 [System] [MY-010931] [Server] C:\Program Files (x86)\LocalBeta\resources\extraResources\site-binaries-win32\mysql-8.0.16\bin\mysqld.exe: ready for connections. Version: ‘8.0.16’ socket: ‘’ port: 10004 MySQL Community Server - GPL.”,“timestamp”:“2019-10-08T08:46:10.866Z”}
{“thread”:“main”,“class”:“SiteProvisionerService”,“message”:“Setting up MySQL user…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:17.954Z”}
{“thread”:“main”,“class”:“Process”,“process”:“nginx”,“level”:“warn”,“message”:“nginx: [emerg] bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)”,“timestamp”:“2019-10-08T08:46:19.167Z”}
{“thread”:“main”,“class”:“Process”,“process”:“nginx”,“level”:“warn”,“message”:“nginx: [emerg] bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)”,“timestamp”:“2019-10-08T08:46:20.504Z”}
{“thread”:“main”,“class”:“SiteProvisionerService”,“message”:“Creating MySQL database…”,“level”:“info”,“timestamp”:“2019-10-08T08:46:20.844Z”}
{“thread”:“main”,“class”:“Process”,“process”:“nginx”,“level”:“warn”,“message”:“nginx: [emerg] bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)”,“timestamp”:“2019-10-08T08:46:21.662Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“Init WordPressInstaller”,“level”:“info”,“timestamp”:“2019-10-08T08:46:21.676Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“Starting standardInstall()”,“level”:“info”,“timestamp”:“2019-10-08T08:46:21.677Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“maybeGetLatestVersion()”,“level”:“info”,“timestamp”:“2019-10-08T08:46:21.677Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“latestOfflineWpVersion”:null,“level”:“info”,“message”:“Latest offline version info”,“timestamp”:“2019-10-08T08:46:21.678Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“version”:“5.2.3”,“download”:“https://downloads.wordpress.org/release/wordpress-5.2.3.tar.gz",“level”:“info”,“message”:"Latest version info”,“timestamp”:“2019-10-08T08:46:22.634Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“level”:“info”,“message”:“download()”,“timestamp”:“2019-10-08T08:46:22.635Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“level”:“info”,“message”:“Attempting to download WordPress”,“timestamp”:“2019-10-08T08:46:22.636Z”}
{“thread”:“main”,“class”:“Process”,“process”:“nginx”,“level”:“warn”,“message”:“nginx: [emerg] bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)”,“timestamp”:“2019-10-08T08:46:22.992Z”}
{“thread”:“main”,“class”:“HostsFileService”,“error”:{“message”:“Command failed: "C:\Program Files (x86)\LocalBeta\Local.exe" "C:\Program Files (x86)\LocalBeta\resources\app.asar\main\dns\workers\updateHostsFileWorker.js" "testsite.local" "www.testsite.local"\r\n{ [Error: EPERM: operation not permitted, open ‘C:\WINDOWS\System32\drivers\etc\hosts’]\n errno: -4048,\n code: ‘EPERM’,\n syscall: ‘open’,\n path: ‘C:\\WINDOWS\\System32\\drivers\\etc\\hosts’ }\n”,“stack”:“Error: Command failed: "C:\Program Files (x86)\LocalBeta\Local.exe" "C:\Program Files (x86)\LocalBeta\resources\app.asar\main\dns\workers\updateHostsFileWorker.js" "testsite.local" "www.testsite.local"\r\n{ [Error: EPERM: operation not permitted, open ‘C:\WINDOWS\System32\drivers\etc\hosts’]\n errno: -4048,\n code: ‘EPERM’,\n syscall: ‘open’,\n path: ‘C:\\WINDOWS\\System32\\drivers\\etc\\hosts’ }\n\n at C:\Program Files (x86)\LocalBeta\resources\app.asar\node_modules\sudo-prompt\index.js:555:25\n at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3)”},“exitCode”:100,“level”:“error”,“message”:“Could not update hosts.”,“timestamp”:“2019-10-08T08:46:43.520Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“Configuring wp-config.php”,“level”:“info”,“timestamp”:“2019-10-08T08:46:48.537Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“Installing WordPress”,“level”:“info”,“timestamp”:“2019-10-08T08:46:50.505Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“Deleting Akismet and Hello Dolly”,“level”:“info”,“timestamp”:“2019-10-08T08:46:55.174Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“Writing salts to wp-config.php”,“level”:“info”,“timestamp”:“2019-10-08T08:46:58.794Z”}
{“thread”:“main”,“class”:“HostsFileService”,“level”:“info”,“message”:“Updating hosts with”,“timestamp”:“2019-10-08T08:50:04.167Z”}
{“thread”:“main”,“class”:“HostsFileService”,“error”:{“message”:“Command failed: "C:\Program Files (x86)\LocalBeta\Local.exe" "C:\Program Files (x86)\LocalBeta\resources\app.asar\main\dns\workers\updateHostsFileWorker.js" "testsite.local" "www.testsite.local"\r\n{ [Error: EPERM: operation not permitted, open ‘C:\WINDOWS\System32\drivers\etc\hosts’]\n errno: -4048,\n code: ‘EPERM’,\n syscall: ‘open’,\n path: ‘C:\\WINDOWS\\System32\\drivers\\etc\\hosts’ }\n”,“stack”:“Error: Command failed: "C:\Program Files (x86)\LocalBeta\Local.exe" "C:\Program Files (x86)\LocalBeta\resources\app.asar\main\dns\workers\updateHostsFileWorker.js" "testsite.local" "www.testsite.local"\r\n{ [Error: EPERM: operation not permitted, open ‘C:\WINDOWS\System32\drivers\etc\hosts’]\n errno: -4048,\n code: ‘EPERM’,\n syscall: ‘open’,\n path: ‘C:\\WINDOWS\\System32\\drivers\\etc\\hosts’ }\n\n at C:\Program Files (x86)\LocalBeta\resources\app.asar\node_modules\sudo-prompt\index.js:555:25\n at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3)”},“exitCode”:100,“level”:“error”,“message”:“Could not update hosts.”,“timestamp”:“2019-10-08T08:50:08.478Z”}
{“thread”:“main”,“class”:“Process”,“process”:“nginx”,“pid”:788,“level”:“info”,“message”:“Killing process”,“timestamp”:“2019-10-08T08:50:44.680Z”}
{“thread”:“main”,“class”:“Process”,“process”:“phpCgi”,“pid”:2312,“level”:“info”,“message”:“Killing process”,“timestamp”:“2019-10-08T08:50:45.239Z”}
{“thread”:“main”,“class”:“Process”,“process”:“phpCgi”,“pid”:5080,“level”:“info”,“message”:“Killing process”,“timestamp”:“2019-10-08T08:50:45.325Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“pid”:3544,“level”:“info”,“message”:“Killing process”,“timestamp”:“2019-10-08T08:50:45.421Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mailhog”,“pid”:18304,“level”:“info”,“message”:“Killing process”,“timestamp”:“2019-10-08T08:50:45.556Z”}

1 Like

Any updates on this 3 months old post?

I get the same no matter what i try on Win 10. Local (beta) 5.0.6

Can only find info regarding turning of “read only” and make exeption in kaspersky which i have done. also turned off the firewall in desperation, but still the same result.

It was the mailhog.exe and nginx.exe that was preventing the EPERM error in kaspersky, not the firewal or local.exe permission

swithched it all off off and it worked, but had to approve the certificates in win defender after kaspersky was turned off. Switched it back on after hosts was ok