Report this

What is the reason for this report?

Help Needed With Connection Error On Google Merchant Feed

Posted on July 11, 2020

Hi Gyus,

Hoping you can help with a connection error I’m having with a Google Merchant Centre feed. I have an ubuntu 18.04 / nginx web server on Digital Ocean.

The scheduled fetch was working perfectly well so I know the URL is ok - I got Spinup WP to manage the server and since then the feed has stopped working

I have asked them and they assure me that wp-load is not blocked but unfortunately are unwilling to go any further to assist me with support - they told me to dig into it using curl -l

Here’s what I’ve discovered:

curl -l "https://tande.co.nz/wp-load.php?security_token=*removed*&export_id=25&action=get_data"

File starts to download but stops mid way through with the following error:

(92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)

I checked the error.log and found the Following error

2020/07/09 08:28:02 [crit] 18167#18167: *118102 open() "/var/lib/nginx/fastcgi/2/94/0000000942" failed (13: Permission denied) while reading upstream, client: , server: tande.co.nz, request: "GET /wp-load.php?security_token=&export_id=25&action=get_data HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-tande.sock:", host: "tande.co.nz", referrer: "https://tande.co.nz/wp-admin/admin.php?page=pmxe-admin-manage&id=25&action=google_merchants_info”

It looks to me like permission is denied to the /var/lib/nginx/fastcgi directory

So, following this guide

https://gurdeep.ninja/nginx-500-error-varlibnginxtmpfastcgi-failed-13-permission-denied/

I looked at the permissions as follows:

matt@tande: /tande.co.nz$ sudo ls -lath /var/lib/nginx 
[sudo] password for matt: 
total 48K
drwx------ 102 tande    tande 4.0K Jun  3 21:03 0
drwx------ 102 tande    tande 4.0K Jun  3 21:02 9
drwx------ 102 tande    tande 4.0K Jun  3 21:02 8
drwx------ 102 tande    tande 4.0K Jun  3 21:02 7
drwx------ 102 tande    tande 4.0K Jun  3 21:01 6
drwx------ 102 tande    tande 4.0K Jun  3 21:01 5
drwx------ 102 tande    tande 4.0K Jun  3 21:00 4
drwx------ 102 tande    tande 4.0K Jun  3 20:59 3
drwx------ 102 tande    tande 4.0K Jun  3 20:59 2
drwx------ 102 tande    tande 4.0K Jun  3 20:59 1
drwx------  12 www-data root  4.0K May 30 19:10 .
drwxr-xr-x   7 root     root  4.0K May 26 15:22

I ran

sudo chown www-data:root /var/lib/nginx 

as per suggestion but this has not resolved the issue. Permissions now look like following:


matt@tande: /tande.co.nz$ sudo ls -lath /var/lib/nginx 
[sudo] password for matt: 
total 48K
drwx------ 102 tande    tande 4.0K Jun  3 21:03 0
drwx------ 102 tande    tande 4.0K Jun  3 21:02 9
drwx------ 102 tande    tande 4.0K Jun  3 21:02 8
drwx------ 102 tande    tande 4.0K Jun  3 21:02 7
drwx------ 102 tande    tande 4.0K Jun  3 21:01 6
drwx------ 102 tande    tande 4.0K Jun  3 21:01 5
drwx------ 102 tande    tande 4.0K Jun  3 21:00 4
drwx------ 102 tande    tande 4.0K Jun  3 20:59 3
drwx------ 102 tande    tande 4.0K Jun  3 20:59 2
drwx------ 102 tande    tande 4.0K Jun  3 20:59 1
drwx------  12 www-data root  4.0K May 30 19:10 .
drwxr-xr-x   7 www-data root  4.0K May 26 15:22

Can you help me with what to try next? Please let me know if you need further info that will help you assist

Many thanks in advance

Matt



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi Matt,

Based on the details you’ve shared, it seems like a permissions issue within the directory /var/lib/nginx/. You’ve correctly changed the ownership of the /var/lib/nginx directory, but it seems like the subdirectories inside are still owned by the user tande, which could be why Nginx is still unable to write to those directories.

I’d suggest changing the ownership of all the files and directories within /var/lib/nginx/ recursively. You can do this using the -R option with the chown command, like so:

sudo chown -R www-data:root /var/lib/nginx

This command will change the owner of the /var/lib/nginx directory and all its contents (recursively) to www-data, and the group to root.

After running this command, you can verify the changes by listing the files and directories again:

sudo ls -lath /var/lib/nginx

Restart Nginx after the changes:

sudo systemctl restart nginx

Then, try fetching your feed again. If the problem was indeed related to permissions, this should resolve it.

If you still encounter issues, you might also want to check the permissions of the /run/php/php7.4-tande.sock file since it is also being accessed by Nginx. Ensure that it is owned by www-data and has appropriate permissions as well.

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.