Hoping someone can help me out. I’m trying to customise the Web Portal pages as described in
KNIME Server Administration Guide at section Customizing WebPortal layout.
I tried on the server to copy the webportalTemplate.goldMining and renamed it webportalTemplate
but in the browser the Web Portal pages doesn’t seem to change.
Is there something else I should do?
Welcome to our forum!
This probably might be a cache issue. Could you refresh you browser webportal with shift+F5? This should fix the issue
Let me know if that helps!
Hi thank you for your help. I’ve tried to reload the browser and not use the cache, but the Web Portal page does not change. Is there any other setting or config file that I could alter in the server in order to show the new template?
Have you restarted your server after you changed the folders?
Yes i restarted the server after the changes
Ok, let me just repeat to make sure I understand:
- You renamed the example Goldmining file as ‘webportalTemplate’ in the /config/ folder
- After this, you have restarted your server
- Then you have opened the webportal with reloaded cache (shift+F5)
but you still do not see any changes in the template?
Can you please tell me what web browser are you using and its version, and what server version are you in?
Yes i renamed the whole folder webportalTemplate.goldMining to webportalTemplate in /srv/knime_server/config directory , restarted the server and opened the webportal with reloaded cache but the changes still don’t show up.
I’m using Knime Server version 4.9.2 (with Knime analytics platform version 4.0.2) and i’ ve used Chrome version 78.0.3904.108 but i’ve also tried Firefox 70.0.1
the Webportal should pick up the changes after server restart from the config/webportalTemplate folder. If you have checked for any typos maybe there is an error message in the server logs?
I have the same problem with @szavits81 .
Just found this topic, so I do exactly the same adviced steps, but still having the same default knime template.
In my case, I have Knime Server 4.9.1 and I’ve tested with all Chrome (78.0.3904.108), Firefox(70.0.1) and Edge. And I’ve no errors in the knime server logs.
Thanks in advanced!
could you please check your catalina.<date>.log file?
There might be an error message like:
Copying of custom template failed. Falling back to default.
I could assume that KNIME Server might not have the rights to copy the customization.
Could you check if the following folder exists:
the content of the folder should be exactly the same as the one of webportalTemplate.
If it’s not available there should be an error in the aforementioned log.
If the problem is concerning some security restriction you could try to give the user that runs KNIME Server write permissions for …/knime/layouts/.
I checked the folder apache-tomee-plus-7.0.5/webapps/knime/VAADIN/themes/knime/layouts/
and there wasn’t a custom directory at this location and also i checked the logs but i didn’t find any error or fail messages there.
I tried to manually copy the contents of the (customised) webportalTemplate at the location
apache-tomee-plus-7.0.5/webapps/knime/VAADIN/themes/knime/layouts/custom and restarted the server but still the changed contents didn’t showed up and no error messages were found at he logs.
would you be able to share your catalina-log with us?
I now checked the other log file in localhost.2019-12-02.log and it shows this meassage
02-Dec-2019 10:24:29.943 SEVERE [http-nio-8080-exec-1] com.knime.enterprise.webportal.WebportalServlet.servletInitialized Deleting custom template directory failed. WebPortal might not behave as exptected! Unable to delete file: /opt/knime/knime-srv-4.9.2/apache-tomee-plus-7.0.5/webapps/knime/VAADIN/themes/knime/layouts/custom/knime_template_login.html
02-Dec-2019 10:24:29.950 SEVERE [http-nio-8080-exec-1] com.knime.enterprise.webportal.WebportalServlet.servletInitialized Copying of custom template failed. Falling back to default. Failed to list contents of /srv/knime_server/config/webportalTemplate
02-Dec-2019 10:24:29.950 SEVERE [http-nio-8080-exec-1] com.knime.enterprise.webportal.WebportalServlet.servletInitialized Deleting custom template directory failed. WebPortal might not behave as exptected! Failed to list contents of /srv/knime_server/config/webportalTemplate
Thanks @moritz.heine, I’ve the customized layout worked now.
Have a nice day!
here we go.
This seems to be a permission problem (it’s a guess since we don’t have further information). Could you check the permissions on the VAADIN/themes directory (and it’s sub directories) and ensure that the user starting KNIME Server has also read and write permissions? Could you also check the permissions for /srv/knime_server/config/webportalTemplate?
@tttpham, could you elaborate what you’ve done and which for which user your KNIME Server runs?
I aded the user knime to the root group 0 and that solved the problem.
while this works you should consider an alternative solution where you give the knime user access to the needed folder instead of making it a root user. It’s highly discouraged to do so, as the executor usually also runs with the knime user, which then has access to everything.
Furthermore there might be other problems connected to that.
I’ll also contact my colleague who manages the server instances about the issue (I assume you’re using Azure or AWS?).
Yes i’m using Azure, i remover as you suggested knime user from the root group and now i’m trying to find a way to give user knime write access to /apache-tomee-plus-7.0.5/webapps/knime/VAADIN/themes/knime/layouts
I tried with :
chown -R knime:knime /opt/knime/knime-srv-4.9.2/apache-tomee-plus-7.0.5/webapps/knime/VAADIN/themes/knime/layouts
but it doesn’t seem to work
In fact, I did not really do anything to make it worked @@ With your comment, I check the respectively folder on our server and see that the user have all the needed rights. (We have installed Knime with a specific knime user , not root).
I did not know why the files are not copied as it must be. I stop and start the server again, and finnally it worked @@ (I did a restart before, maybe there’s a little bit difference ?)
instead of changing the owner of the directory you could change the permissions of that user for the specific folder. You’d need read and write permissions.