Stirling-PDF icon indicating copy to clipboard operation
Stirling-PDF copied to clipboard

502 error while converting PDF to Image

Open eXqusic92 opened this issue 1 year ago • 7 comments

502 error image

eXqusic92 avatar Dec 28 '23 09:12 eXqusic92

Forgot to mention: deployed with Docker and reverse proxied with Apache

eXqusic92 avatar Dec 28 '23 10:12 eXqusic92

It most likely is caused by your Apache reverse proxy missing certain settings... But I am unable to help sorry

Frooodle avatar Dec 28 '23 10:12 Frooodle

502 error image

Still this issue exists ??? I am not able to replicate this , I am able to convert it .

shubham19091995 avatar Dec 28 '23 19:12 shubham19091995

Nossa,legal ter uma comunidade que possa nos auxiliar..

Maycon1993 avatar Dec 29 '23 10:12 Maycon1993

Yes, issue still exists.Maybe someone who encountered same problem can help. Here is what I found in Apache logs

[Thu Dec 28 11:57:06.778133 2023] [proxy_http:error] [pid 1980388] (20014)Internal error (specific information not available): [client 172.225.37.43:24341] AH01102: error reading status line from remote server 127.0.0.1:8080, referer: https://spdf.mydomain.com/pdf-to-img
[Thu Dec 28 11:57:06.842029 2023] [proxy:error] [pid 1980388] [client 172.225.37.43:24341] AH00898: Error reading from remote server returned by /api/v1/convert/pdf/img, referer: https://spdf.mydomain.com/pdf-to-img
[Thu Dec 28 17:20:37.388104 2023] [proxy_http:error] [pid 2017226] (20014)Internal error (specific information not available): [client 207.154.221.254:51392] AH01102: error reading status line from remote server 127.0.0.1:8080, referer: https://spdf.mydomain.com/pdf-to-img
[Thu Dec 28 17:20:37.442388 2023] [proxy:error] [pid 2017226] [client 207.154.221.254:51392] AH00898: Error reading from remote server returned by /api/v1/convert/pdf/img, referer: https://spdf.mydomain.com/pdf-to-img

eXqusic92 avatar Dec 29 '23 10:12 eXqusic92

And here is my apache conf:

<VirtualHost *:80>

    ServerName spdf.mydomain.com
    ErrorLog ${APACHE_LOG_DIR}/spdf.error.log
    CustomLog ${APACHE_LOG_DIR}/spdf.access.log combined
    ProxyPass / http://127.0.0.1:8080/
    ProxyPassReverse / http://127.0.0.1:8080/
    ProxyRequests Off

RewriteEngine on
RewriteCond %{SERVER_NAME} =spdf.mydomain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

eXqusic92 avatar Dec 29 '23 10:12 eXqusic92

Can you try the config from the first two answers here

https://stackoverflow.com/questions/169453/bad-gateway-502-error-with-apache-mod-proxy-and-tomcat

Frooodle avatar Dec 29 '23 11:12 Frooodle