Why A PDF Document displayed using Macro, when viewed/Edited etc. throws 502 Bad Gateway error?
Asked by arunk:

A PDF Document once uploaded and using pdf macro, I am Displaying the content on the Page. Once Saved the page says "502 Bad Gateway" , the confluence application is getting crashed.

Error Log:

#  
# A fatal error has been detected by the Java Runtime Environment:  
#  
# SIGSEGV (0xb) at pc=0x00007f6bd9d8dbe4, pid=31034, tid=140101227390720  
#  
# JRE version: 7.0_15-b03  
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode linux-amd64 compressed oops)  
# Problematic frame:  
# C \[libdcpr.so+0x13be4\] anglesModulus+0x64  
#  
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again  
#  
# An error report file with more information is saved as:  
# /tmp/hs_err_pid31034.log  
\[thread 140102475495168 also had an error\]  
#  
# If you would like to submit a bug report, please visit:  
# <http://bugreport.sun.com/bugreport/crash.jsp>  
# The crash happened outside the Java Virtual Machine in native code.  
# See problematic frame for where to report the bug.  
#

Once the Doc is Attached on the Confluence Page, i am getting this error in log.

Error reading map. PlatformID=3, PlatformSpecificID=10  
Reason: java.nio.BufferUnderflowException

I am sure that the Attached PDF Document is throwing the error. Can someone help me to remove the Attachment with out losing the page(Need the version History).

Any operation on the Page goes to 502 Bad Gateway.


Answers:
author: Shannon S
body: Arunk,

Can you try to access the edit page directly using this pattern?

**http://CONFLUENCE=URL/pages/editpage.action?pageId=000000**

If you don't know the page ID, you can find it in the database this way:

```
select * from content where title = 'Page Title' and content_status='current';
```

The contentid column will be the number you want to insert at the end of the URL.

Regards,

Shannon

comments: author: arunk
body: [@Shannon S](/t5/user/viewprofilepage/user-id/510046) Thanks for the reply.

I did same thing as you mentioned.

1. Went to the Page, which displays the PDF by using PDF macro.

2. By Placing the cursor on the Attachment Button, Right clicked and opened it in new Tab, the confluence application got crashed and throwed 502 bad gateway.

3. Restarted the Confluence application and refreshed attachment page on the new tab, then i deleted that PDF document and the PDF macro on the page.

But i wanted to know, why the pdf macro was not rendering the particular pdf content, but it was able to render the other PDF doc on the same page?


author: Shannon S
body: Arunk,

I would assume that the PDF was corrupt somehow, causing the crash. At times, it can even be the content of the PDF, such as a graph or chart. Are you able to obtain another copy of that particular document?

Regards,

Shannon


author: arunk
body: Yes I have the copy.

In the PDF Doc, a collage image was present, i guess that is what is making the Problem.

On the same page, i have other PDF doc, with individual images, that is working fine.


author: Shannon S
body: Thank you for confirming that. That definitely sounds like it could be the culprit.

Let me know if you have any other issues or questions!

Regards,

Shannon


Tags: attachment

macro

pdf