Skip to main content

Posts

Odoo - malformed po file: unknown occurrence

If you are having these log statements in your Odoo log file, it means the error can be something different than what appears in your logs. Ensure that you are naming your modules properly. Odoo behaves differently if you use hyphen (-) in your module name, change it to underscore (_) and your problem will be solved. It's nowhere mentioned in the Odoo module naming recommendation. I hope this small tip will someone same their time Enjoy Programming :)

pyodbc.OperationalError: ('08001', '[08001] [Microsoft][ODBC Driver 17 for SQL Server]

Recently, I faced this error in our Docker-Container environment. All the necessary packages were already installed but still, I was facing this clueless error. I search a bit and after an hour and so I found the exact reason and solution for this error. To know more about this error in detail. Please follow this Github thread. https://github.com/mkleehammer/pyodbc/issues/610 https://github.com/mkleehammer/pyodbc/issues/610#issuecomment-587523802 Solution: It's because the   server's certificate has too weak a key. In case you are using Linux env directly/not the Docker one.  Just edited /etc/ssl/openssl.cnf and change these 2 lines. MinProtocol = TLSv1.0 CipherString = DEFAULT@SECLEVEL=1 In case you are also using a container, please add these three lines to your Docker file. RUN chmod +rwx /etc/ssl/openssl.cnf RUN sed -i ' s/TLSv1.2/TLSv1/g ' /etc/ssl/openssl.cnf RUN sed -i ' s/SECLEVEL=2/SECLEVEL=1/g ' /etc/ssl/openssl.cnf Thanks!! Enjoy Programming! Refer...

Nginx: Cannot allocate memory

Recently I faced one weird issue with Nginx and suddenly getting an error on restarting Nginx "Cannot allocate memory" issue as showing in the following image. When I tried free -g command, memory was available and there was no recent configuration change.  Then I started looking into config files and found this line in one of them: #Working for odoobiz proxy_cache_path /var/odoo/bzcache/ levels=1:2 keys_zone=my_cache:6000m max_size=6g inactive=60m use_temp_path=off; Here I was setting more memory - around 6G and available was only 4G for cache, and when I changed the settings to the following, it worked! #Working for odoobiz proxy_cache_path /var/odoo/bzcache/ levels=1:2 keys_zone=my_cache:2000m max_size=3g inactive=60m use_temp_path=off; So, if you are facing any such issue, please check your configuration files and see if somewhere you are allocating more memory then available. I hope this post will help someone else as well! Thanks! Enjoy Programming!

Firefox ServiceWorker Error: When hitting Odoo homepage in Firefox

In this article, I am writing about the error I faced only in the Firefox browser while accessing the home page of the website developed in Odoo. Issue: It was throwing this error to me in Firefox browser First I thought, it's due to some javascript error or something related to Odoo and after spending some time, I was convinced that it's a Firefox bug. Here are the reference links: https://github.com/mozilla/send/issues/1222 Now the question is, why does this occurs and how to avoid it. Actually, user settings for the client browser play a big role here. Please make sure that the  "Delete cookies and site data when Firefox is closed" option is not selected as shown in the screenshot. If you remove this tick, it will work immediately. But if you want this tick set, you can use "Manage Exceptions". Add your website and click on the "Allow"  button. Then it works, even with the "Delete cookies and site data when Firefox closes" option. T...

Elasticsearch Explained: Trying to create too many scroll contexts. Must be less than or equal to 500

Hello Everyone, today we are going to discuss the following  Error in Elasticsearch " Trying to create too many scroll contexts. Must be less than or equal to: [500]. This limit can be set by changing the [search.max_open_scroll_context] setting" Let's try to understand why this occurs and how we can solve it. When & Why this error trigger? As the title indicates, this error will come if you are using scroll API and especially multiple scrolls Scrolls are expensive to run concurrently and reserves the resources for that particular time. For each scroll ID, there is a unique point-in-time view of the current set of segments preserved for that scroll. This hangs on to files and related caches that would otherwise be removed by the constant segment rewriting that happens while indexing is active. This is why it is especially resource-intensive to do concurrently. Let's dive a little deeper. In order to use scrolling, the initial search request should specify the  sc...

Elasticsearch: Copy Index Structure

Use Case: Let's say, you already have an index on one Server1 and you want to create a new index with the exact structure on Server2 . What you should do? Solution:  1. Copy the index structure from Server1 . Let's say your index name is: product-data-index and you can access the settings here: https://x.x.x.x:9200/product-data-index/_settings { "product-data-index" : { "settings" : { "index" : { "routing" : { "allocation" : { "include" : { "_tier_preference" : "data_content" } } }, "number_of_shards" : "5" , "provided_name" : "product-data-index" , "max_result_window" : "30000" , "creation_date" ...

JamfAAD (Intune) on Macs - Sign-in Errors

 Hi, Today, I faced one weird problem when I changed my O365 password. This pop-up was appearing every few minutes after pressing the cancel button and it was throwing me to 404 URL after pressing the continue button which was completely irritating and frustrating. After spending some time looking into this issue, I found a small trick. 1. Open the Safari browser and make it the default one. 2. Next time when this popup comes, press the Continue button. That's it and the issue is resolved. :) Thanks!! Enjoy Programming!! :)

Manual Odoo Migration from One Server to Another

Today, we will go through a step-by-step process to move running odoo from one server to another server Note:   I assume odoo is already installed and working fine with demo/test DB. Before migrating your Odoo application from one server to another server, it's important to take all the precautionary measures and backup all the data - Database, Code, and Files. Let's start: I - Backup Step-1 . Database Backup  You can use Odoo Database Manager - /web/database/manager link to perform this activity. But if the database is too big, please use pg_dump command from PostgreSQL. Here is the example: pg_dump -W -F t odoo13 > ~/odoo13_28062021.tar Note: Make sure that you are logged in as postgres or odoo user to perform this activity. Step-2 . Backup of custom modules The next step is to take a backup of all of your custom code. Mostly, It will be in your /odoo/custom/  and /odoo/enterprise/ directories. You can use scp command to directly copy your directories from one...

Odoo Error: The 'odoo.addons.web' package was not installed in a way that PackageLoader understands.

 If you are facing this error in odoo12 It means the proper package version of Jinja2 is not installed. Try installing this one: pip3 install Jinja2==2.10.1 It should solve your problem. Thanks!!! Enjoy Programming! :)

Elasticsearch Error: Format version is not supported

When I downgraded Elasticsearch 7.10 to 7.6, I was not able to restart the elasticsearch service and was facing these errors: and  “Format version is not supported” After diagnosing the issue and going through a number of web URLs, I come to know that the following line in the elasticsearch.yml file will fix my issue. cluster.initial_master_nodes: ["x.x.x.x"] OR  cluster.initial_master_nodes:  master - node - a     I hope it will help someone and save their time too. Thanks!!! Enjoy Programming!! :)

ElasticSearch 7.x not working after upgrade

In case you have upgraded elastic search by mistake and want to rollback to the previous working version, here are the steps. In my case, I upgraded the ElasticSearch to 7.9.2-1 and wanted to rollback to 7.6.2-1 1. yum downgrade elasticsearch-7.6.2-1 2. Restart elasticsearch sudo service elasticsearch start I hope it will work but in case you are facing any of the following issues, please run respective comments. Errors: Problem . Unable to create temporary keystore at [/etc/elasticsearch/elasticsearch.keystore.tmp] Solution : sudo -u elasticsearch -s /usr/share/elasticsearch/bin/elasticsearch-keystore create Problem : Likely root cause: java.nio.file.AccessDeniedException: /etc/elasticsearch Solution : chmod g+w /etc/elasticsearch Thanks!! Enjoy Programming! Reference Links ==================================== https://discuss.elastic.co/t/unable-to-create-temporary-keystore-at-etc-elasticsearch-elasticsearch-keystore-tmp/136411

SSL(Self-Signed) Certificates are working fine on Firefox and Safari, but not on Chrome

Yesterday, I implemented self-signed SSL certificates to one of my websites, and to my surprise https link was working as expected on Safari and Firefox, but not on the Chrome browser. I was getting the following error: With this, I connected with my IT team and come to know that, the certificates are not generated properly. All the browsers support different SSL expiry dates and we had to raise requests again to generate SSL Certificates for a minimum duration which was of 398 days (Apple) so that it can support all the browsers and new certificates worked without any issue. Edit: 28-09-2020 Looks like all the  Browser developers   — such as Google, Apple, Microsoft, and Mozilla have agreed to keep the SSL Certificate Lifespan common - 398 days. Please read more about it here: https://securityboulevard.com/2020/07/mozilla-cuts-ssl-certificate-lifespans-keyfactor Thanks!! Enjoy Programming!! :)

Odoo: Qweb Templates Cache Issue

Hi Everyone, Today I was working on a hotel booking template in Odoo and changes made in the Qweb template(.xml) were not reflecting on updating module with odoo service restart. Tried few times without any success :(. Finally, I decided to delete the old template from Odoo backend and then update module again and it worked like a charm!! :) Steps to delete template from backend: Settings --> User Interface --> Views --> Search by template name Delete the used template. Although it's a small post, but I'm sure it will meet the purpose and help someone in the future. Thanks!!! Enjoy Programming!! :) Reference Links: =================================== https://www.odoo.com/forum/help-1/question/odoo-cache-and-updating-qweb-templates-84492

RHEL/CentOS 8 docker-ce installation Error: package docker-ce-3:19.03.8-3.el7.x86_64 requires containerd.io >= 1.2.2-3

If you are facing the error while installing docker-ce as follow: To fix it, you can either install a specific stable version like: $ sudo dnf install docker-ce-3:18.09.1-3.el7 OR you can force the installation of docker-ce with the --nobest option $ sudo dnf install --nobest docker-ce OR Install the latest available containerd.io package manually $ sudo dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm After the package is installed, we can simply install the latest docker-ce $ sudo dnf install docker-ce This option is less convenient since the containerd.io package is not installed as a dependency of docker-ce , therefore it will not be removed automatically when the latter is uninstalled from the system. I hope it will fix your issue!! Thanks!!!!!!! Enjoy Programming :) Reference Links =================================== https://linuxconfig.org/how-to-install-docker...

RHEL/CentOS 8 Error: problem with installed package podman-docker

If you guys are facing an error while installing  Docker CE on Centos/RHEL 8 as follow: Here is the workaround For CentOS/RHEL: Uninstall podman before updating it  sudo yum -y remove podman  and install it back w/o manpages: # install all podman dependencies except podman-manpages sudo yum -y install oci-systemd-hook libvarlink Then again install docker-ce # install docker-ce sudo yum -y install docker-ce It should work this time! If still facing an issue, try to use --nobest flag with command $ sudo dnf -y install docker-ce --nobest Workaround for For Ubunutu: sudo apt install -o Dpkg::Options::="--force-overwrite" podman Thanks!!! Enjoy Programming :) Reference Links: ============================= https://github.com/containers/libpod/issues/4791#issuecomment-575124857

RabbitMQ server issue - vhost ‘/’ is down

I'm using RabbitMQ with Celery(Django) for the last couple of months now but recently we faced an unexpected issue where RabbitMQ is not accepting tasks in its queues and error in logs say: INTERNAL_ERROR — aess to prod_vhost ‘/’ refused for user ‘prod’: prod_vhost ‘/’ is down.` Now, how to solve this problem: From the Rabbitmq log file you can get the destination file URL, in my case it was /var/lib/rabbitmq/mnesia/rabbit@hostname_1/msg_stores/ prod_vhost /784WB90CIFDYO9LJI6DKMI78L/recovery.d ets” If you have problem with vhost '/', most probably the file url will be /var/lib/rabbitmq/mnesia/rabbit@hostname_1/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/recovery.d ets” Resolution : Stop 'rabbitmq-server'. delete the folder that contains the corrupt files. In this case: 784WB90CIFDYO9LJI6DKMI78L Start 'rabbitmq-server'. It should work fine now.   Thanks!!! Enjoy Programming!!!!!!! :) Reference Link: htt...

Odoo12/13: Add an extra action in the tree view action button

This post will help you to add an action window in Odoo. Odoo13: <act_window id="action_make_bank_payment"              name="Do Bank Payment"              res_model="account.ob.payment"              binding_model="account.move"              view_mode="form"              target="new"              binding_views="list,form"              domain="[('type','=', 'in_invoice')]"              groups="account.group_account_user" /> Odoo12: <act_window id="action_make_bank_payment"              name="Do Bank Payment"              res_model="account.ob.payment"             view_mode="tree,form"...

What is 99.99% of Availability?

Service/Application Availability is defined by uptime. I.e. the time between failures. It is dependent upon Downtime  - the amount of time the system is unavailable due to either failures or scheduled maintenance. Recovery time - the average time it takes to recover from failures.  Hence to have high availability, you must have low downtime and low recovery time. What's 4 nines(99.99%) of availability? In simple math: 99.99% availability = (365*24*60) - (365*24*60*99.99/100) = 52.56 minutes = 52 minutes and 30 secs Seven-nines or 99.99999%   - availability means 3 seconds or less of downtime in a year Six-nines or  99.9999%  - availability means 30 seconds or less of downtime in a year Five-nines or  99.999%  - availability means 5 minutes, 15 seconds, or less of downtime in a year Four nines or  99.99%  - availability allows 52 minutes, 33 seconds downtime per year Three nines or  99.9%  - availability allows 8 ho...