Setup Failed: Could not start up: Error in setup

bench --site site1.local reinstall

I had the same issue - new installation of bench, frappe(develop) and erpnext(develop), running in development. Tried bench --site site1.local reinstall, no difference. Nothing unusual in the bench terminal output.
Tried going back in the options and changing language from ‘English (United Kingdom)’ to ‘English’ - success first time. Possibly a coincidence, possibly not? I did also run ‘bench config http_timeout 6000’ though.

1 Like

I kept clicking retry until it worked. this was exactly what worked for me eventually.

1 Like

Clicked retry 3 times until it worked

1 Like

This was my experience too… It wasn’t working until it was. Very confusing! Definitely more than 3 times clicking retry for me. But now it is up and we are evaluating it to see if we want to switch (from Odoo 9)!

Will you share your feedback after evaluation?

I think it’s because the werkzeug WSGI server reloaded when the python source code altered/updated hence the existing http connection will close too (broken pipe). The benefit of autoreload is we don’t have to restart the server/bench when we update the python source code.

Same for me, it wasn’t working and I just kept clicking retry button until it finally did.

for me, worked after 4 times retrying

@golfergamer retry until it works i have done it 5 times retry

Observed the same issue in a vanilla Debian 9 / Python 3 / ERPNext V12 --develop instance.

Had applied Setup Wizard: Could not start up: Error in setup - #2 by lasalesi

And then basically just clicked retry - retry - retry - retry (4x) then a background worker error came up but it went through…

why do we need to retry. Is there any technical explanation to this somewhere?

cd frappe-bench
bench switch-to-branch master
bench update --patch

This solved the issue for me without multiple tries

My observation:

  • in completing setup, several processes (and data writing) need to be done.
  • somehow in the middle, the process can take too long a time, or simply just got broken.
  • so the process stop and notify as failed.
  • when retrying, the process starts over, but since the previous process has done (or the data has been written), those process just ignored (or bypassed). And the process continue with the next.
  • do this retry several times, and finally the whole process (and data) is completed.
  • now you get that: “…and finally it works” :grinning: which actually (maybe) it does work from the beginning but the process que just gets in the way.

I don’t know what happen behind the screen, but that is just my observation. So maybe the “updates” need to handle those queing process?

Thank you.

1 Like

Exactly it’s work after 10 retry retry…;
I found on the logs that issues where detected on the modification of *.cpython-35.pyc, where * is any module; And after retry, the file is not the same…As @rahy said it seems like the retry correct the file…
Thanks to all

1 Like

A simple trick I learned, Start the process as production then after you set up, go back to dev.

bench start --no-dev

My speculation is that frappe pre-builds things perfectly when using production.

3 Likes

Thank you my good man. It works perfectly.

Thanks worked!!

I’m experiencing the same problem, but there was an error. I have tried again and again, but nothing has changed.Could someone please assist me with this?

Mine is same but default company setup issue. You have fix for this?