# Deployment issue

**URL:** <https://forum.dfinity.org/t/deployment-issue/24821>\
**Category:** Developers\
**Created:** [November 20, 2023, 5:55am UTC](https://forum.dfinity.org/t/deployment-issue/24821 "2023-11-20T05:55:30Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown84502](https://avatars.discourse-cdn.com/v4/letter/u/bbce88/32.png) [@unknown84502](https://forum.dfinity.org/u/unknown84502)\
**Post date:** [November 20, 2023, 5:55am UTC](https://forum.dfinity.org/t/deployment-issue/24821/1 "2023-11-20T05:55:30Z")

</div>

Hello Community,

I hope this message finds you well. I’m currently working on a DFINITY project using the dfx tool, and I’ve encountered an issue during the deployment process that I’m having trouble resolving.

**Error Message** :

```auto
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed to get wallet canister caller for identity 'sai' on network 'local'.
    Failed to get wallet for identity 'sai' on network 'local'.
      Failed to create wallet for identity 'sai' on network 'local'.
        Failed while installing wasm.
          The replica returned an HTTP Error: Http Error: status 500 Internal Server Error, content type "", content: Internal Server Error

```

Additionally, I encountered a separate issue when running the dfx start command:

```auto
thread 'MR Batch Processor' panicked at 'MmapPageAllocator failed to mmap 765952 bytes to memory file #35 at offset 0 for deserialization: ENOEXEC: Exec format error', rs/replicated_state/src/page_map/page_allocator/mmap.rs:615:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

```

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [November 20, 2023, 10:01am UTC](https://forum.dfinity.org/t/deployment-issue/24821/2 "2023-11-20T10:01:08Z")

</div>

Did you try `dfx start --clean`?

---

<div class="post-metadata">

**Author:** ![unknown84502](https://avatars.discourse-cdn.com/v4/letter/u/bbce88/32.png) [@unknown84502](https://forum.dfinity.org/u/unknown84502)\
**Post date:** [November 20, 2023, 10:13am UTC](https://forum.dfinity.org/t/deployment-issue/24821/3 "2023-11-20T10:13:43Z")

</div>

yes i am using `dfx start --clean` but when i am deploying it i am getting error in deployment terminal and

```auto
thread 'MR Batch Processor' panicked at 'MmapPageAllocator failed to mmap 765952 bytes to memory file #35 at offset 0 for deserialization: ENOEXEC: Exec format error', rs/replicated_state/src/page_map/page_allocator/mmap.rs:615:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

```

this in start terminal

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [November 20, 2023, 10:25am UTC](https://forum.dfinity.org/t/deployment-issue/24821/4 "2023-11-20T10:25:27Z")

</div>

I’ll ask round what the problem could be… What system are you running this on? macOS?

---

<div class="post-metadata">

**Author:** ![unknown84502](https://avatars.discourse-cdn.com/v4/letter/u/bbce88/32.png) [@unknown84502](https://forum.dfinity.org/u/unknown84502)\
**Post date:** [November 20, 2023, 10:29am UTC](https://forum.dfinity.org/t/deployment-issue/24821/5 "2023-11-20T10:29:17Z")

</div>

I am using windows with wsl2

---

<div class="post-metadata">

**Author:** ![unknown84502](https://avatars.discourse-cdn.com/v4/letter/u/bbce88/32.png) [@unknown84502](https://forum.dfinity.org/u/unknown84502)\
**Post date:** [November 20, 2023, 11:00am UTC](https://forum.dfinity.org/t/deployment-issue/24821/6 "2023-11-20T11:00:28Z")

</div>

```auto
thread 'MR Batch Processor' panicked at 'MmapPageAllocator failed to mmap 765952 bytes to memory file #34 at offset 0 for deserialization: ENOEXEC: Exec format error', rs/replicated_state/src/page_map/page_allocator/mmap.rs:615:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2023-11-20T10:15:48.936877Z ERROR icx_proxy_dev::proxy: Internal Error during request:
error trying to connect: tcp connect error: Connection refused (os error 111)
2023-11-20T10:15:48.942658Z ERROR tower_http::trace::on_failure: response failed classification=Status code: 500 Internal Server Error latency=16 ms
Stopping icx-proxy...
Stopped.

```

---

<div class="post-metadata">

**Author:** ![ulan](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ulan/32/2705_2.png) [@ulan](https://forum.dfinity.org/u/ulan)\
**Post date:** [November 20, 2023, 11:15am UTC](https://forum.dfinity.org/t/deployment-issue/24821/7 "2023-11-20T11:15:47Z")

</div>

Thanks for the report @unknown84502.

The error looks like a bug in WSL: [mmap(NULL, ...) on zero-length file fails with ENOEXEC · Issue #3451 · microsoft/WSL · GitHub](https://github.com/microsoft/WSL/issues/3451)

What does `wsl -l -v` show for you?

---

<div class="post-metadata">

**Author:** ![unknown84502](https://avatars.discourse-cdn.com/v4/letter/u/bbce88/32.png) [@unknown84502](https://forum.dfinity.org/u/unknown84502)\
**Post date:** [November 20, 2023, 11:20am UTC](https://forum.dfinity.org/t/deployment-issue/24821/8 "2023-11-20T11:20:51Z")

</div>

PS C:\WINDOWS\system32\> wsl -l -v  
NAME STATE VERSION

- Ubuntu Running 1

---

<div class="post-metadata">

**Author:** ![ulan](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ulan/32/2705_2.png) [@ulan](https://forum.dfinity.org/u/ulan)\
**Post date:** [November 20, 2023, 1:37pm UTC](https://forum.dfinity.org/t/deployment-issue/24821/9 "2023-11-20T13:37:13Z")

</div>

That means Ubuntu is using WSL 1. Would you mind switching to WSL 2 using

```auto
wsl --set-version Ubuntu 2

```

And the verify with

```auto
wsl -l -v

```

It should say “Ubuntu Running 2”

---

<div class="post-metadata">

**Author:** ![ulan](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ulan/32/2705_2.png) [@ulan](https://forum.dfinity.org/u/ulan)\
**Post date:** [November 20, 2023, 1:39pm UTC](https://forum.dfinity.org/t/deployment-issue/24821/10 "2023-11-20T13:39:29Z")

</div>

Here is the documentation: [Install WSL | Microsoft Learn](https://learn.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2)

---

<div class="post-metadata">

**Author:** ![unknown84502](https://avatars.discourse-cdn.com/v4/letter/u/bbce88/32.png) [@unknown84502](https://forum.dfinity.org/u/unknown84502)\
**Post date:** [November 20, 2023, 1:48pm UTC](https://forum.dfinity.org/t/deployment-issue/24821/11 "2023-11-20T13:48:11Z")

</div>

PS C:\WINDOWS\system32\> wsl --set-version Ubuntu 2  
For information on key differences with WSL 2 please visit [Comparing WSL Versions | Microsoft Learn](https://aka.ms/wsl2)  
Conversion in progress, this may take a few minutes.  
Failed to configure network (networkingMode Nat). To disable networking, set `wsl2.networkingMode=None` in C:\Users\MY PC.wslconfig  
Error code: Wsl/Service/CreateVm/ConfigureNetworking/HNS/ERROR\_FILE\_NOT\_FOUND

---

<div class="post-metadata">

**Author:** ![ulan](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ulan/32/2705_2.png) [@ulan](https://forum.dfinity.org/u/ulan)\
**Post date:** [November 20, 2023, 1:52pm UTC](https://forum.dfinity.org/t/deployment-issue/24821/12 "2023-11-20T13:52:32Z")

</div>

Looks like another issue in WSL. People report some workarounds here:

> <https://github.com/microsoft/WSL/issues/10709>
>
> \### Windows Version
> 
> Microsoft Windows \[Version 10.0.22631.2506\]
> 
> \### WSL Ve…rsion
> 
> 2.0.7.0
> 
> \### Are you using WSL 1 or WSL 2?
> 
> \- \[X\] WSL 2
> \- \[\] WSL 1
> 
> \### Kernel Version
> 
> \_Linux version 5.15.133.1-microsoft-standard-WSL2 (root@1c602f52c2e4) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Thu Oct 5 21:02:42 UTC 2023\_
> 
> \### Distro Version
> 
> \_Ubuntu 22.04\_
> 
> \### Other Software
> 
> \_No response\_
> 
> \### Repro Steps
> 
> 1. Launch a WSL instance
> \* I usually do this by opening Terminal which defaults to my Ubuntu setup, but I can also repro this by just launching wsl.exe from Powershell
> 
> \### Expected Behavior
> 
> WSL Distro successfully starts
> 
> \### Actual Behavior
> 
> Following error is received
> 
> 
> \`\`\`
> Failed to configure network (networkingMode Nat). To disable networking, set \`wsl2.networkingMode=None\` in C:\\Users\\bjgra\\.wslconfig
> Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0x80070424
> 
> \[process exited with code 4294967295 (0xffffffff)\]
> You can now close this terminal with Ctrl+D, or press Enter to restart.
> \`\`\`
> 
> Not sure how noteworthy it is but there is no .wslconfig file at the directory specified. 
> 
> \### Diagnostic Logs
> 
> \[WslLogs-2023-11-07\_17-30-23.zip - Launching Terminal with VMP Disabled\](https://github.com/microsoft/WSL/files/13289725/WslLogs-2023-11-07\_17-30-23.zip)
> \[WslLogs-2023-11-07\_17-32-12.zip - After enabling VMP again\](https://github.com/microsoft/WSL/files/13289726/WslLogs-2023-11-07\_17-32-12.zip)
