ProtocolError for 302 Found

Asked by Holger Adelman

I have never gotten magentoerpconnect to work, I simply cannot get past the ”Synchronize Referential Settings”. I always get:
ProtocolError: <ProtocolError for 302 Found>

I have tried both OpenERP 5 and 6, Magento 1.5 and 1.6, Ubuntu LAMP and XAMPP 1.7.7, and Ubuntu 8.04LTS and 10.04LTS.
Nothing works! Now I'm gonna show all the steps I take during a fresh setup and hopefully someone can give me some helpful input :)

This is how I setup an Ubuntu 10.04LTS, OpenERP 6, XAMPP 1.7.7 and Magento 1.5 box ending with error.

# Ubuntu 10.04LTS i386 installation
Name server:

Hostname: store
Domain name:

Username: openerp
Password: openerp

Software selection: OpenSSH server and PostgreSQL database

# XAMPP 1.7.7 installation
I download xampp-linux-1.7.7.tar.gz
sudo tar xvfz xampp-linux-1.7.7.tar.gz -C /opt
sudo /opt/lampp/lampp start

# Magento installation
I download magento-
sudo tar xvfz magento- -C /opt/lampp/htdocs/
sudo chown -R nobody:root /opt/lampp/htdocs/magento

I go to and create a database called: magento

Now to and go through the Installation Wizard.

I just leave the Locale settings as default for now:
Locale: English
Time Zone: Pacific Standard Time
Default Currency: US Dollar

Database Connection
Host: localhost
Database Name: magento
User Name: root
User Password: (blank)
Tables Prefix: (blank)

Web access options
Base URL:
Admin Path: admin
Enable Charts: checked
Skip Base URL Validation Before the Next Step: (blank)
Use Web Server (Apache) Rewrites: (blank)
Use Secure URLs (SSL): (blank)

Session Storage Options
Save Session Data In: File System

Login Information
Username: admin
Password: admin67

# Magento setup
Now to
And in “Magento Connect Manager” I change “Preferred State” to Beta
and now install extension
It looks successful: Package community/Openlabs_OpenERPConnector 1.3.1 installed successfully

Now I add a new Web Service Role: admin
and set Resource Access to: All

And now add new Web Service User with User Name: openerp
and API Key: openerp
and select admin as User Role

Now to Index Management and Select All then Reindex Data.
Now to Cache Storage Management and Select All then Refresh.

# PostgreSQL preparation
sudo su postgres

postgres@store:/$ createuser openerp
Shall the new role be a superuser? (y/n) y

postgres@store:/$ psql template1

template1=# alter role openerp with password 'postgres';

# OpenERP 6.0.3 installation
sudo apt-get update

sudo apt-get install python-lxml python-mako python-dateutil python-psycopg2 python-pychart python-pydot python-tz python-reportlab python-yaml python-vobject python-setuptools

tar -xzf openerp-server-6.0.3.tar.gz
cd openerp-server-6.0.3
sudo python install

cd /usr/local/lib/python2.6/dist-packages/openerp-server/addons/

sudo wget
sudo wget
sudo wget
sudo wget
sudo wget
sudo wget

Now start the server: openerp-server

# OpenERP 6.0.3 setup
From a GTK client I create a new database
New Database Name: demo1
Load Demonstration Data: checked
Default Language: English (US)
Administrator Password: admin

I leave the default Company Information (OpenERP S.A.)

I select Warehouse Management and Sales Management.

Go with the default Belgium Chart of Accounts and the default on all other windows.

When done I go to Modules and select magentoerpconnect for installation.

Now to Magento Instances and create new with following data
Name: My local magento
Referential Type: Magento Version
User Name: openerp
Password: openerp
Default Product Category: All products / Sellable
Default Language: English

Then I push “1 – Reload Referential Mapping Templates”
and now “2 – Synchronize Referential Settings”

This is where it fails with:

Environment Information :
System : Windows-XP-5.1.2600-SP3
OS Name : nt
Operating System Release : XP
Operating System Version : 5.1.2600
Operating System Architecture : 32bit
Operating System Locale : sv_SE.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 6.0.3
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/service/", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/", line 64, in core_sync
    core_imp_conn = self.external_connection(cr, uid, inst, DEBUG)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/", line 85, in external_connection
    return attr_conn.connect() and attr_conn or False
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/", line 33, in connect
    self.session = self.ser.login(self.username, self.password)
  File "/usr/lib/python2.6/", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.6/", line 1489, in __request
  File "/usr/lib/python2.6/", line 1243, in request
ProtocolError: <ProtocolError for 302 Found>

Question information

English Edit question
Magento OpenERP Connector Edit question
No assignee Edit question
Solved by:
Holger Adelman
Last query:
Last reply:
Revision history for this message
Holger Adelman (crazyzed) said :

I finally got it working :)
Turns out I need to use the url and NOT ,in the Magento module, even though Magento is run on the same server as OpenERP.
This might be common knowledge but I didn't know this!