XFileSharing Pro - Problem with CDN Install

Message
Author
mjdj1999
Posts: 31
Joined: Jul 14, 2014 4:14 am

Problem with CDN Install

#1 Postby mjdj1999 » Aug 02, 2014 2:52 am

I am installing the CDN plugin and I am following the instructions but I am hung up here:

2. Copy files from Modules folder to the /cgi-bin/Modules folder on your site.

There is no "Modules" folder in the file I downloaded.

What I did was moved the 2 files below into the Modules folder:
transfer_azure.pl
transfer_s3.pl

Apparently that wasn't what was needed. This is the error I get:
Software error:

Can't locate Net/Azure/StorageClient.pm in @INC (@INC contains: . Plugins Modules /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at Modules/Session.pm line 3.
BEGIN failed--compilation aborted at Plugins/CDN/azure.pm line 7.
For help, please send mail to the webmaster ([email protected]), giving this error message and the time and date of the error.

Software error:

[Fri Aug 1 22:44:19 2014] index.cgi: Can't locate Net/Azure/StorageClient.pm in @INC (@INC contains: . Plugins Modules /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at Modules/Session.pm line 3.
[Fri Aug 1 22:44:19 2014] index.cgi: BEGIN failed--compilation aborted at Plugins/CDN/azure.pm line 7.
Compilation failed in require at Modules/Session.pm line 3.

Any ideas? Thank you

mjdj1999
Posts: 31
Joined: Jul 14, 2014 4:14 am

#2 Postby mjdj1999 » Aug 02, 2014 4:51 am

I deleted the Azure files and now I am able to create an S3 server.

I am not able to find anything on "Blob storage" online for Azure to complete my setup and the supplied documentation doesnt provide any help on getting the info needed to set this plugin up.

mjdj1999
Posts: 31
Joined: Jul 14, 2014 4:14 am

#3 Postby mjdj1999 » Aug 02, 2014 6:45 pm

When I try to use the "import files" link next to the Amazon S3 server I get this error:
Error

Error when requesting API.
400 URL must be absolute

When I try to transfer files from the local server to Amazon S3, the files go into the transfer queue and nothing happens. The files just sit pending at 0%.

I have deleted the server and rebuilt it and verified all required keys and permissions. Nothing seems to work.

Also, when I update settings I get these errors:
Have 3 servers to update.

ID=1 Local...OK
ID=5 s01.myserver123.com...FAILED!
ID=4 Amazon S3...FAILED!

Done.
2 servers failed to update.

User avatar
sib-fan87
Posts: 33
Joined: Jan 04, 2022 8:37 pm

Re: Problem with CDN Install

#4 Postby sib-fan87 » Jan 20, 2023 6:53 pm

I also had this issue. I got an error when i tried to add an s3 server.

I followed your directions and deleted both azure files "azure.pm" & "transfer_azure.pl" then I was able to add a S3 server.

But now I am having the issue where i can't transfer anyfiles to the s3 server. It's stuck in the Transfer queue as "pending"

Did you solve this issue?

Where do we put the file "transfer_s3.pl"
Which folder is that file supposed to go to. The directions did not specify.
The directions say "Add transfer_s3.pl in cronjobs on all file server(s)"


Heres what i did


/home/myuploadsite/public_html/cgi-bin/Modules/S3Utils.pm

/home/myuploadsite/public_html/cgi-bin/Plugins/CDN/amazon_s3.pm
/home/myuploadsite/public_html/cgi-bin/Plugins/CDN/azure.pm <--- deleted

/home/myuploadsite/public_html/cgi-bin/transfer_azure.pl <--- deleted
/home/myuploadsite/public_html/cgi-bin/transfer_s3.pl

I installed XML::Simple in WHM panel

and also install via the terminal
yum install perl-XML-Simple

Then i updated my License ID

Then i went to the admin panel and clicked on "+ Add new CDN"


But the transfer issue is still not solved.
TransferQueue.jpg
TransferQueue.jpg (28.49 KiB) Viewed 567 times


I went into the Terminal did the following:
cd /home/myuploadsite/public_html/cgi-bin/transfer_s3.pl
./transfer_s3.pl

and it transferred the file
Completed-Transfer.jpg
Completed-Transfer.jpg (30.77 KiB) Viewed 563 times

Im assuming I have to add the transfer_s3.pl to the list of cron jobs so it automatically runs the file?

How would i go about doing that

This is what i see in my crontab now
CRONTAB.jpg
CRONTAB.jpg (43.71 KiB) Viewed 566 times


I solved the cron issue but adding a command in the crons

command:
crontab -e

then i added this following at the very bottom of the file:

* * * * * cd /home/myuploadsite/public_html/cgi-bin; ./transfer_s3.pl 2>&1 >/dev/null
Last edited by sib-fan87 on Jan 21, 2023 11:20 pm, edited 2 times in total.

User avatar
sib-fan87
Posts: 33
Joined: Jan 04, 2022 8:37 pm

Re: Problem with CDN Install

#5 Postby sib-fan87 » Jan 20, 2023 10:07 pm

I have another issue too when i download an image. Its not showing.

on xfilesharing
ERROR.jpg
ERROR.jpg (1.8 KiB) Viewed 556 times

Even when i looked at the file from the Amazon website i get Access Denied
AMAZON.jpg
AMAZON.jpg (61.09 KiB) Viewed 556 times

I believe it's an issue with Access List or Policies on CDN website

I need to create a S3 Bucket policy or something?

anyone know how to set it up?

User avatar
sib-fan87
Posts: 33
Joined: Jan 04, 2022 8:37 pm

Re: Problem with CDN Install

#6 Postby sib-fan87 » Jan 22, 2023 1:02 am

I'm made a picture of step by step on how i setup Amazon s3
https://ibb.co/yQRTHJ4

and here i am uploading a test image, then moving it to the new s3 server. The trying to download the picture and trying to download the zip file
https://ibb.co/tJJvHBX

and here is the screen i get when i access the files straight from amazon s3. I can see the files are there but i get an error when trying to access them
https://ibb.co/jkrqKns