Setup_wizard.js missing - no solution helped so far

Hey again,
after a successful installation run (finally!) I run into this error straight away:

FileNotFoundError: [Errno 2] No such file or directory: ’./assets/erpnext/js/setup_wizard.js’

There are a number of threads on here already, but none of the suggested solutions helped me so far.
Which of the three setup_wizard.js files contained in the installation is the right one, and where should I copy or link it to?

Edit: :sob: After a restart I get an Internal Server Error even though MySQL/MariaDB are up and running. And I did not change a single thing.

May we know what command resulted in that error message? A screenshot of the command or paste or the complete terminal output may help .

Please check your MySQL user accounts permission

@smino It’s no command nor a terminal error message. It’s a small popup bubble on top of the browser screen when I open it for the first time after install. No login, nothing on the screen.

@manasan Thank you, will do.

Can you check your log files to tell us what the internal server error is? All of this sounds like an nginx configuration issue.

I am at it. I can pretty certainly rule out a nginx error though - it’s a self hosted fresh installation on an as fresh Ubuntu 20.04.1 inside a Virtualbox VM. I used this guide from here and followed it step by step, I got a number of errors on the way but they were covered by the very same guide, so in the end I got an error-free run of the whole install script. Next I opened the browser and got the error message I posted. Then I poked around a little, found some places where the wizard file was to be found, did not find the place where it was supposed to go, later on restarted and was greeted by tje internal server error (without actually changing things concerning the missing Setup_wizard.js).

Sorry, I was unclear…not the error report being posted to your browser, the actual nginx log files. On ubuntu, that would probably be at /var/log/nginx/error.log

Yep. And you were probably right:

2020/12/14 12:38:17 [notice] 57790#57790: signal process started
2020/12/14 14:16:00 [alert] 57791#57791: *218 open socket #29 left in connection 3
2020/12/14 14:16:00 [alert] 57791#57791: *219 open socket #36 left in connection 16
2020/12/14 14:16:00 [alert] 57791#57791: aborting
2020/12/14 14:16:21 [notice] 67283#67283: signal process started
2020/12/14 14:16:29 [error] 67284#67284: *8 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: site1.local, request: "GET /socket.io/?EIO=3&transport=polling&t=NPXPIv5 HTTP/1.1", upstream: "http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=NPXPIv5", host: "localhost", referrer: "http://localhost/desk"
2020/12/14 14:16:31 [error] 67284#67284: *8 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: site1.local, request: "GET /socket.io/?EIO=3&transport=polling&t=NPXPJED HTTP/1.1", upstream: "http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=NPXPJED", host: "localhost", referrer: "http://localhost/desk"
2020/12/14 14:16:35 [error] 67284#67284: *15 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: site1.local, request: "GET /api/method/frappe.realtime.get_user_info?sid=c50a774724f8422547fee875e0536e0c242bc894f17f4987170732d9 HTTP/1.1", upstream: "http://127.0.0.1:8000/api/method/frappe.realtime.get_user_info?sid=c50a774724f8422547fee875e0536e0c242bc894f17f4987170732d9", host: "localhost"
2020/12/14 15:20:39 [notice] 8229#8229: signal process started

I don’t know much about how network interfaces work in virtualbox, unfortunately. One thing to check would be your socket process. Can you post the output of sudo supervisorctl status ?

While I don’t know if there’s anything missing, this one is at least error free:

frappe-bench-redis:frappe-bench-redis-cache                 RUNNING   pid 1137, uptime 0:45:50
frappe-bench-redis:frappe-bench-redis-queue                 RUNNING   pid 1141, uptime 0:45:50
frappe-bench-redis:frappe-bench-redis-socketio              RUNNING   pid 1151, uptime 0:45:50
frappe-bench-web:frappe-bench-frappe-web                    RUNNING   pid 1181, uptime 0:45:50
frappe-bench-web:frappe-bench-node-socketio                 RUNNING   pid 1192, uptime 0:45:50
frappe-bench-workers:frappe-bench-frappe-default-worker-0   RUNNING   pid 1233, uptime 0:45:49
frappe-bench-workers:frappe-bench-frappe-long-worker-0      RUNNING   pid 1246, uptime 0:45:49
frappe-bench-workers:frappe-bench-frappe-schedule           RUNNING   pid 1207, uptime 0:45:49
frappe-bench-workers:frappe-bench-frappe-short-worker-0     RUNNING   pid 1239, uptime 0:45:49

That all looks fine. How about sudo nginx -t ?

Are you able to access the site via http://site1.local?

Sorry for the delay, I just got my new work laptop and had to set that up and copy all my data over - and install Virtualbox again.

No, I cannot access site1.local - not found.

nginx -t reports:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Are you using the ERPNext .ova from here to install on Virtualbox?

No, afaik the linked VMs are still on 18.04? I created an entirely new VM, installed Ubuntu 20.04.1 (in this case with mate desktop, because it’s for testing purposes also straight from inside the VM), then followed the guide I linked earlier on.

Anyway I just finished installing another one on Ubuntu 18.04.5 server. Wish me luck :wink:

Hmm…it looks like nginx isn’t forwarding the request properly. It could be a hosts file issue, or it could be an nginx .conf file issue. I really don’t know much about how to do that in a virtualbox environment.

Generally speaking, if this is for local testing, is there a reason you’re using a production setup? It’d be a lot easier to troubleshoot without supervisor and nginx intermediating.

Generally, you will have a much easier time of it if you use the .ova in Vbox. As far as nginx is concerned, bench setup nginx will report which ports are in use , and those ports must be forwarded in the Advanced network Settings in the Virtualbox control.

Ok, the 18.04.5 setup I was talking about had only two minor hiccups. Which means I got this one up and running. Which means this discussion is kinda redundant now.

@peterg Maybe. But then I run into the trouble when we decided and it’s my turn to setup a running productive system? :thinking:

@smino That was my first attempt. See here. And I still don’t know why it started working at some point, nor why it still does not shutdown properly every once in a while.

Trying on 20.04.1 was my fourth attempt or so, the one running now on 18.04.5 has to be #5 then. I see this wonderful system, and again and again it manages to elude my grasp. But I won’t make this another rant.

@mwrsa if you are very new to Erpnext, i would suggest you to download Vbox images from the link below :
https://erpnext.org/download

To get up and running right away. Get hands on it, get the feel of the system, understand it and then try manual installation.

Since installing Erpnext has lots of dependencies, if not managed well things can get messy.

Everything you’re describing suggests to me that the problem is the interaction between Virtualbox and nginx/supervisor. It seems like an unnecessary headache, but if you’re willing to troubleshoot all those forwarding steps I’m sure it can be made to work.

That said, sometimes with these complex setups, it’s just easier to start over and try again. I can personally confirm that ERPNext works splendidly on 20.04, but all it takes is one misconfigured network interface to shut it all down.

1 Like