custom images, files not taking affect in contianers
sunkugupta opened this issue · comments
Hi Duncan,
We placed our custom files, images and scripts in /sfs/webapps/siebel directories. However, the custom files, images and scripts are not taking affect and does not reflect in UI. Any suggestions?
Thanks
Sunku
You should check the basics. Are those files being served by tomcat first? Check server.xml in the SAI container to be clear on which paths will be retrieved from that location. The only content from there by default will be from 'custom' folders.
Yes. I already did. I checked the server.xml and verified the files existed in the /sfs/webapps/siebel/....
OK. Let's go over the connections of the way it should work. If something here isn't working, then it's likely another permission issue.
Firstly - I have my containers running like this:
docker inspect sai-ENT
This verifies the location of my mounts:
"Mounts": [ { "Type": "bind", "Source": "/var/lib/docker/volumes/PV/ENT/SAI", "Destination": "/persistent", "Mode": "", "RW": true, "Propagation": "rslave" }, { "Type": "bind", "Source": "/var/lib/docker/volumes/PV/ENT/SFS", "Destination": "/sfs", "Mode": "", "RW": true, "Propagation": "rslave" }
So my sfs folder is in /var/lib/docker/volumes/PV/ENT/SFS.
Here's where I expect to drop an image for testing. There's nothing there at present:
[root@demohost custom]# pwd
/var/lib/docker/volumes/PV/ENT/SFS/webapps/siebel/images/custom
[root@demohost custom]# ls
[root@demohost custom]#
In the SAI container, server.xml in applicationcontainer_external/conf shows how the image path should redirect:
<Context docBase="/sfs/webapps/siebel/images/custom" path="/siebel/images/custom" />
This means that in the browser if I request siebel/images/custom/logo77.gif, it should retrieve that file from /sfs/webapps/siebel/images/custom/logo77.gif.
I'll try this before placing the file:
OK. So no file there yet. This file by the way is the Oracle logo from the login screen:
So, I'll save this logo into /var/lib/docker/volumes/PV/ENT/SFS/webapps/siebel/images/custom:
[demoadmin@demohost Downloads]$ cp logo77.gif /var/lib/docker/volumes/PV/ENT/SFS/webapps/siebel/images/custom
Now the files is retrieved correctly from the SFS folder:
Hope this helps.
I have the containers as shown belo
docker inspect shows below
"Mounts": [
{
"Type": "bind",
"Source": "/masapps/DOCK/PV/masdocentp/SAI",
"Destination": "/persistent",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/masapps/DOCK/PV/masdocentp/SFS",
"Destination": "/sfs",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
I can also see the files as show below
iebel@docksblapp1 custom]$ pwd
/masapps/DOCK/PV/masdocentp/SFS/webapps/siebel/images/custom
[siebel@docksblapp1 custom]$ ls
Appeals_backup.gif AppealsFOIA.gif Appeals.gif applet_salutation2.jpg attention.gif CMS-logo.jpg info.gif MASLoginLogo.gif masposition.png readme.txt
However, the UI does not reflect the files.
try this ....
docker exec -it sai-masdocentp bash
more /sfs/webapps/siebel/images/custom/readme.txt
this is to confirm that the SAI node can actually read from the SFS folder
iebel@docksblapp1 ~]$ docker exec -it sai-masdocentp bash more /sfs/webapps/siebel/images/custom/readme.txt
/usr/bin/more: /usr/bin/more: cannot execute binary file
[siebel@docksblapp1 ~]$ docker exec -it sai-masdocentp bash /sfs/webapps/siebel/images/custom/readme.txt
/sfs/webapps/siebel/images/custom/readme.txt: line 1: syntax error near unexpected token (' /sfs/webapps/siebel/images/custom/readme.txt: line 1:
Open UI images are stored in the "images" folder. Customers are advised not to store their images in the same folder in order to avoid the images being overwritten by Oracle in future upgrades. Please store your images in this folder ("images\custom") instead.'
[siebel@docksblapp1 ~]$
Those are two separate commands
Command one logs you into the running container
docker exec -it sai-masdocentp bash
Command two confirm that access is available to the file
more /sfs/webapps/siebel/images/custom/readme.txt
From your output it does look as though files are accessible in the images folder in SFS. Can you try this URL in your browser please.
https://<servername>/siebel/images/custom/Appeals.gif
Replace with your server's name.
This got resolved.
server.xml had incorrect entries. Fixed the entries and it worked.. You can close this now
Thanks for updating. Closing.