• Resolved jarjarbinks

    (@jarjarbinks)


    Hi Mr.Alexandre Froger,

    After reading your comment on stackexchange, I decided to try your plugin.
    https://wordpress.stackexchange.com/questions/260142/2-wordpress-sites-with-2-databases-but-sharing-the-same-users

    I got this error when testing:
    Error contacting the remote site: 401 – Unauthorized

    Log entries:
    2020-04-20 06:16:24 – Info – Renewing token for https://www…com/
    2020-04-20 06:16:25 – Warning – Failed to renew token for https://www…com/ – retrying…
    2020-04-20 06:16:34 – Alert – Error contacting the remote site: an undefined error occured. Please make sure the address is correct and try again. On the remote site, please make sure the plugin is activated and that the permalinks are up to date by visiting the permalinks settings page.

    + I didn’t add any IP’s to IP Whitelist
    + Action Encryption Key & Action Signature Key are same in both sites.
    + Users are exported from Site-1 and imported in Site-2 with your plugin.
    + Plugin is activated in both sites obviously.
    + wp-config.php files are using same Salts (If it changes anything).

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Alexandre Froger

    (@frogerme)

    Hi @jarjarbinks !
    Let’s imagine site A and site B, and site A is the one on which you see the error message and the logs.
    What happens if you visit https://www.siteB.com/wprus/token and also check the network inspector in the browser? The intended result is a blank page, and only 200 codes in the inspector.

    Alternatively, feel free to send me an email from my website with non-public info such as the URL of your sites, or if it comes to that and you are willing, credentials to the dashboard – this 401 error is something I have never encountered during my tests, and it may be a plugin conflict, and I would like to investigate if there are cases that need more documetnation.

    Thread Starter jarjarbinks

    (@jarjarbinks)

    Hi,
    I’ve tried testing Incoming and Outgoing Actions both in Site A and Site B.
    Unfortunately I get the same error.
    I was checking https://www.siteB.com/wprus/token as you’ve asked, I think I’ve got a problem with SiteB.
    I’ll try to find the problem and update my answer.
    Thanks.

    Plugin Author Alexandre Froger

    (@frogerme)

    @jarjarbinks thanks for the follow up. One way would be to try and disable other plugins on site B one by one and test, or try to use a default theme and test.
    If this comes from a plugin or theme, I would be interested to know which one, either to improve integration (v1.1.5 was about that – some plugin authors can’t seem to be able to read WordPress documentation and as a result make other devs’ life harder), or at least document incompatibilities.

    Thread Starter jarjarbinks

    (@jarjarbinks)

    Ok.
    Problem was with the theme (qaengine on both sites) not with the plugins. I’ve disabled all plugins and tried again, my permalinks became broken. So I had to delete the db and import a backup.
    But I don’t think your plugin caused this, probably some codes that I’ve changed in the theme files long before, might be responsible.

    Anyway, I installed another theme on both sites.
    This time SiteA Outgoing & Incoming tests passed but SiteB gave this error:
    “Login” action is not activated on https://www.SiteA.com with remote IP xxx (incoming).
    (Login” action was activated and Saved on both sites + All plugins were disabled)

    I’ve tried both https://www.siteA.com/wprus/token and https://www.siteB.com/wprus/token,
    I got an empty page and the network inspector showed 200 code as expected on both sites.

    View post on imgur.com

    I checked the logs of SiteA and realized this warning:
    2020-04-23 11:20:31 – Success – Access granted – https://www.SiteB.com
    2020-04-23 11:20:31 – Warning – Ping received for deactivated action “Login” from https://www.SiteB.com with remote IP xxx (incoming)

    • This reply was modified 4 years, 7 months ago by jarjarbinks. Reason: Typo
    • This reply was modified 4 years, 7 months ago by jarjarbinks. Reason: Logs
    Plugin Author Alexandre Froger

    (@frogerme)

    @jarjarbinks ok, so this happens when the incoming request’s data contain a URL that does not match the settings in the receiving site. Could you please confirm there is no discrepancy between the URL you see in the logs for site B’s URL (it has to be the same in the settings, and the logs – down to the protocol and the subdomain or lack thereof).
    If there is a discrepancy, it is because your home URL in your database is different from the one in the settings.
    If there is no discrepancy, I would like to have a look at the setup myself because I can’t imagine other scenario satisfying these conditions.

    Plugin Author Alexandre Froger

    (@frogerme)

    Hi @jarjarbinks !
    Did you figure out why the issue was happening? Was it about the URLs in the database?
    I will consider the issue resolved (or at least abandoned) tomorrow, as it would then be 7 days without activity.

    Plugin Author Alexandre Froger

    (@frogerme)

    7 days without activity – closing the issue and considering it resolved.

    Like @jarjarbinks,
    I’ve done everything and between site A, B and C I am getting this 3 erros:
    Alert – Error contacting the remote site: Payload error – Syntax error
    Alert – Error contacting the remote site: 500 – Internal Server Error
    Alert – Error contacting the remote site: an undefined error occured. Please make sure the address is correct and try again. On the remote site, please make sure the plugin is activated and that the permalinks are up to date by visiting the permalinks settings page. —> this the main site… if you give me your e-mail i can send you more detais.

    • This reply was modified 4 years, 4 months ago by ivanildopio.
    Plugin Author Alexandre Froger

    (@frogerme)

    @ivanildopio It seems there is an error in the code of your site, maybe another plugin. The latest version outputs more details in the logs in case the communication didn’t go through, which might help.
    Also, my contact details cannot be shared here as per forum policy.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Error contacting the remote site: 401 – Unauthorized’ is closed to new replies.