Difference between revisions of "Multiple instances of iDempiere"

From iDempiere en
Tag: visualeditor
Line 1: Line 1:
−
Running multiple instances of idempiere on a single server is not too difficult. Here is a checklist of things to take care of:
+
Running multiple instances of iDempiere on a single server is not too difficult. Here is a checklist of things to take care of:
  
 
* Install the instances into different directories. The instances do not need to share any common files. So you are just fine making a full installation for each instance.
 
* Install the instances into different directories. The instances do not need to share any common files. So you are just fine making a full installation for each instance.
 
* Make sure each instance uses its own data base. Use different names for the instance data bases.
 
* Make sure each instance uses its own data base. Use different names for the instance data bases.
−
* Make sure the idempiere server instances use different tcp ports.
+
* Make sure the iDempiere server instances use different tcp ports.
 
* If you really should need to use a single port to access all of the instances you could use a http server like apache or ngnix to do define virtual hosts. Proxying or use of rewrite rules will then allow you to do the desired redirections. I recommend using subdomains to do the job.
 
* If you really should need to use a single port to access all of the instances you could use a http server like apache or ngnix to do define virtual hosts. Proxying or use of rewrite rules will then allow you to do the desired redirections. I recommend using subdomains to do the job.
 
* With a http server in front of iDempiere you will also be able to offload the ssh encryption (https) onto the http server.
 
* With a http server in front of iDempiere you will also be able to offload the ssh encryption (https) onto the http server.
 
* There is another benefit to using subdomains for browser access: If all your server instances use the same host name the client browser will sometimes not be able to keep cookies from different instances apart. This can lead to a blocked session as discussed [https://groups.google.com/g/idempiere/c/kBefSKYsq0o here] in the iDempiere google group.
 
* There is another benefit to using subdomains for browser access: If all your server instances use the same host name the client browser will sometimes not be able to keep cookies from different instances apart. This can lead to a blocked session as discussed [https://groups.google.com/g/idempiere/c/kBefSKYsq0o here] in the iDempiere google group.
 
* Use different DB user names. The docs advise not to change the default user name Adempiere and this is ok for a single instance installation. Still if you use a single DB user for all of your instances you will run into trouble once you need to restore a database from a backup file. The RUN_DBRestore.sh will attempt to delete and recreate the DB user which will throw an error when the user owns more than one DB.
 
* Use different DB user names. The docs advise not to change the default user name Adempiere and this is ok for a single instance installation. Still if you use a single DB user for all of your instances you will run into trouble once you need to restore a database from a backup file. The RUN_DBRestore.sh will attempt to delete and recreate the DB user which will throw an error when the user owns more than one DB.
−
* You can run all of your instances as services in parallel. Before the installation of another instance rename the service script: 'sudo mv /etc/init.d/idempiere /etc/init.d/idempiere-theInstance.'
+
* You can run all of your instances as services in parallel. Before the installation of another instance rename the service script: <code>sudo mv /etc/init.d/iDempiere /etc/init.d/iDempiere-theInstance.</code> Of course you will need to do some book keeping work with the service controller of your OS to ensure that the renamed services are started as desired.
−
Of course you will need to do some book keeping work with the service controller of your OS to ensure that the renamed services are started as desired.
+
 
−
* The service controller talks to the iDempiere server via the OSGI console. For this to work without problems in a multi instance environment you need to assign a different telnet port number to each of the instances: in the editor of your choice open /etc/init.d/idempiere. Find the line 'export TELNET_PORT=12612' and change the port number to something else.
+
* The service controller talks to the iDempiere server via the OSGI console. For this to work without problems in a multi instance environment you need to assign a different telnet port number to each of the instances: in the editor of your choice open the file <code>/etc/init.d/iDempiere</code>. Find the line <code>export TELNET_PORT=12612</code> and change the port number to something else.
  
 
Please Note:
 
Please Note:
  
−
* OS specific descriptions in this guide are for Ubuntu 16/18/20 or Debian, if on another OS you need to do some research.
+
* OS specific descriptions in this guide are for Ubuntu 16/18/20 or Debian, if on another OS you might need to do some further research.
−
* I have been using the described approach to host idempiere versions 5 and 6 for some time now and did not have any problems so far. Still make sure you do your own thorough tests if you want to go that route.
+
* I have been using the described approach to host iDempiere since versions 5 for some time now and did not have any problems so far. Still make sure you do your own thorough tests if you want to go that route.
−
* If you run into any problems (and maybe even manage to solve them) please report back to the community. (You can edit this page or post to the iDempiere google group) Thanks!
+
* If you run into any problems (and maybe even manage to solve them) please report back to the community. (You can edit this page or post to the iDempiere [https://groups.google.com/g/idempiere Google group]) Thanks!
 
[[Category:HowTo-Technical]]
 
[[Category:HowTo-Technical]]

Revision as of 13:19, 27 July 2021

Running multiple instances of iDempiere on a single server is not too difficult. Here is a checklist of things to take care of:

  • Install the instances into different directories. The instances do not need to share any common files. So you are just fine making a full installation for each instance.
  • Make sure each instance uses its own data base. Use different names for the instance data bases.
  • Make sure the iDempiere server instances use different tcp ports.
  • If you really should need to use a single port to access all of the instances you could use a http server like apache or ngnix to do define virtual hosts. Proxying or use of rewrite rules will then allow you to do the desired redirections. I recommend using subdomains to do the job.
  • With a http server in front of iDempiere you will also be able to offload the ssh encryption (https) onto the http server.
  • There is another benefit to using subdomains for browser access: If all your server instances use the same host name the client browser will sometimes not be able to keep cookies from different instances apart. This can lead to a blocked session as discussed here in the iDempiere google group.
  • Use different DB user names. The docs advise not to change the default user name Adempiere and this is ok for a single instance installation. Still if you use a single DB user for all of your instances you will run into trouble once you need to restore a database from a backup file. The RUN_DBRestore.sh will attempt to delete and recreate the DB user which will throw an error when the user owns more than one DB.
  • You can run all of your instances as services in parallel. Before the installation of another instance rename the service script: sudo mv /etc/init.d/iDempiere /etc/init.d/iDempiere-theInstance. Of course you will need to do some book keeping work with the service controller of your OS to ensure that the renamed services are started as desired.
  • The service controller talks to the iDempiere server via the OSGI console. For this to work without problems in a multi instance environment you need to assign a different telnet port number to each of the instances: in the editor of your choice open the file /etc/init.d/iDempiere. Find the line export TELNET_PORT=12612 and change the port number to something else.

Please Note:

  • OS specific descriptions in this guide are for Ubuntu 16/18/20 or Debian, if on another OS you might need to do some further research.
  • I have been using the described approach to host iDempiere since versions 5 for some time now and did not have any problems so far. Still make sure you do your own thorough tests if you want to go that route.
  • If you run into any problems (and maybe even manage to solve them) please report back to the community. (You can edit this page or post to the iDempiere Google group) Thanks!
Cookies help us deliver our services. By using our services, you agree to our use of cookies.