I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

cronjob link – 502 gateway error

dashed-slug.net Forums General discussion cronjob link – 502 gateway error

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #6180
    Anonymous
    Inactive

    when i click on the link in the cron area that looks like this

    .com/?__wallets_action=do_cron&__wallets_apiversion=3&__wallets_cron_nonce=7cdc072d0f2b72c1984f796600ee817c

    it just gets a 502 bad gateway error

    #6189
    alexg
    Keymaster

    Hello,

    The plugin does not ever throw a 502 error, therefore it doesn’t look like your request is reaching the plugin.

    You should check intermediate things, like your CDN, .htaccess file, check your access logs, etc.

    Can you enable verbose debug output and check if the cron job starts? i.e.

    1. Go to Wallets -> Cron job -> Verbose log output (debug) and enable the setting.

    2. Check your WordPress debug log. When you trigger the cron link, it should write to the logs:

    cron jobs STARTED
    … (etc)
    cron jobs FINISHED

    Do you see the start and finish lines?

    If you see only the start but not the finish, please let me know, because the cron jobs are crashing mid way for some reason.

    If you do not see the start message, the problem is not with the plugin and you should try configuring your CDN, firewalls, etc.

    Let me know please what you find.

    with regards

    #6306
    Anonymous
    Inactive

    so this 502 is still happening

    here is log
    https://prnt.sc/nobb0v

    this is with ZERO transactions going on for hours with this wallet

    if i go to the link i get this:
    https://prntscr.com/nobdhs

    #6312
    alexg
    Keymaster

    Hello,
    Error 502 means that the PHP service did not respond to your nginx, possibly because it was too busy. It’s way too general of an error to draw any meaningful conclusions. I would look around in the server logs for anything strange. Think access logs, nginx error logs, mysql error logs, etc.

    Also, I would like to ask you the following:

    1. Do you get the 502 error every time you follow the cron job link, or only some times?

    2. Since you have enabled the WordPress debug log, do you see any other errors in the wp-contents/debug.log file?

    3. Which coin adapter or adapters are you using? If you are using any RPC-API wallets, could it be that a connection is timing out due to some firewall?

    4. Did you change anything around the time when this problem first occurred?

    5. Go to the dashboard, and inspect all the debug info about cron jobs: Cron jobs last ran on, Cron jobs last runtime (sec), Cron jobs peak memory, Cron jobs memory delta. What do these read?

    #6438
    Anonymous
    Inactive

    now i am getting 504 errors

    its strange since the update i can not reach my vps, only way is to exit and reopen the wallet

    the logs show that everything is working just fine, i think… but using the cron job link just 504 outs…

    https://prnt.sc/ny7osw

    wallet is open and responding and when i send coins from my personal wallet to the wallet on vps it goes right thru no issues.

    i made no changes to any code or the wallets files

    #6439
    Anonymous
    Inactive

    also it would be nice to be able to have max retries on withdrawals to be more than 10

    its allowing ppl on our site to WD and then when wallet is not responding, it seems those funds reappear to be spent again

    #6440
    Anonymous
    Inactive

    so i just tested and started by clicking the cron link

    1.) it just was spinning and spinning

    2.) i went to vps and exited wallet and boom {"result":"success"} on that page

    3.) but no updates to my wallet

    4.) then go open wallet again on vps

    5.) unlock wallet in my admin area and check it at the adapter page that it is responding and unlocked, it shows 2 pending withdrawals

    6.) then i go and hit cron link again and the 2 pending withdrawals i see at the adapter page, come into wallet on vps but still just sits and spins and times out

    i have to do this over and over to get these to go thru

    #6441
    Anonymous
    Inactive

    using this php curl code i found here:

    https://bitcointalk.org/index.php?topic=4409094.msg39299476#msg39299476

    i can connect to the wallet and “getpeerinfo” or “getinfo” no problems at all.

    so i was thinking maybe the vps was blocking my incoming connections but it does not look like it, because i have this code from the same IP and it gets the correct info back no issue

    its weird how no matter what, the cron job will be spinning away but the second i close that wallet on the vps it will go right to the cron job showing success, and it doesnt appear to be any issues in the cron job debug either.

    there is some break up or issue of communication that when wallet closes all is good bu that is not good

    #6442
    Anonymous
    Inactive

    https://prnt.sc/ny8yqw

    i meant to add that to last post

    #6444
    alexg
    Keymaster

    Hello,

    Thank you for providing more information on this. I think I know what’s going on now.

    You mentioned that the cron job is stalling, but the moment you shut down the wallet on your VPS, then the cron job finishes. This is a clear sign that the communication to the wallet is stalling and running into a timeout. I am guessing that the cron job is stalling for about 30 seconds, since this is usually the default PHP timeout value.

    Please check again that you can connect to the wallet on your VPS from your WordPress machine. If you ran that PHP code you found on another machine, this is not helpful as a test. The wallet checks the incoming IP.

    Remember, firewalls can be either on the VPS side, or on the side on the WordPress server. It would be best to talk to each of your hosts. Explain to them that you need TCP communication on the port you are using for the wallet RPC, outgoing from the WordPress server, and incoming to the VPS.

    Additionally, check the rpcallowip setting in your wallet’s .conf file. https://en.bitcoin.it/wiki/Running_Bitcoin Check that you’re using correct CIDR notation to specify the netmask. See here: https://bitcoin.stackexchange.com/a/32268/8738

    with regards

    #6445
    alexg
    Keymaster

    Additionally, if you are using Bitcoin core v18.0.0, check these changes about rpcallowip and rpcbind:

    https://bitcoin.org/en/release/v0.18.0#configuration-option-changes

    If you are using the latest version, you might need to specify your WordPress host’s IP with rpcbind. Worth a try.

    #6452
    Anonymous
    Inactive

    ok we changed from virmach to hostwinds for the VPS to host our wallets and same thing again….

    the only way to get it to work is the following once again

    1.) click on the cron job link
    2.) close or stop the wallet
    3.) start up the wallet again
    4.) go to adapter see pending wd’s
    5.) add password to open wallet
    6.) click the cron link again
    7.) transactions show right up in the wallet

    i want to add the following
    1.) server told me tcp port is opened
    2.) VPS are open i can see
    3.) im using a eralier version that 1.8
    4.) i even went back to a back up of wordpress from 6 days ago to see if it was a plugin conflict etc and it is still doing it

    my confusion is that it was working perfectly for a few weeks since we got to our new cloud hosting.

    and just in the middle of the after noon it ceased to work it worked for customers up till 2:14 pm then that was it , just stopped

    the wallet has not been updated since july 2018 and we changed the vps to a new one so it leads back to the wordpress host and/or your plugin as we updated it

    so i went to our other site that we still had not updated plugin yet

    https://prnt.sc/nyo5ta

    and ran a transaction and it worked perfectly

    so i downgraded to that version on the other site

    and bam back to it not working again.

    what could have gotten changed in wordpress that would make your cron job stall ? if we can narrow that down i think we found our culprit

    #6455
    alexg
    Keymaster

    As you found out, it is not a matter of which version of the plugin you’re using. If it was, downgrading would have solved your problem. Also, it wouldn’t make sense for the same code to suddenly stop working. Something else has changed in your environment.

    Changing to another service is not likely to help, as most hosts have similar security. You mentioned that the TCP port is open. Did you check both the outgoing and incoming sides? (i.e. You must talk to both hosts.)

    Another thought is this: When you enter a passphrase it is normally stored for however many minutes you want, or forever, in which case it is stored on a permanent transient. It is still possible that you, or some clean-up plugin, may have cleared all transients, in which case the wallet would be locked again.

    In the site where withdrawals stopped, does the coin adapter now appear locked? If so, this would be a different error than the timeouts you were getting before.

    In conclusion, please check the following and let me know:

    1. If you checked the firewalls on both sides.
    2. If the coin adapter is locked on the site where withdrawals have stopped.

    with regards

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.