Can't create Local site under WSL2 Pengwin distro

I cannot add a new site on Windows 10 Pro with WSL2 and Pengwin distro. No matter if starting Local through sudo or not, always the same problems:

[GraphQL error]: Message: Unauthenticated., Location: [object Object], Path: logout
[GraphQL error]: Message: Unauthenticated., Location: [object Object], Path: logout
Warning: connect.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.
(local:12890): dconf-WARNING **: 10:45:06.336: failed to commit changes to dconf: Unknown or unsupported transport “disabled” for address “disabled:”
6/30/2021, 10:45:58 AM [info] [main] SiteProvisionerService: Creating site folders...
6/30/2021, 10:45:58 AM [info] [main] SiteProvisionerService: Copying service config templates...
6/30/2021, 10:45:58 AM [info] [main] ConfigTemplatesService: Compiling service configs...
6/30/2021, 10:45:58 AM [info] [main] undefined: Initializing MySQL datadir... -- {"service":{},"serviceBinVersion":{},"dataPath":"%%site.runData%%/mysql/data"}
6/30/2021, 10:46:05 AM [info] [main] ConfigTemplatesService: Compiling service configs...
6/30/2021, 10:46:05 AM [warn] [main] Process: [30-Jun-2021 10:46:05] ALERT: [pool www] user has not been defined -- {"process":"phpFpm"}
6/30/2021, 10:46:05 AM [warn] [main] Process: [30-Jun-2021 10:46:05] ERROR: failed to post process the configuration -- {"process":"phpFpm"}
6/30/2021, 10:46:05 AM [warn] [main] Process: [30-Jun-2021 10:46:05] ERROR: FPM initialization failed -- {"process":"phpFpm"}
6/30/2021, 10:46:05 AM [error] [main] SiteProcessManagerService: Unable to start site. -- {"stack":{}}
6/30/2021, 10:46:56 AM [info] [main] Process: Killing process -- {"process":"mailhog","pid":13450}
6/30/2021, 10:46:56 AM [info] [main] Process: Killing process -- {"process":"nginx","pid":13460}
6/30/2021, 10:46:56 AM [info] [main] Process: Killing process -- {"process":"mysql","pid":13461}
6/30/2021, 10:46:56 AM [error] [main] SiteProvisionerService: Unable to provision site. -- {"stack":{}}
6/30/2021, 10:47:00 AM [warn] [main] undefined: Unhandled Rejection. -- {"reason":{},"p":{}}
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: undefined
6/30/2021, 10:47:00 AM [warn] [main] undefined: Unhandled Rejection. -- {"reason":{"error":{"killed":false,"code":127,"signal":null,"cmd":"cd \"/home/crolug\"; \"/usr/bin/pkexec\" --disable-internal-agent /bin/bash -c \"echo SUDOPROMPT; setcap cap_net_bind_service=+ep %%resourcesPath%%/lightning-services/nginx-1.16.0+5/bin/linux/sbin/nginx\""},"stdout":"","stderr":"Error getting authority: Error initializing authority: Could not connect: No such file or directory\n","exitCode":127},"p":{}}
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
{
  error: Error: User did not grant permission.
      at ChildProcess.exithandler (child_process.js:317:12)
      at ChildProcess.emit (events.js:315:20)
      at ChildProcess.EventEmitter.emit (domain.js:467:12)
      at maybeClose (internal/child_process.js:1048:16)
      at Socket.<anonymous> (internal/child_process.js:439:11)
      at Socket.emit (events.js:315:20)
      at Socket.EventEmitter.emit (domain.js:467:12)
      at Pipe.<anonymous> (net.js:673:12) {
    killed: false,
    code: 127,
    signal: null,
    cmd: 'cd "/home/crolug"; "/usr/bin/pkexec" --disable-internal-agent /bin/bash -c "echo SUDOPROMPT; setcap cap_net_bind_service=+ep /opt/Local/resources/extraResources/lightning-services/nginx-1.16.0+5/bin/linux/sbin/nginx"'
  },
  stdout: '',
  stderr: 'Error getting authority: Error initializing authority: Could not connect: No such file or directory\n',
  exitCode: 127
}
6/30/2021, 10:47:00 AM [info] [main] HostsFileService: Updating hosts with
6/30/2021, 10:47:00 AM [info] [main] DeleteSiteService: Deleting %%site.runData%%
(electron) ' function' is deprecated and will be removed. Please use 'shell.trashItem function' instead.
6/30/2021, 10:47:00 AM [warn] [main] Process: [30-Jun-2021 10:47:00] ALERT: [pool www] user has not been defined -- {"process":"phpFpm"}
6/30/2021, 10:47:00 AM [warn] [main] Process: [30-Jun-2021 10:47:00] ERROR: failed to post process the configuration -- {"process":"phpFpm"}
6/30/2021, 10:47:00 AM [warn] [main] Process: [30-Jun-2021 10:47:00] ERROR: FPM initialization failed -- {"process":"phpFpm"}
6/30/2021, 10:47:00 AM [error] [main] HostsFileService: Could not update hosts. -- {"error":{"killed":false,"code":127,"signal":null,"cmd":"cd \"/home/crolug\"; export ELECTRON_RUN_AS_NODE=\"1\"; \"/usr/bin/pkexec\" --disable-internal-agent /bin/bash -c \"echo SUDOPROMPT; export ELECTRON_RUN_AS_NODE=\\\"1\\\";/opt/Local/local %%appPath%%/main/dns/workers/updateHostsFileWorker.js wordpress.local www.wordpress.local\""},"stdout":"","stderr":"Error getting authority: Error initializing authority: Could not connect: No such file or directory\n","exitCode":127}
6/30/2021, 10:47:05 AM [warn] [main] Process: [30-Jun-2021 10:47:05] ALERT: [pool www] user has not been defined -- {"process":"phpFpm"}
6/30/2021, 10:47:05 AM [warn] [main] Process: [30-Jun-2021 10:47:05] ERROR: failed to post process the configuration -- {"process":"phpFpm"}
6/30/2021, 10:47:05 AM [warn] [main] Process: [30-Jun-2021 10:47:05] ERROR: FPM initialization failed -- {"process":"phpFpm"}
6/30/2021, 10:47:05 AM [warn] [main] undefined: Unhandled Rejection. -- {"reason":{},"p":{}}
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
TypeError: Cannot read property 'on' of undefined
    at /opt/Local/resources/app.asar/renderer/_helpers/ipcAsync.js:1:1211
    at new Promise (<anonymous>)
    at Object.<anonymous> (/opt/Local/resources/app.asar/renderer/_helpers/ipcAsync.js:1:1168)
    at Generator.next (<anonymous>)
    at /opt/Local/resources/app.asar/renderer/_helpers/ipcAsync.js:1:330
    at new Promise (<anonymous>)
    at __awaiter (/opt/Local/resources/app.asar/renderer/_helpers/ipcAsync.js:1:75)
    at Object.ipcAsync [as default] (/opt/Local/resources/app.asar/renderer/_helpers/ipcAsync.js:1:1050)
    at DeleteSiteService.<anonymous> (/opt/Local/resources/app.asar/main/sites/DeleteSiteService.js:1:2674)
    at Generator.next (<anonymous>)
6/30/2021, 10:47:05 AM [warn] [main] undefined: Unhandled Rejection. -- {"reason":{},"p":{}}
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
TypeError: Cannot read property 'send' of undefined
    at Object.<anonymous> (/opt/Local/resources/app.asar/renderer/_helpers/ipcAsync.js:1:1305)
    at Generator.next (<anonymous>)
    at /opt/Local/resources/app.asar/renderer/_helpers/ipcAsync.js:1:330
    at new Promise (<anonymous>)
    at __awaiter (/opt/Local/resources/app.asar/renderer/_helpers/ipcAsync.js:1:75)
    at Object.ipcAsync [as default] (/opt/Local/resources/app.asar/renderer/_helpers/ipcAsync.js:1:1050)
    at DeleteSiteService.<anonymous> (/opt/Local/resources/app.asar/main/sites/DeleteSiteService.js:1:2674)
    at Generator.next (<anonymous>)
    at n (/opt/Local/resources/app.asar/main/sites/DeleteSiteService.js:1:132)
6/30/2021, 10:47:05 AM [warn] [main] Process: [30-Jun-2021 10:47:05] ERROR: the global prefix '%%site.runData%%/conf/php' does not exist or is not a directory -- {"process":"phpFpm"}
6/30/2021, 10:47:05 AM [warn] [main] Process: [30-Jun-2021 10:47:05] ERROR: FPM initialization failed -- {"process":"phpFpm"}
6/30/2021, 10:47:06 AM [info] [main] HostsFileService: Updating hosts with
6/30/2021, 10:47:06 AM [error] [main] HostsFileService: Could not update hosts. -- {"error":{"killed":false,"code":127,"signal":null,"cmd":"cd \"/home/crolug\"; export ELECTRON_RUN_AS_NODE=\"1\"; \"/usr/bin/pkexec\" --disable-internal-agent /bin/bash -c \"echo SUDOPROMPT; export ELECTRON_RUN_AS_NODE=\\\"1\\\";/opt/Local/local %%appPath%%/main/dns/workers/updateHostsFileWorker.js\""},"stdout":"","stderr":"Error getting authority: Error initializing authority: Could not connect: No such file or directory\n","exitCode":127}
6/30/2021, 10:47:15 AM [warn] [main] DeleteSiteService: Could not trash

Hey @SFAT.LLC, Welcome to the Local Community Forums!

This is a brave new world, and I think you’re likely the first person to try running Local on Pengwin under WSL2!

:tada: :larry: :tada:

From the error, it seems like Local wasn’t able to get admin permissions to “do something” - probably start up the various server processes.

It might be just a matter of a missing dependency under Pengwin, so a couple of things you can try:

  1. Install the regular Windows Version. This isn’t as cutting edge, so you’ll likely be able to get a site up and running, but then again, we aren’t breaking things and learning about new tech!

  2. Try a different distro? Local has been tested most under Ubuntu, so you might try installing Ubuntu under WSL2 and see if that gets Local to run for you.

Also, as we start to see more of this type of experimentation, you might check the other topics that are tagged as wsl2

I got the same SiteProcessManagerService: Unable to start site. -- {"stack":{}} error running Ubuntu 20.04 in WSL2… but the other poster in that thread seems to have it working! who knows. brave new world indeed.

Well yeah, running Windows version is an alternative, but of course the idea is to make it work inside my everyday dev environment :slightly_smiling_face:

@helgatheviking tried Ubuntu already, so there’s definitely something not right. And yes, I was trying elevated user. :man_shrugging:t3:

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