Odoo Help

9 Answers

Olivier Dony (odo)

--Olivier Dony (odo)--

| 7 6 8
Ramilies, Belgium
--Olivier Dony (odo)--


Olivier Dony (odo)
2/15/13, 6:44 PM

You can perfectly well serve all the databases with a single OpenERP server on your machine. Unfortunately you did not mention what error you were seeing and what you expected as a result - makes it a bit harder to help you ;-)

Anyway, here are some random ideas based on the information you provided:

  • If you have a problem with OpenERP not listening on all interfaces, try to specify as the xmlrpc_interface in the configuration file, this should have OpenERP listen on 8069 on all IPs.
  • Note that Apache is not relevant if you're connecting to e.g. http://www.sample.com:8069/?db=openerp because you're directly connecting to OpenERP. If you want to go through Apache, you need to setup ReverseProxy rules in your vhost configs, and OpenERP does not need to listen to all public IPs then.
  • OpenERP 6.1 and later can autodetect the database name based on the virtual host name, and filter the name of the available databases: you need to start it with the --db-filter parameter, which represents a pattern used to filter the list of available databases. %h represents the domain name and %d is the first domain component of that domain. So for example with --db-filter=^%d$ I will only see the test database if I end up on the server using http://test.example.com:8069. If there's only one database match, the list is not displayed and the user will directly end up on the right database. This works even behind Apache reverse proxies if you make sure that OpenERP see the external hostname, i.e. by setting a X-Forwarded-Host header in your Apache proxy config and enabling the --proxy mode of OpenERP.

Update: The port reuse problem comes because you are trying to start multiple OpenERP servers on the same interface/port combination. This is simply not possible unless you are careful to start just one server per IP with the IP set in the xmlrpc_interface parameter, and I don't think you need that. The named-based virtual hosts that Apache supports are all handled by a single master process that listens on port 80 on all the interfaces. If you want to do the same with OpenERP you only need to start one OpenERP server for all your domains, and make it listen on, port 8069, as I explained above.
On top of that it's not clear what you would have set differently in the various config files. Running 40 different OpenERP servers on the same machine with identical code sounds like a lot of overkill. OpenERP is designed to be multi-tenant so that many (read: hundreds) of databases can be served from the same server.

Boyd Lynn Gerber
2/15/13, 6:47 PM

My problem is I get post already in use. I do the following. /location_domain/openerp/openerp-server -c /location_domain/openerp.cfg &

Boyd Lynn Gerber
2/15/13, 6:51 PM

Then on the next add using the -c with a different cfg and location I get the already in use. I have different names in the config file but they are using the same IP. Making use of the apache2 named configurations. So if the system uses the name it should work, but if using IP it will fail as i

Olivier Dony (odo)
2/15/13, 8:10 PM

Thanks for the extra info, I updated my answer

Luis Leiva
2/20/13, 8:17 PM

Important note on using --db-filter=^%d$ Database names ARE case sensitive while URL is NOT case sensitive, so if you have uppercases on database names the --db-filter=^%d$ will not work as URL converts everything to lower cases. Conclusion: use only lowercases in database names to use this.

bino oetomo
3/14/13, 12:08 AM

Hi Oliver and All

I create 2 db : db1 and db2

I also have hostname setup on my dns server ; db1.erp.bno db2.erp.bno

and in my /etc/openerp/openerp-server.conf , I put :

  1. list_db = False To disable the DB choice list, and
  2. db_filter=^%d$ In hope that web UI will select the db in regards of hostname (first part of FQDN)

But both didn't work 1. when I try to open http://db2.erp.bno:8069 , web UI forwardme to http://db2.erp.bno:8069/?db=db1 2. the DB choice list still there.

My installation is in ubuntu using apt-get

Kindly please give me your enlighten

Sincerely -bino-

Michael Karrer
3/27/13, 9:08 AM

Same for me db_filter seems to be not working on OpenERP Version 7

Michael Karrer
3/27/13, 9:23 AM

db-filter is working if i use it as a startup command for the server BUT is not working if i use it in the server config file ?!?

6/19/13, 9:41 PM

Olivier, thanks for the explanation. I believe that the --proxy setting is in fact called --proxy-mode? I see a problem with the --db-filter setting: we have to make database names always be exactly the same like subdomains - this might be for whatever reason not always possible and it would be much better to have some way of mapping subdomains to arbitrary db names, this could be achieved e.g. with an Apache environment variable. Is there any possibility of creating such a mapping (without patching the OE7 code?). Also it would be great to have this kind of configuration available via web.

6/19/13, 10:04 PM

Yes, we could add a mod_rewrite rule to add / replace the query string on every request, but I do not know if this will work with every request that OE7 generates... so fixing this in config file would be the best way.

6/19/13, 10:24 PM

Another problem with this approach: if %h is the domain name, like e.g. http://example.com - this can not be a PostgreSQL database name, as the dot is an illegal character. So it is not possible to use a dbfilter like e.g. %h_%d because it would result in example.com_subdomain - you can not add such a database via the database creation dialog.

www postgresql org / docs / current / interactive / sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS (can not post links)

Abner Galeno Jr.
2/15/13, 12:05 PM

I have no idea yet how XML-RPC works, but it might be the answer you are looking for.


https://accounts.openerp.com/forum/Help-1/question/336/ https://accounts.openerp.com/forum/Help-1/question/915/ https://accounts.openerp.com/forum/Help-1/question/429/ I would say doing multiple installs would be one hell of a installation+maintenance job.

4/9/13, 3:05 AM


I have try this and its working well.


This one of easy to setup.

1 Comment
Patrice Gaillard
5/29/13, 9:10 AM

This one sounds great. How did you apply this patch ? I don't get it...

Boyd Lynn Gerber
2/17/13, 11:26 AM

Sovled by using *:8069 in /etc/apache2/listen.conf Then adding to each domain where desire

www.sample.com:8069/?db=openerp having a unique db for each domain.

Having a goood generic config and uses and using it with the -c config.cfg file.

1 Comment
Olivier Dony (odo)
2/18/13, 8:27 AM

This makes no sense, why force Apache to listen to port 8069? If you're making Apache proxy requests to OpenERP, why don't you do it on the normal port (80/443)? Then just direct your customers to their own URL. So far it looks like you're just testing random things without trying to understand :-/




| 6 5 7
Buenos Aires, Argentina
Karma will give me a place in heaven!
2/15/13, 3:43 PM

I think you can do the trick by launching different servers using the -c option when launching them.

With that option you can specify which configuration your server will use, in particular, which port to 'hear'.

For example, I am not sure but I think the default values in server.conf will be:

netrpc_port = 8070
smtp_port = 25
xmlrpc_port = 8069
xmlrpcs_port = 8071

By changing those you could specify which ports you want to use in every server process.

Hope it helps you!

Boyd Lynn Gerber
2/15/13, 4:20 PM

Thanks, I should have been more explicit about what I have tried. Each doman has a config file with its database. My Problem is because I am using named services. I had over 750 public IP's but when my local phone company added Fiber their old DSL stopped working reliably. So Now I have to pay.

Boyd Lynn Gerber
2/15/13, 4:22 PM

Problem is I now only have 5 public IP addresses. I am able to come in to any domain and not have a problem. Seem openERP does not like to share IP addresses and wants to bind to the IP rather than the name. Thanks

6/12/14, 8:02 AM

hello can you please provide me all step of installing multiple instances of openerp

1 Comment
6/12/14, 8:04 AM

Please read bugs . launchpad . net /openobject-server/+bug/1195341

Luis Leiva
2/15/13, 3:51 PM

Have you tried by redirecting subdomains to this: http://server:8069/?db=database

Almost works. For some thing I don't understand it seems to not recognize the database when redirected, but if you refresh the page with that URL the it does works fine.

Try it and tell me how it goes.

1 Comment
Boyd Lynn Gerber
2/15/13, 4:16 PM

That is what I am doing. http://www.sample.com:8069/?db=openerp and so one for each domain and its database. The apache part is working. But the openERP with each having their own conig is not.

Prosper G. Nitcheu
2/15/13, 12:15 PM

Have you tried apache "VirtualHost" configuration ?

1 Comment
Boyd Lynn Gerber
2/15/13, 4:13 PM

Yes, I have that part working for the domains . It is getting the openerp working. Been trying to get customized config files working. What I do for other programs is put the source in /usr/share/openerp with links in all the virtual hosts. name-vitrual-host- domains

8/21/13, 4:39 AM

Why don't use specific_url_db option. It must be easiest way to do this job.


Use add this option in openerp-server config file

1 Comment
4/16/15, 4:17 PM

I tried this in v8 with no result. specific_url_db=database1.mydomain.com.co:DatabaseName1,database2.mydomain.com.co:DatabaseName2

Ask a Question
Keep Informed
10 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now