Contact Us Today! | vcare@wdmtech.com

WDMtech

Topic-icon Export Cron Job Reporting Access Denied

More
1 year 6 months ago #2141

Small code conflict which has now been resolved....


Thanks
Daniel

Please Log in or Create an account to join the conversation.

  • Verulam Webmaster
  • Verulam Webmaster's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 6 months ago #2134

Thank you for the fix, what was the issue?

Chris.

Please Log in or Create an account to join the conversation.

  • Verulam Webmaster
  • Verulam Webmaster's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 6 months ago #2124

Thanks, I have sent the credentials.

Chris.

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago #2122

Hello,

Can you please share your Access credentials via Contact us form, We'll look into it.


Thanks
Daniel

Please Log in or Create an account to join the conversation.

  • Verulam Webmaster
  • Verulam Webmaster's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 6 months ago #2117

Thanks Danish,

Thanks makes sense as the feed writes directly to the local server. The BASH screen shot below is an SSH shell onto the server, so it should be the same as the CRON job. However, I also ran it as a CRON job on the local server to be sure. Same result, screen shots attached.

I ran two, as I think CURL needs quotes to stop it braking on the '?' char, so I tested both, in each case not files were written and the hit count in vdata did not increment.


Chris.

Attachments:

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago #2116

Cron script can only be executed using the Cron Job on the same server.
Each feed can be assigned with different access levels. If the Feed is assigned with public, guest access level, you don't need to login if the Feed is assigned with any other access level you need to login with a user with same / higher access level. Import / Export do not have any access level, You just need to trigger it using Cron Job from the same / local server where the script resides.


Thanks
Daniel
Last Edit: 1 year 6 months ago by Daniel.

Please Log in or Create an account to join the conversation.

  • Verulam Webmaster
  • Verulam Webmaster's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 6 months ago #2115

Screenshots attached.

Thanks.

Attachments:

Please Log in or Create an account to join the conversation.

  • Verulam Webmaster
  • Verulam Webmaster's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 6 months ago #2114

Ah, makes sense now thanks - I have updated I can now see the CURL commend in the URL.

The response to my CRON job running

"curl www.verulamcc.org.uk/index.php?option=co...export&type=TestCron "

{"result":"error", "error":"ACCESS_DENIED"}

For Feeds, I need to be signed in. Is this the same for Exports? Or should vData use the parameters in the CRON job to store the output directly to the fileplan?

Chris.

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago #2113

Please check the below screenshot again, re-uploaded it.


Thanks
Daniel

Please Log in or Create an account to join the conversation.

  • Verulam Webmaster
  • Verulam Webmaster's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 6 months ago #2112

Hi Danish,

Did you post that response in the right thread, I can't see the reference to my issue?

The issue was that the feed required a log in to run, which I ended up figuring out with the support of my host provider who had Joomla experience. I'm still not quite there as there is an input called "cbsecuritym3" that seems to change everyday and break my log in script, any advice on this, or general approach would be well received. I'd rather not make the feeds public if I can avoid it.

Thanks, Chris.

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago #2090

Hello,
Please download the latest package vData 2.0.5. We have modified Cron Feature ( Please check the new Cron URL ). Please modify profile settings before making any import / export. Please check the attached screenshot.



Thanks
Daniel
Attachments:

Please Log in or Create an account to join the conversation.

  • Verulam Webmaster
  • Verulam Webmaster's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 7 months ago #2086

Thanks Mike, still no luck unfortunately. I think I need to figure out authentication with wget, although I have tried :)

I'll see if the VDM guys have any suggestions here.

Chris.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #2082

Verulam Webmaster wrote: /usr/bin/wget -O /var/sites/v/verulamcc.org.uk/public_html/Reports/Server/Members_Emails.csv -o /var/sites/v/verulamcc.org.uk/public_html/Reports/Server/log.txt www.verulamcc.org.uk/index.php?option=co...t&type=VCC_ComExport


I think you need to use quotes around the entire URL in this case:

/usr/bin/wget -O /var/sites/v/verulamcc.org.uk/public_html/Reports/Server/Members_Emails.csv -o /var/sites/v/verulamcc.org.uk/public_html/Reports/Server/log.txt " www.verulamcc.org.uk/index.php?option=co...t&type=VCC_ComExport "

At least this worked for me...

Please Log in or Create an account to join the conversation.

  • Verulam Webmaster
  • Verulam Webmaster's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 7 months ago #2081

Danish,

I'm getting the login page of my site as the output of my cron job, I've tried all the wget authentication I can google but I'm not winning :S (post-data save-data loadcookies... etc.)

I can see that the path I define in vData job config is not actually used, but the cron job output is. Is this the right approach?

/usr/bin/wget -O /var/sites/v/verulamcc.org.uk/public_html/Reports/Server/Members_Emails.csv -o /var/sites/v/verulamcc.org.uk/public_html/Reports/Server/log.txt www.verulamcc.org.uk/index.php?option=co...t&type=VCC_ComExport


Thanks, Chris.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #2080

Chris,

Thank you for your input - that was all I needed to move forward. I've successfully created a cron job to execute the vData export that I was trying to run.

Regards,
Mike

Please Log in or Create an account to join the conversation.

  • Verulam Webmaster
  • Verulam Webmaster's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 7 months ago #2079

Hi Michael,

I'm a newbie myself, but when I got that error it was that the bash script that my provider 'VISAHOST' created, perhaps the response can help you too. I marked this as fixed when my issue was resolved so you might need open a new ticket for a response from the WDM guys.

The reason was due to the lines I was calling the URL with:

/usr/bin/wget -O /dev/null -o /dev/null

The following combined with a wget command till do:

-O write documents to FILE.
-o log messages to FILE

The cron is set up to run each of this tasks to the /dev/null directory, this directory is used to ignore all output written in it and as such you end up with an output of only the number of processes run from the query, or an error. Update these locations to where you want the file to go.

Chris

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #2076

How do I submit the cron job. I know how to do this in general via my Cpanel cron control panel but using the URL link generated on my cron job produces a "file not found" error when the cron job attempts to run?

Am I missing something here?

Please Log in or Create an account to join the conversation.

  • Verulam Webmaster
  • Verulam Webmaster's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 7 months ago #2057

I understand now, thanks.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #2055

Hi,
You can not execute Cron Job URL manually, It would work only when Cron Job on your server would trigger it.


Thanks
Daniel

Please Log in or Create an account to join the conversation.

  • Verulam Webmaster
  • Verulam Webmaster's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 7 months ago #2054

Hi,

I have set up a Cron Jon link to run a SQl query and store the resulting CSV file on the local server. The SQL works OK (as a quick export) but when I use the URL I get this message:

{"result":"error", "error":"ACCESS_DENIED"}

I assume that it's when the CSV is trying to be written to the local server, but not sure by what user or what permissions are required.

Any ideas?

Thanks, Chris.

Last Edit: 1 year 7 months ago by Verulam Webmaster.

Please Log in or Create an account to join the conversation.