jrCore subdir issue - cannot copy cache files

huggy59
@huggy59
11 years ago
17 posts
I'm trying to set up a development system on Ubuntu 14.04, using EHCP to mimic a live multi-user, multi-domain shared hosting system. That's all working well, however, when I go to install Jamroom 5.1.44 or .46 (the latest), I'm getting an error about copying files to the data/cache/jrCore subdir:

CRI: Unable to copy skins/jrElastic/index.tpl to template cache directory: data/cache/jrCore

I've found one thread here that discusses permissions, and I've tried setting permissions to 777 on those subdirs, but each time I try to access the site it is resetting the jrCore subdir to 666 and the copy fails.

drwxrwxrwx 3 vsftpd www-data 4096 May 30 23:45 .
drwxrwxrwx 6 vsftpd www-data 4096 May 30 22:58 ..
-rwxrwxrwx 1 vsftpd www-data 97 May 30 23:44 index.html
drw-rw-rw- 2 vsftpd www-data 4096 May 30 23:45 jrCore


BTW, apache2 runs under the vsftpd user. Not sure where to look or how to proceed. Any help is welcomed. Thanks.

updated by @huggy59: 07/06/14 09:56:30PM
michael
@michael
11 years ago
7,799 posts
I use a similar setup to that, only I run EHCP on an old pc i use as a server on the same network.

Here's my setup:

"Setting up a debugging environment"
http://www.jamroom.net/the-jamroom-network/documentation/development/129/setting-up-a-debugging-environment

When you see that message it could mean a couple of things; The most usual one is that /skins/jrElastic/index.tpl file does not exist.

It not existing is the cause of it not being able to be copied to the cache directory.

So try
* re-uploading that file
* reset the caches from YOUR-SITE.com/core/cache_reset
* refresh the page where you saw that error.

Hopefully its not there anymore.

If that doesn't fix it, the next place to look is the cache directory.

You can safely manually delete anything under:
/data/cache/*
(I usually leave the index.html there and delete the rest.)

With the EHCP setup sometimes files created by the server are hard to delete via FTP, so in those cases i SSH into the machine and

sudo chmod -R 777 /var/www/vhosts/admin/MY-SITE-NAME/httpdocs/
and after that I can delete the cache.

Keep in mind that my dev machine is not accessible via the internet, so 777 is ok. bit careful there.

see if any of that helps.
huggy59
@huggy59
11 years ago
17 posts
Hi michael,

I have tried all that before posting (I should have mentioned that). The file exists, and I have copied it manually, to no avail. I've installed a fresh instance (several times) and this error is all I get after the database info is entered at the install screen. I've cleared the db as well. The error is showing when I go to any URL on this site, including the base URL.

When I try the cache_reset, it gives me the same error, with the file being header.tpl that's not copied.

This server is also a private, so I'm not concerned with 777 chmod. I intended to set up the debugger, etc. following the setup you linked above, but I can't get a basic Jamroom site running. Must be too many changes between Ubuntu 10.x and 14.x.

Any other ideas?
updated by @huggy59: 05/30/14 10:01:28PM
huggy59
@huggy59
11 years ago
17 posts
PS. I'm trying to run this in a subdomain. I don't think that should matter... I'm running Joomla and Wordpress dev sites on this machine, among others, so I know the system works properly for other PHP scripts.

I also updated to EHCP Force to get around the FTP/Apache2 user issues. Still no fix for this error, though.
updated by @huggy59: 05/30/14 10:08:14PM
michael
@michael
11 years ago
7,799 posts
ok, bit clearer now. From what I understand, your still at the install phase. I missed that bit.

Subdomains are fine, all mine are on a subdomain.

Here are the steps I normally take to install a new jamroom instance in my dev machine:
* create a domain name for it and update my /etc/hosts file on my local machine.
sudo nano /etc/hosts
point it to my server:
192.168.0.40    newsitename.iixxii.cc
iixxii.cc is a real domain but all the subdomains are on my local machine. Just in case i ever do want to put one live, i can update the DNS on the real server to point to my home server.)

* log in to EHCP and setup a domain name under my current FTP account.
* add a database and remember the credentials
* login via FTP and upload the jamroom folder.
* open the domain name and put the credentials in the install screen.

sometimes have to change the permissions on some folders, but jamroom will warn me when i need to do that.

Its usually pretty quick.

I'll make a video of it now.
huggy59
@huggy59
11 years ago
17 posts
Yup, been there, done that. FWIW, I've got 35 years in IT. I'm running a bunch of stuff here - VMware, Windows AD, Linux, even Amiga (remember those?).

It seems to be failing only after the install is complete and the home page is trying to open. I've tried a completely new install, tried a new Ubuntu VM, and same result. I can see the db appears to be populating properly. I even have a backup copy of a live site and that won't work on this system. JR5 works fine on a public dev site I have at my ISP - same files, etc. That's why I'm stumped on this. Everything LOOKS right.

I'm still thinking it's something in Ubuntu 14 that's the issue. Maybe I'll run up a Ubuntu 12.x VM to see if that will work.

You think it might be something in PHP config causing this?
updated by @huggy59: 05/30/14 11:06:15PM
michael
@michael
11 years ago
7,799 posts
Didn't mean to sound too simple, just trying to eliminate the common causes before searching for more uncommon causes.

I can tell by the beard you know what your doing around computers. ;)

Here's a vid of me doing an install. Could you tell me what point yours fails at using that as a comparison please.
installing jamroom into EHCP dev environment
huggy59
@huggy59
11 years ago
17 posts
My client machine is a Windows 7 box running Firefox. Server is Ubuntu 14.04. I set up a domain in EHCP, then a subdomain. Set up FTP user for that domain. FTP using Filezilla in binary transfer mode to subdomain area.

JR5 install - all green. After database info screen, I get the error and never get the "Jamroom has been successfully installed!" screen (3:58). I have also tried the db fix script.
michael
@michael
11 years ago
7,799 posts
Take a look in:
cat /var/www/vhosts/admin/newsite.iixxii.cc/logs/error_log 

and see if theres any server level errors that occurred. Mine is empty for that site.

Usually jamroom will log to:
(site root)/data/logs/

when its working, but if its not getting passed the install screen, then its not working yet.
michael
@michael
11 years ago
7,799 posts
also try in 'passive' mode for FTP. not totally sure of the difference (or which way konqueror does it.).
michael
@michael
11 years ago
7,799 posts
also try:
cat /var/log/apache2/error.log
huggy59
@huggy59
11 years ago
17 posts
My path looks like:

/var/www/vhosts/alwaysnewmusic.com/alwaysnewmusic.com/logs

There is no /var/www/vhosts/admin subdir.

Nothing in the error file.
huggy59
@huggy59
11 years ago
17 posts
AH! apache2 error log shows this:

[Fri May 30 23:19:17.447160 2014] [core:error] [pid 3907] [client 192.168.0.184:61228] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://ubus13/ehcp/templates/sky/en/css/common.css

Hmmm...
huggy59
@huggy59
11 years ago
17 posts
But nothing about the JR5 site.
michael
@michael
11 years ago
7,799 posts
First thoughts:
* I wonder if having both the domain and the subdomain setup on EHCP makes a difference. All mine are on subdomians, but the main top level domain is not setup on the EHCP server. Guessing that this might be a difference between our setups as even though mine are subdomains, they might be being treated as independant domains because the top level one isnt there for EHCP to find.

Just a guess though. I'd try setting up another domain that doesn't have a parent on EHCP to see if this makes any difference.

------------
another thought. when i searched for
Quote: "equest exceeded the limit of 10 internal redirects due to probable configuration error. "
I landed here:
https://drupal.org/node/378524

which was talking about:
Quote: .....changed to RewrirteBase /

the 500 error gone.

Makes me think of godaddy hosting. maybe try the solution to that problem. It involves adding some lines to .htaccess

https://www.jamroom.net/the-jamroom-network/forum/jamroom-hosting/4970/jamroom-5-with-godaddy#p5075
huggy59
@huggy59
11 years ago
17 posts
Thanks for your help. I'm going to call it a night and start again tomorrow.

For grins I installed JR5 on the root domain of the server (not a sub) and it still does the same thing.

I'm also pulling down a 32-bit Ubuntu 12.04 to try. 14.04 is 64-bit only - wonder if that may be causing issues somewhere. What OS are you running on your server?
michael
@michael
11 years ago
7,799 posts
I use 10.04 on my server because EHCP site said that it didnt run on later than 11.04 but that was a while ago. Its working, so I dont want to break it just to see.

Try that:
RewriteEngine On
RewriteBase /
in the .htaccess file, it seams very related.

--edit--
dev pc: kubuntu 12.04 LTS 64bit
server: ubuntu server 10.04 LTS (on a 64 bit machine, but not sure if its 64bit or not)
$ uname -a
Linux silver 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux

updated by @michael: 05/31/14 12:05:39AM
huggy59
@huggy59
11 years ago
17 posts
I will try that tomorrow, and pull down 10.04 as well. I'll bet there are differences in the OS that are causing this. Would be nice to figure it out but I've got to get a dev site running to support a client.

Thanks for all your help! Really appreciate it! I'll get back at it tomorrow. If I figure it out I'll post it here.
michael
@michael
11 years ago
7,799 posts
I won't be back til Tuesday. I take sundays and mondays off.
brian
@brian
11 years ago
10,149 posts
This error usually comes out because the web user does NOT own the following directories:

data/cache
data/logs
data/media

so as root, go into the jamroom_dir/data and do:

chown -R www-data. *

(if www-data is your web user account).

I'd highly recommend a setup like I outline here (it's for Ubuntu 12.04 on DO but you can use it on your own server the same):

https://www.jamroom.net/brian/documentation/guides

using Ruid2 means you don't have to worry about directory/file permissions.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
huggy59
@huggy59
11 years ago
17 posts
Thanks Brian, but that's not the problem. File and directory permissions are correct. If they we not, other script systems on this machine would have similar problems. There is something else going on just with Jamroom 5 that I haven't discovered yet.
brian
@brian
11 years ago
10,149 posts
huggy59:
Thanks Brian, but that's not the problem. File and directory permissions are correct. If they we not, other script systems on this machine would have similar problems. There is something else going on just with Jamroom 5 that I haven't discovered yet.

If the error is a "cannot copy to cache dir" error (like in your original post), then the root cause is the web user cannot copy from the module template directory into the cache directory - i.e.

jrCore/templates

to

data/cache/jrCore

I've installed JR5 hundreds of times and haven't seen anything else it would be unless you are running some type of custom setup that has unique permission setups.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
huggy59
@huggy59
11 years ago
17 posts
Well, apache2 daemon is running as vsftpd, which is a member of the www-data group. The vsftpd daemon is also running this way for proper access to the directories via ftp. Files and dirs are set to vsftpd:www-data ownership. This was part o fthe EHCP Force update. I've also tried a clean install of ubuntu 12.04 with apache2 running as www-data, same error.

Just for grins I tried adding ruid2, with no change.

I'm stumped. Everything I try seems to be proper with the tests I perform, but JR5 core won't run properly on any of my local servers. These same servers support Joomla and WordPress installs with no problems. I'm now comparing differences with a public dev server I've got JR5 running on.

Spending way too much time on this...
huggy59
@huggy59
11 years ago
17 posts
Where (what file) does JR create the data/cache/jrCore dir if it doesn't exist?
michael
@michael
11 years ago
7,799 posts
huggy59:
Where (what file) does JR create the data/cache/jrCore dir if it doesn't exist?

The templates for jamroom skins are powered by smarty3 (smarty.net). So the /data/cache/jrCore stores the generated versions of those templates once they have been parsed for logic.

among other things related to the /jrCore/ module. so you cant just copy+paste anything there to get it to work.

Did you try adding that
RewriteEngine On
RewriteBase /
to the .htaccess file?

how did it go?

Another thought (because it shouldn't be this difficult.) is to try again on another domain that only exists in your system.

To see if its anything domain related.

some-domain-that-doesnt-exist-to-test-jamroom.com
jr5.com
huggy59
@huggy59
11 years ago
17 posts
I've set up a new server (Ubuntu 12.04 under VMware) and just configured the web server for Jamroom and I'm getting the same issue. I'm now wondering if the Jamroom files I've downloaded are somehow corrupt. I did pull them down and unzip them on my Windows 7 machine before FTP'ing to the Ubuntu servers.
huggy59
@huggy59
11 years ago
17 posts
And yes, I tried the rewritebase and many other configs.
michael
@michael
11 years ago
7,799 posts
if your servers capable of accessing the web, could try using WGET

wget https://www.jamroom.net/networkmarket/core_download/jamroom-core-5.1.46.zip
huggy59
@huggy59
11 years ago
17 posts
I'll try that, thanks.
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
It probably isn't this, but worth mentioning just in case.

In your jamroom htaccess file change
Options +FollowSymLinks

to
Options +SymLinksIfOwnerMatch

I need to do that in a virtualmin setup on ubuntu, drupal uses that by default.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
brian
@brian
11 years ago
10,149 posts
If you continue to have an issue, and the server is web connected, let me know and I can check it out for you.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
huggy59
@huggy59
11 years ago
17 posts
Thanks Steve. I ran into too many issues trying to get this working with EHCP and later versions of Ubuntu. I was not able to get Ubuntu 10.x running on my VM - kernel issues - so I've done an end-runaround. I've set up a new server (under VMware) using Ubuntu 14.04 plus updates, using this step-by-step tutorial:

http://www.howtoforge.com/perfect-server-ubuntu-14.04-apache2-php-mysql-pureftpd-bind-dovecot-ispconfig-3

I now have a working ISP-like config, and it appears to be running JR5 core just fine. Next I'll set up the dev stuff. Maybe I'll get there after all!
brian
@brian
11 years ago
10,149 posts
huggy59:
Thanks Steve. I ran into too many issues trying to get this working with EHCP and later versions of Ubuntu. I was not able to get Ubuntu 10.x running on my VM - kernel issues - so I've done an end-runaround. I've set up a new server (under VMware) using Ubuntu 14.04 plus updates, using this step-by-step tutorial:

http://www.howtoforge.com/perfect-server-ubuntu-14.04-apache2-php-mysql-pureftpd-bind-dovecot-ispconfig-3

I now have a working ISP-like config, and it appears to be running JR5 core just fine. Next I'll set up the dev stuff. Maybe I'll get there after all!

Glad to hear that is all working ;) Let us know if you run into any issues.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
michael
@michael
11 years ago
7,799 posts
I setup a new local dev server yesterday too, using this setup:

"High Performance Jamroom on Digital Ocean"
https://www.jamroom.net/the-jamroom-network/blog/23/high-performance-jamroom-on-digitalocean

It is noticeably faster than the same machine running EHCP. Don't know why, don't really care, loving it. :)

Tags