-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matomo not working properly in Azure App Service with PHP 8 and Nginx #79
Comments
Hi @harripaalanen. Thanks for creating the issue. To me this more likely sounds like a webserver configuration issue. |
Yeah, it might be a configuration issue but the strange thing is that exactly the same webserver configuration works with different document root. And the two documents roots have equal contents. Only difference seems to be the permission stuff which we cannot control. |
Do the matomo files have read/write permission for the user nginx is running with? At least the |
Can confirm original problem and solution. Still figuring out how to make the workaround persistent, and the specific problem. Absolutely nothing in any of the logs. |
Here is the output, folder is writable but owned by nobody:nogroup
|
This still sound like a permission problem where we can't provide any proper solution in the code. Some direcories need to be writable by the webserver in order to place some temporary files. A solution that could work is to use a custom tmp path for Matomo. I think the tmp path can be overwritten adding a
|
I'm getting a similar problem. I use azure to run matomo with a storage account to store tmp folder (define('PIWIK_USER_PATH', '/usr/share/nginx/bootstrapmount');) I'm also getting this error:
The problem seems to be related to the storage account, the files are 777 but owned by NOBODY:NOGROUP. This seems to be causing a problem with matomo, the UIDs do not match with the web servers, the sessions are giving the error. |
any update on this? Getting the same issue when trying to deploy in azure. App Service (as a docker container or a php app), container environment, container instances, etc. All throw the error whenever you try and make them persistent with storage added. Makes all the methods of deploying to a scalable app pretty impossible. |
Dear People, It´s very simple to reproduce.
Error Message: For me this problem seems to be a showstoper for using Matomo on Azure Cloud. If someone have an idea, please let me know. Thank you in advance |
I got it working in azure but its a bit slow. Using the docker container under app service but this solution should apply to app service web server or any of the other container methods in azure. The problem is matomo's tmp dir is on azure persistent storage and matomo doesnt like how azure handles persistent storage. My solution was using a bootstrap.php to redirect tmp outside of the persistent storage (similar to sgiehl's proposed solution but I couldnt get his to work). This setting also moves the config folder which is why I needed 2 persistent storage mappings, 1 for /var/www/home and another for /tmp/config. That gets it to work without errors but Im still working on how to get it to run faster because its pretty slow. Any help getting the speed up to normal would be much appreciated. bootstrap.php placed in the root matomo dir |
Note: if you are trying my method above on php 8.2 web app then you only need the persistent storage mapping for /tmp/config and of course, thats where your config files go now. |
Its actually much faster when run in app service web app. the containerized version is slow because all matomo files are in azure file stores. |
Unfortunately we're not aware of this being a problem with Matomo. we'd love to fix it but it's not clear that we can. As this might be related to (or could be fixed in) the Matomo-nginx project, so i've moved this issue here for now. If anyone else experiences this issue please let us know here. |
We are having problems running Matomo 4.6.2 in Azure App Service (Linux based) with PHP 8 and Nginx server. If we run Matomo from the App Service's /home/site/wwwroot/ directory the problems occurs. If we copy the Matomo files over to different directory (/var/www/html owned by the same user running the Nginx) it works just fine. /home directory should be used for apps deployed in App Service.
Is this some kind of permission issue? It is not possible to modify /home permission in Azure App Service. We used https://github.com/matomo-org/matomo-nginx as base config for our Nginx configuration.
Expected Behavior
Matomo works with the Azure App Service + PHP8 + Nginx combination as it is working with Azure App Service with PHP7 and Apache from the default App Service directory.
Current Behavior
Matomo loads very slow, resources (CSS, images) not getting loaded and nothing works. No errors in logs though.
Possible Solution
Temporary workaround is to run the Matomo from different directory (/var/www/html). In this case Matomo works just fine.
Steps to Reproduce (for Bugs)
Context
Your Environment
The text was updated successfully, but these errors were encountered: