Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProtocolError: <ProtocolError for mywebsite.fr/index.php/api/xmlrpc: 404 Not Found> #132

Closed
autoslide opened this issue Aug 18, 2015 · 15 comments

Comments

@autoslide
Copy link

Hello,
I do not understand for some days synchronization Odoo / magento no longer works I have an error message:

Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo/odoo/openerp/http.py", line 537, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/openerp/http.py", line 574, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/openerp/http.py", line 310, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/http.py", line 307, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/openerp/http.py", line 803, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/openerp/http.py", line 403, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 948, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/api.py", line 363, in old_api
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/.local/share/Odoo/addons/8.0/magentoerpconnect/magento_model.py", line 198, in synchronize_metadata
    import_batch(session, model, backend.id)
  File "/opt/odoo/.local/share/Odoo/addons/8.0/magentoerpconnect/unit/import_synchronizer.py", line 370, in import_batch
    importer.run(filters=filters)
  File "/opt/odoo/.local/share/Odoo/addons/8.0/magentoerpconnect/unit/import_synchronizer.py", line 239, in run
    record_ids = self.backend_adapter.search(filters)
  File "/opt/odoo/.local/share/Odoo/addons/8.0/magentoerpconnect/unit/backend_adapter.py", line 211, in search
    [filters] if filters else [{}])
  File "/opt/odoo/.local/share/Odoo/addons/8.0/magentoerpconnect/unit/backend_adapter.py", line 159, in _call
    full_url=custom_url) as api:
  File "/usr/local/lib/python2.7/dist-packages/magento/api.py", line 136, in __enter__
    self.username, self.password)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1321, in single_request
    response.msg,
ProtocolError: <ProtocolError for mywebsite.fr/index.php/api/xmlrpc: 404 Not Found>

If you can help me see more clearly I will be grateful.
Odoo 8 - Ubuntu 14.0.4

Regards

@guewen
Copy link
Member

guewen commented Aug 19, 2015

Please write your error in a code section like that:

```
traceback...
```

otherwise the traceback is truncated. I corrected your report.

The error is quite clear: ProtocolError for mywebsite.fr/index.php/api/xmlrpc: 404 Not Found.
Your Magento server answers a 404 error meaning that it couldn't find the URL. Double-check your URL and the configuration of your web server (.htaccess for example if it is Apache).

You can just try to access manually from a browser your url http://mywebsite.fr/index.php/api/xmlrpc and see what happens.

@guewen guewen closed this as completed Aug 19, 2015
@autoslide
Copy link
Author

Thank you for taking the time to answer me.
My url answers: http://autoslide.fr/index.php/api/xmlrpc i don't see error 404.
Regards

@guewen
Copy link
Member

guewen commented Aug 19, 2015

Does it happen for all the jobs?
If no, it could be transient errors on your Magento server.
If yes, it could be that your odoo server can't access to Magento due to a network error / misconfiguration.

@autoslide
Copy link
Author

All jobs are not working.
I turn around because everything is configured well.
I want you to know that there's worked there a week.
I did a test by disabling .htaccess but is the same.

@autoslide
Copy link
Author

ProtocolError: <ProtocolError for mywebsite.fr/index.php/api/xmlrpc: 404 Not Found>
or
ProtocolError: <ProtocolError for http://mywebsite.fr/index.php/api/xmlrpc: 404 Not Found>

the problem would be missing http: // in the request?

@guewen
Copy link
Member

guewen commented Aug 19, 2015

Did you replaced http://autoslide.fr/index.php/api/xmlrpc by http://mywebsite.fr/index.php/api/xmlrpc in your traceback or is it really the URL output by the traceback? Because http://mywebsite.fr/api/xmlrpc gives a 404

@autoslide
Copy link
Author

My url is : http://autoslide.fr/index.php/api/xmlrpc
Please forgive me of my short answers because I do not have a large enough mastery of language Sheakspear.

@guewen
Copy link
Member

guewen commented Aug 19, 2015

And in the configuration of the Magento Backend, the URL should be http://autoslide.fr, with the http://, do you have that?
Did you try a wget http://autoslide.fr/index.php/api/xmlrpc from your odoo server (not from your local machine) to see if you get a 404?

@autoslide
Copy link
Author

From my server with wget command

--2015-08-19 21:06:07--  http://autoslide.fr/index.php/api/xmlrpc
Résolution de autoslide.fr (autoslide.fr)... 127.0.0.1
Connexion vers autoslide.fr (autoslide.fr)|127.0.0.1|:80... connecté.
requête HTTP transmise, en attente de la réponse... 404 Not Found
2015-08-19 21:06:07 ERREUR 404: Not Found.

but if i check http://autoslide.fr from my server

--2015-08-19 21:07:39--  http://autoslide.fr/
Résolution de autoslide.fr (autoslide.fr)... 127.0.0.1
Connexion vers autoslide.fr (autoslide.fr)|127.0.0.1|:80... connecté.
requête HTTP transmise, en attente de la réponse... 200 OK
Taille : 739 [text/html]
Enregistre : «index.html.1»
100%[======================================================================================================================>] 739         --.-K/s   ds 0s
2015-08-19 21:07:39 (143 MB/s) - «index.html.1» enregistré [739/739

In my magento backend all is fine: secure and insecure url: http://

@guewen
Copy link
Member

guewen commented Aug 19, 2015

At least it shows that it is not an application error, rather a configuration one.
Do you have Magento and Odoo on the same server? I see that autoslide.fr is on 127.0.0.1 (could be a bad setup of /etc/hosts?)

@autoslide
Copy link
Author

Congratulations, you're right I added in my hosts file 127.0.0.1 there a week and by removing everything is back in order.
I am not abuse your kindness but I have wanted to know if by doing

git pull 

the connector can be updated.

Thank you infinitely guewen

@guewen
Copy link
Member

guewen commented Aug 19, 2015

Great!

Yes, but before any upgrade, always do a backup of your database. Then, do a git pull on every branch, stop your server and start it again with the option -u base in order to update the modules.

@autoslide
Copy link
Author

Thanks and see you next time.

Best regards
Josué Bendaoud

@l-arnold
Copy link

l-arnold commented Sep 7, 2015

Guewen,
You wrote

  • ... before any upgrade, always do a backup of your database. Then, do a git pull on every branch, stop your server and start it again with the option -u base in order to update the modules."

Does this also update the database in the case there has been any data structure changes in the new git pulls?

Thanks in advance.

@l-arnold
Copy link

l-arnold commented Sep 7, 2015

I will post this separately as an "issue/question" and try to reference this with the answer.

jcoux added a commit to camptocamp/connector-magento that referenced this issue May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants