# Stopping and Starting dfx errors out

**URL:** <https://forum.dfinity.org/t/stopping-and-starting-dfx-errors-out/13338>\
**Category:** Developers\
**Created:** [May 28, 2022, 11:48pm UTC](https://forum.dfinity.org/t/stopping-and-starting-dfx-errors-out/13338 "2022-05-28T23:48:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ktimam](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ktimam/32/5964_2.png) [@ktimam](https://forum.dfinity.org/u/ktimam)\
**Post date:** [May 28, 2022, 11:48pm UTC](https://forum.dfinity.org/t/stopping-and-starting-dfx-errors-out/13338/1 "2022-05-28T23:48:45Z")

</div>

When i try to stop dfx and strart again, it errors out with the following log (starting clean is fine, just need a way to resume work after stopping):

May 28 23:36:46.937 CRIT s:lq2ff-dmkqb-3gpo2-4c3q6-k7q2g-rbonj-kdaj5-wy5ih-q54hf-33fjl-jqe/n:4oefc-35wkk-2sued-wzic7-olkwq-mkz4m-qhpfg-fsdg4-omdxy-r4xvf-nae/ic\_state\_manager/ic\_state\_manager Failed to reset tip to checkpoint height: IoError { path: “/projectpath/.dfx/state/replicated\_state/node-100/state/tip”, message: “Failed to convert reset tip to checkpoint to 0000000000000320 (err kind: PermissionDenied)”, io\_err: Custom { kind: PermissionDenied, error: “failed to copy /projectpath/.dfx/state/replicated\_state/node-100/state/checkpoints/0000000000000320/bitcoin/testnet/state.pbuf → /projectpath/.dfx/state/replicated\_state/node-100/state/tip/bitcoin/testnet/state.pbuf: Permission denied (os error 13)” } }

Using version 0.10.0 and defi motoko sample from dfinity samples

---

<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:** [May 30, 2022, 7:01am UTC](https://forum.dfinity.org/t/stopping-and-starting-dfx-errors-out/13338/2 "2022-05-30T07:01:40Z")

</div>

Sounds like some of your folder permissions are weird. Did you by accident run dfx as sudo?

I recommend you try running `chown -R <your username> .dfx` in your project root.

---

<div class="post-metadata">

**Author:** ![ktimam](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ktimam/32/5964_2.png) [@ktimam](https://forum.dfinity.org/u/ktimam)\
**Post date:** [May 30, 2022, 4:37pm UTC](https://forum.dfinity.org/t/stopping-and-starting-dfx-errors-out/13338/3 "2022-05-30T16:37:39Z")

</div>

Tried it, still giving the same error. I didn’t use sudo at anytime.  
Worth noting that i am using wsl on windows 10.

---

<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:** [May 31, 2022, 6:34am UTC](https://forum.dfinity.org/t/stopping-and-starting-dfx-errors-out/13338/4 "2022-05-31T06:34:45Z")

</div>

Oh Windows… Side note: The replica has problems on WSL at the moment: [Error: The replica returned an HTTP Error: Http Error: status 500 Internal Server Error, content type "" , content: Internal Server Error · Issue #2157 · dfinity/sdk · GitHub](https://github.com/dfinity/sdk/issues/2157)

I’ll ping someone from the right team to help you in this case. I’m not used to debugging these issues… But what they’ll want to know for sure is if you are on WSL1 or WSL2. AFAIK only WSL2 is supported.

---

<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:** [May 31, 2022, 9:33am UTC](https://forum.dfinity.org/t/stopping-and-starting-dfx-errors-out/13338/5 "2022-05-31T09:33:48Z")

</div>

Seems to be a problem with the replica where a function is used that’s not compatible with WSL. We’ll have to wait for a new replica release.

---

<div class="post-metadata">

**Author:** ![ktimam](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ktimam/32/5964_2.png) [@ktimam](https://forum.dfinity.org/u/ktimam)\
**Post date:** [May 31, 2022, 9:45pm UTC](https://forum.dfinity.org/t/stopping-and-starting-dfx-errors-out/13338/6 "2022-05-31T21:45:28Z")

</div>

Thanks for taking the time to share the info, much appreciated.
