Thursday night on the couch, having a day off friday, I decided to do some layout work on the Confluence we use at my workplace.I had created a new User Macro, that I wanted to implement on the Dashboard, so I started editing in the Global Layouts:As part of the changing of the Dashboard code, I entered: {html}<font size="4">Space Quick Select</font>{html} pressed "Save" and:the Confluence went down - just giving me a "Service Unavailable" from the Traffic Manager.Shit, I restarted the instance- no improvement.....so starting to diagnose: npn@docs01:~$ wget -O - localhost:8080 --2014-01-30 21:46:27-- http://localhost:8080/ Resolving localhost... ::1, 127.0.0.1 Connecting to localhost|::1|:8080... connected. HTTP request sent, awaiting response... 500 Internal Server Error 2014-01-30 21:46:28 ERROR 500: Internal Server Error. npn@docs01:~$ Hm, error 500, diagnosting further: root@docs01:/pack/confluence-data/logs# tail -f atlassian-confluence.log caused by: java.lang.RuntimeException: Error rendering template for decorator global at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:186) caused by: org.apache.velocity.exception.ParseErrorException: Encountered "4" at /decorators/global.vmd[line 38, column 87] Was expecting one of: "," ... ")" ... <WHITESPACE> ... at org.apache.velocity.Template.process(Template.java:141) So, It seems the code I put in the Global layout makes the Confluence crash totally, not just rendering the Dashboard, but TOTALLY!!!I fired up for MySQL and looked at the DECORATORS table: mysql> select DECORATORID,DECORATORNAME FROM DECORATOR; +-------------+-----------------------+ | DECORATORID | DECORATORNAME | +-------------+-----------------------+ | 64913409 | decorators/global.vmd | | 48300036 | decorators/page.vmd | | 59080705 | decorators/page.vmd | +-------------+-----------------------+ 3 rows in set (0.00 sec) mysql> Now, 2 choises are available:Fix ItDelete the DECORATORID=64913409 record.All though I am pretty sure both works, I went for number 1: First, I shut down Confluence completely.Then I made a complete mysqldump of the Confluence Database: mysqldump -uconfluence -p confluence > confluence.sql After securing the backup, I dumped the DECORATOR table: mysqldump -uconfluence -p confluence DECORATOR > DECORATOR.sql After that, I changed the DECORATOR.sql file i "vi" so it looked like: UPDATE DECORATORS SET body='### ...code...code...code.' WHERE DECORATORID=64913409 And I removed the "{html}<font size=\"4\">Space Quick Select</font>{html}" from the body code. Finally, I put back the decorator: mysql -uconfluence -p < DECORATOR.sql And started the Confluence Instance - and SUCCESS - up and running again
Busting the Work Confluence
Thursday night on the couch, having a day off friday, I decided to do some layout work on the Confluence we use at my workplace.
I had created a new User Macro, that I wanted to implement on the Dashboard, so I started editing in the Global Layouts:
As part of the changing of the Dashboard code, I entered:
pressed "Save" and:
the Confluence went down - just giving me a "Service Unavailable" from the Traffic Manager.
Shit, I restarted the instance- no improvement.....so starting to diagnose:
Hm, error 500, diagnosting further:
So, It seems the code I put in the Global layout makes the Confluence crash totally, not just rendering the Dashboard, but TOTALLY!!!
I fired up for MySQL and looked at the DECORATORS table:
Now, 2 choises are available:
All though I am pretty sure both works, I went for number 1:
First, I shut down Confluence completely.
Then I made a complete mysqldump of the Confluence Database:
After securing the backup, I dumped the DECORATOR table:
After that, I changed the DECORATOR.sql file i "vi" so it looked like:
And I removed the "{html}<font size=\"4\">Space Quick Select</font>{html}" from the body code.
Finally, I put back the decorator:
And started the Confluence Instance - and SUCCESS - up and running again