Socket.io XMLHttpRequest CORS Problem

I just installed erpnext and the wizard is launched but i can’t complete the process due some errors:

GET http://erp.example.pro:9000/socket.io/?EIO=3&transport=polling&t=Ma0_SMi net::ERR_ABORTED 404 (Not Found)
Access to XMLHttpRequest at ‘http://erp.example.pro:9000/socket.io/?EIO=3&transport=polling&t=Ma0_SMi’ from origin ‘http://erp.magana.pro’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

My nginx block is like this:
location /socket.io {

                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
                proxy_set_header X-Frappe-Site-Name erp.example.pro;
                proxy_set_header Origin $scheme://$http_host;
                proxy_set_header Host $host;

                proxy_pass http://frappe-bench-socketio-server;

                add_header 'Access-Control-Allow-Origin' '*' always;
                add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
                add_header 'Access-Control-Allow-Credentials' 'true' always;
                add_header 'Access-Control-Allow-Headers' 'DNT, Authorization, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, Content-Type, Content-Length';
                add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modi$
        }

What i’m missing ?

Thanks in advance
Pepe

Well i manage to install ERPNext following this steps:
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
sudo python install.py --production --user frappe
cd frappe-bench
bench drop-site site1.local
bench new-site erp.mysite.com
bench --site erp.mysite.com install-app erpnext
bench setup socketio
bench setup supervisor
bench setup nginx
sudo service nginx reload
sudo supervisorctl reload

Actually the problem was that port 9000 was already in use by docker
I found that with lsof -i tcp:9000