thewhiterabbit / Deploy_Saleor

37 stars 22 forks source link

404 error for GraphQL request #2

Closed lemnisk8 closed 3 years ago

lemnisk8 commented 3 years ago

getting a 404 error when accessing the https://domainmname/graphql tried multiple times... I'm new to python... Could you please guide to resolve this

thewhiterabbit commented 3 years ago

What OS are you using?

Are you able to see the dashboard?

lemnisk8 commented 3 years ago

I'm using Ubuntu20.04 on Digitalocean. I can see the dashboard. But can't login.

thewhiterabbit commented 3 years ago

Okay, I had a similar problem before. Let me do some testing and update the instructions. It might be permissions related.

Were there any warnings or errors during the install?

lemnisk8 commented 3 years ago

No errors when installing. But Nginx error log has the following error [crit] 1615#1615: *27 connect() to unix:///root/run/saleor.sock failed (13: Permission denied) while connecting to upstream, client

thewhiterabbit commented 3 years ago

Ahh. Okay. It can't be installed with root user or there will be permissions problems. It looks like it was installed by the root user. Try running undeploy.sh, create a sudo user then reinstall.

lemnisk8 commented 3 years ago

Tried install as a user in ubuntu, but couldn't get past the errors for script commands echo 'commands' > /etc/folders. Then I tried installing as a user in Debian, but am getting the same error as before connect() to unix:///home/user/run/saleor.sock failed (13: Permission denied) while connecting to upstream, client:

thewhiterabbit commented 3 years ago

Okay, I still need to run some more tests. This works fine testing on my current system. That error means saleor.sock isn't owned by the user trying to run it. I thought I set the script to run it as the user that installed it or www-data, but I may have made a mistake somewhere.

I'll get back to you as soon as I know more.

AmtechInnovarch commented 3 years ago

/home/user/run/saleor.sock should be owned by user:www-data and the only way I was able to replicate the problem you describe was to change ownership from that file.

When the deploy script runs it creates saleor.sock as the user you run the script as and I suspect your user isn't set with www-data as it's primary group.

You can try to add your user to the group www-data and set it as the primary group with -g www-data flag and run the script again, or use sudo chown user:www-data /home/user/run/saleor.sock.

Let me know if that works please.

lemnisk8 commented 3 years ago

Thanks AmtechInnovarch, Its working with the user added to the group www-data...

Thanks thewhiterabbit for the script, been trying to setup Saleor, but couldn't get my head around installing it with docker using the Saleor documentation