View source | Discuss this page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Show collection (0 pages)
Collections help

Search

Retail:Developers Guide/How-to/How to Setup MultiServer Dev Environment For Automation

Bulbgraph.png   This feature is available starting from 16Q1

Contents

Overview

This is a quick start guide to set up an automation environment with multiserver

Prepare the environment

/etc/hosts

Add these lines to /etc/hosts

127.0.0.1	central.openbravo.com
127.0.0.1	store1.openbravo.com
127.0.0.1	store2.openbravo.com

Install apache2

Apache2 is required to test offline mode

sudo apt-get install apache2

How to install and configure the Central Server

clone openbravo and the pack

clone these extra modules

openbravo.properties. add or change to

authentication.class=org.openbravo.mobile.core.authenticate.MobileKeyAuthenticationManager
test.environment=true
mobile.server.key=Central

ant install.source

install symmetric.ds (always after install.source and only in the Central server)

ant -f modules/org.openbravo.replication.symmetricds/build.xml install.symmetric.ds

validate and export store's data

ant -f modules/org.openbravo.replication.symmetricds/build.xml validate.store.data -DmobileServerKey=Store1
ant -f modules/org.openbravo.replication.symmetricds/build.xml validate.store.data -DmobileServerKey=Store2
ant -f modules/org.openbravo.retail.storeserver.synchronization/build.xml export.store.data -DmobileServerKey=Store1 -DoutputDirectory=../storeServer1Module
ant -f modules/org.openbravo.retail.storeserver.synchronization/build.xml export.store.data -DmobileServerKey=Store2 -DoutputDirectory=../storeServer2Module

add the projects to eclipse, add the server, verify that there are no errors

if any error shows up, first install.source the pack, then add the 3 multiserver modules, then install.source again, then install sym_ds

in the server, change the port to 9005, 9080, 9009

How to install and configure the Store servers

Store1

clone openbravo. Add this modules (same as central but without the org.openbravo.retail.sampledata)

clone these extra modules

in the openbravo directory

cd openbravo
rm -rf referencedata/sampledata/F_B_International_Group referencedata/sampledata/QA_Testing

and

copy /storeServer1Module to openbravo/modules/

in the openbravo.properties

authentication.class=org.openbravo.mobile.core.authenticate.MobileKeyAuthenticationManager
test.environment=true
mobile.server.key=Store1

install.source

add these stores projects to another eclipse

Store2

follow the same Store steps but

Run

1. start the central server

  1. if there is a permgem error, add -XX:MaxPermSize=512m to the server configuration
  2. log in as Openbravo/openbravo role The White Valley
    1. open the Mobile Servers window
    2. open the Central record
      1. be sure that the "Can be registered" option is flagged
      2. in the store servers, remove the port (:8080) off the url

2. start the store server 1 after the central has finished starting

  1. log in as Openbravo/openbravo role The White Valley
    1. open the Mobile Servers window
    2. open the Central record
      1. in the store servers, remove the port (:8080) off the url

Verify

symetric.ds tables

execute this query:

SELECT * FROM sym_node

verify that it returns central, store1 and store2

Sales Order

Create a sales order in the Central server

Verify that the sales order has been transferred to the store server

How to work in offline mode

Configure apache2

Modify the configuration of the openbravo-jk-mount.conf file for apache2, to filter 'openbravo' requests

cd /etc/apache2/conf-enabled
nano openbravo-jk-mount.conf

jkMount /openbravo* ajp13_worker
jkMount /* ajp13_worker
JkMountCopy all

And enable the configuration

sudo a2enconf openbravo-jk-mount.conf

Avoid using port in the url

In the OpenbravoERPTest.properties of the Store1 and Store2, do not set the port in the url

openbravo.url=http://store1.openbravo.com/

Troubleshooting

Rules to follow

POS showing the "transition to offline" pop up

set the correct server addresses, see rules to follow above

The server cannot synchronize. ERRORs in the console

uninstall symetricds from all servers and install it only in the central server

  1. stop tomcat in all servers
  2. ant uninstall.symmetric.ds in all servers
  3. ant install.symmetric.ds only in the central
  4. start tomcat in central
  5. wait until the server is up and running
  6. start tomcat in the stores

ERROR org.jumpmind.symmetric.service.impl.AcknowledgeService - Could not find batch Store2-xxx to acknowledge as OK

SELECT * FROM sym_outgoing_batch where batch_id IN (xxx)
DELETE FROM sym_outgoing_batch WHERE batch_id IN (xxx)
DELETE FROM sym_data_event WHERE batch_id IN (xxx)

WARN org.jumpmind.symmetric.service.impl.PushService - Registration was not open at MainServer:Central:Central

  1. uninstall symetricds from all servers
  2. install in the central
  3. start central
  4. start store

permsize error

add to the tomcat server properties

-XX:MaxPermSize=512m

symetricds cannot synchronize a record

if symetricds cannot synchronize a record, set the record as IG (ignore)

UPDATE sym_outgoing_batch SET status = 'IG' WHERE status = 'ER'

Retrieved from "http://wiki.openbravo.com/wiki/Retail:Developers_Guide/How-to/How_to_Setup_MultiServer_Dev_Environment_For_Automation"

This page has been accessed 326 times. This page was last modified on 11 November 2016, at 10:08. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.