Uploading files will fail after ~7MB when using Windows 2008, over SSL, via a load balancer

One of the client recently encountered this issue with EPiServer CMS.

It’s very frastructing issue, my workmates spent lots of time looking from the EPiServer side, this is our perception as EPiServer had more bugs than Microsoft. However, this time we are wrong 🙂

Thanks for all my workmates hard work.

Hot-fix can be downloaded from here : https://support.microsoft.com/en-us/kb/2634328

CQ5.6.1 (Author + Publish) Docker file – CentOS

FROM centos
MAINTAINER vincent

#Install and set java home
RUN mkdir -p /export/apps/jdk
ADD jdk1.7.0_79 /export/apps/jdk/JDK-1_7_0_79
ENV JAVA_HOME /export/apps/jdk/JDK-1_7_0_79
ENV PATH $PATH:$JAVA_HOME/bin

#Install CQ Author
RUN mkdir -p /export/apps/aem/author
WORKDIR /export/apps/aem/author
ADD cq5-author-p4502.jar /export/apps/aem/author/cq5-author-p4502.jar
ADD license.properties /export/apps/aem/author/license.properties
RUN java -jar cq5-author-p4502.jar -unpack -v

#Now start Publish Instance
RUN mkdir -p /export/apps/aem/publish
WORKDIR /export/apps/aem/publish
ADD cq5-author-p4502.jar /export/apps/aem/publish/cq5-publish-p4503.jar
ADD license.properties /export/apps/aem/publish/license.properties
RUN java -jar cq5-publish-p4503.jar -unpack -v

#Set up all CQ ENV
ENV CQ_FOREGROUND y
ENV CQ_VERBOSE y
ENV CQ_NOBROWSER y
ENV CQ_RUNMODE “author,publish”
ENV CQ_JVM_OPTS “-server -Xmx1524M -Xms512M -XX:MaxPermSize=512M”

RUN yum install -y epel-release && \
yum install -y supervisor && \
yum clean all
EXPOSE 80 443 4502 4503
# supervisor is needed to run multiple process in same docker image
RUN echo “[supervisord]” > /etc/supervisord.conf && \
echo “nodaemon=true” >> /etc/supervisord.conf && \
echo “” >> /etc/supervisord.conf && \
echo “[program:aem_author]” >> /etc/supervisord.conf && \
echo “startsecs = 0” >> /etc/supervisord.conf && \
echo “autorestart = false” >> /etc/supervisord.conf && \
echo “command=/export/apps/aem/author/crx-quickstart/bin/start” >> /etc/supervisord.conf && \
echo “” >> /etc/supervisord.conf && \
echo “[program:aem_publish]” >> /etc/supervisord.conf && \
echo “startsecs = 0” >> /etc/supervisord.conf && \
echo “autorestart = false” >> /etc/supervisord.conf && \
echo “command=/export/apps/aem/publish/crx-quickstart/bin/start” >> /etc/supervisord.conf
CMD [“/usr/bin/supervisord”]

Docker useful command list

# check docker process is running

docker ps
# List all container

docker ps -a

# stop docker running process

docker stop <containerid>

# delete container

docker rm <containerid>

# delete image
docker rmi <imageid>
# build image
docker build –tag=”cq:5.6″ .

# run docker container
docker run -d -t -i -p 4502:4502 -p 4503:4503 cq:5.6

# shell into the vm
docker exec -i -t <containerid> bash
# get docker external ip address
boot2docker cfg

======================================================================================================================================================
/usr/bin/./supervisord -c /etc/supervisord.conf

# search error from error.log file, ignore case
grep ‘error’ error.log -i
#
netstat -anp tcp | grep 3000

Mongo DB Shell Command – Create Database

  1. Connect to shell by running mongo
  2. To create a database, enter “Use <database_name>”  command in the shell. (The command will create a new database, if it doesn’t exist, otherwise it will return the existing database)
  3. You need to insert at least one document to make it display in the db list command. Enter “db.<document_name>.insert({name:”test”})” command to create the first document.

Ref:

http://www.tutorialspoint.com/mongodb/mongodb_create_database.htm

CQ Clientlibs debug tips

Clientlibs

Debug clientlibs

Append ?debugClientLibs=true to write out single file and CTRL+SHIFT+U gives you tim­ing info.

Where are the gen­er­ated files stored in CQ?

They are in /var/clientlibs

When devel­op­ing I want to have sin­gle file ref­er­ences in my HTML

Enable the debug-option in the HTML Library Manager

How can I use cache-busting and clientlibs?

You can enable the hash­ing of the url via ‘ver­sioned clientlibs’.

To see a “final View” of your test page without to publish: wcmmode=disabled

http://localhost:4502/cf#/content/geometrixx/folder/test.html?wcmmode=disabled

How do debug CQ/AEM from Intellij 14.x

Set up a Web Facet in the Project

  1. Go to File -> Project Structure
  2. Select the “content” module (the folder contains components,templates)
  3. Click “+” above the list of modules and select “Web”
  4. As the Web Resource Directory, select the content/src/main/content/jcr_root subdirectory of your project as shown in the screen shot below.

Set up Debugger

1. Goto Intellij -> Run -> Edit Configurations -> + (Add New Configuration) -> JSR 45 Compatible Server -> Remote

2. Give the debugger a name CQ, remove any Before Launch steps (as we are not really building anything)

3. Add Application server Generic, any start page say Geometrixx English and leave everything default

4. Click on tab Startup/Connection, Debug. Change the port number or leave it default (in the below pic it was changed to 8000)

Snip20150720_14

5. Restart the CQ instance with the following parameters
java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,suspend=n,server=y -XX:MaxPermSize=512m -Xmx1024M -jar cq-author-4502.jar -nofork

6. Click “Debug” icon to start the debugger from Intellij

Snip20150720_16