Deployment troubleshooting for Azure Linux App Service (GNU)
The reason causing this issue is due to the lack of necessary deps on the Linux environment. Linux distributions are usually minimal compared to Windows and we need to install the dependencies needed for IronPdf rendering engine.
IronPdf checks them on rendering and try to download and install if it doesn't exist yet.
Deployment Step
After the app service is deployed from visual studio, I go to SSH console.
Under wwwroot directory, execute this command "ldd IronInterop.so
" to check if all the necessary deps are found. (On the first time, SSH cannot detect the files under wwwroot directory. Please go back to main directory with "cd ~
" and then enter back to wwwroot directory and check with "ls
" if the files exist).
You'll see the output accordingly that some deps are not found.
To install them, execute this command:
apt-get update && apt-get install -y libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libxkbcommon0 libasound2 libatspi2.0-0
Please note that the above deps might be different depending on the Linux distribution base you're currently deploying.
To check current Linux OS info, please use "cat /etc/os-release" command. If you're using different Linux distribution, you might need to confirm again with "ldd IronInterop.so
" to check which deps are missing.
My Linux distribution info:
When the installation is finished, I checked with this command "ldd IronInterop.so
" to confirm all the deps are installed and can be found.
Pdf Rendering Step:
After that, I tried to render the pdf from the web app, and able to generate successfully within seconds, without the need to install the deps on the rendering process.
You'll see the logs like this. Please note that this is not downloading or installing anything, but just checking with "ldd IronInterop.so
" internally, to confirm all the deps are installed.