Can not use web_shop_vue_storefront module

Hi,

I’m trying web_shop_vue_storefront 6.6.0 module, but I can not connect to elasticsearch running on another machine. I tried the connection of elasticsearch with other machines and works fine, even try a script in the same machine trytond is installed to see coneection with elasticsearch and works fine too. But not with the module mentioned.

I also reviewed ufw but without success.

ERROR trytond.protocols.dispatcher ir.cron.run_once([10], {'client': 'c903ea0d', 'warehouse': 5, 'wareh [truncated]...) from admin@192.168.88.1/capydb/ in 105 ms
 Traceback (most recent call last):
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
     conn = connection.create_connection(
   File "/opt/capy/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection
     raise err
   File "/opt/capy/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection
     sock.connect(sa)
 ConnectionRefusedError: [Errno 111] Connection refused
 During handling of the above exception, another exception occurred:
 Traceback (most recent call last):
   File "/opt/capy/lib/python3.9/site-packages/elasticsearch/connection/http_urllib3.py", line 245, in perform_request
     response = self.pool.urlopen(
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connectionpool.py", line 787, in urlopen
     retries = retries.increment(
   File "/opt/capy/lib/python3.9/site-packages/urllib3/util/retry.py", line 525, in increment
     raise six.reraise(type(error), error, _stacktrace)
   File "/opt/capy/lib/python3.9/site-packages/urllib3/packages/six.py", line 770, in reraise
     raise value
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
     httplib_response = self._make_request(
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connectionpool.py", line 398, in _make_request
     conn.request(method, url, **httplib_request_kw)
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
     super(HTTPConnection, self).request(method, url, body=body, headers=headers)
   File "/usr/lib/python3.9/http/client.py", line 1255, in request
     self._send_request(method, url, body, headers, encode_chunked)
   File "/usr/lib/python3.9/http/client.py", line 1301, in _send_request
     self.endheaders(body, encode_chunked=encode_chunked)
   File "/usr/lib/python3.9/http/client.py", line 1250, in endheaders
     self._send_output(message_body, encode_chunked=encode_chunked)
   File "/usr/lib/python3.9/http/client.py", line 1010, in _send_output
     self.send(msg)
   File "/usr/lib/python3.9/http/client.py", line 950, in send
     self.connect()
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
     conn = self._new_conn()
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
     raise NewConnectionError(
 urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f3fea4140d0>: Failed to establish a new connection: [Errno 111] Connection refused
 During handling of the above exception, another exception occurred:
 Traceback (most recent call last):
   File "/opt/capy/lib/python3.9/site-packages/trytond/protocols/dispatcher.py", line 207, in _dispatch
     result = rpc.result(meth(*c_args, **c_kwargs))
   File "/opt/capy/lib/python3.9/site-packages/trytond/model/descriptors.py", line 33, in newfunc
     return self.func(owner, *args, **kwargs)
   File "/opt/capy/lib/python3.9/site-packages/trytond/model/modelview.py", line 697, in wrapper
     return func(cls, records, *args, **kwargs)
   File "/opt/capy/lib/python3.9/site-packages/trytond/modules/company/ir.py", line 109, in run_once
     super(Cron, cls).run_once([cron])
   File "/opt/capy/lib/python3.9/site-packages/trytond/model/descriptors.py", line 33, in newfunc
     return self.func(owner, *args, **kwargs)
   File "/opt/capy/lib/python3.9/site-packages/trytond/model/modelview.py", line 697, in wrapper
     return func(cls, records, *args, **kwargs)
   File "/opt/capy/lib/python3.9/site-packages/trytond/ir/cron.py", line 152, in run_once
     getattr(Model, method)()
   File "/opt/capy/lib/python3.9/site-packages/trytond/modules/web_shop_vue_storefront_cms/web.py", line 90, in vsf_update
     super(Shop, cls).vsf_update(shops=shops)
   File "/opt/capy/lib/python3.9/site-packages/trytond/modules/web_shop_vue_storefront/web.py", line 190, in vsf_update
     es.index(
   File "/opt/capy/lib/python3.9/site-packages/elasticsearch/client/utils.py", line 152, in _wrapped
     return func(*args, params=params, headers=headers, **kwargs)
   File "/opt/capy/lib/python3.9/site-packages/elasticsearch/client/__init__.py", line 398, in index
     return self.transport.perform_request(
   File "/opt/capy/lib/python3.9/site-packages/elasticsearch/transport.py", line 390, in perform_request
     raise e
   File "/opt/capy/lib/python3.9/site-packages/elasticsearch/transport.py", line 358, in perform_request
     status, headers_response, data = connection.perform_request(
   File "/opt/capy/lib/python3.9/site-packages/elasticsearch/connection/http_urllib3.py", line 258, in perform_request
     raise ConnectionError("N/A", str(e), e)
 elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f3fea4140d0>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f3fea4140d0>: Failed to establish a new connection: [Errno 111] Connection refused)
 178935 139912747951936 [2023-01-23 20:47:59,285] ERROR trytond.protocols.wrappers <JSONRequest 1@192.168.88.1 'https://capy.effica.io/capydb/' [POST] model.ir.cron.run_once>
 Traceback (most recent call last):
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
     conn = connection.create_connection(
   File "/opt/capy/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection
     raise err
   File "/opt/capy/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection
     sock.connect(sa)
 ConnectionRefusedError: [Errno 111] Connection refused
 During handling of the above exception, another exception occurred:
 Traceback (most recent call last):
   File "/opt/capy/lib/python3.9/site-packages/elasticsearch/connection/http_urllib3.py", line 245, in perform_request
     response = self.pool.urlopen(
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connectionpool.py", line 787, in urlopen
     retries = retries.increment(
   File "/opt/capy/lib/python3.9/site-packages/urllib3/util/retry.py", line 525, in increment
     raise six.reraise(type(error), error, _stacktrace)
   File "/opt/capy/lib/python3.9/site-packages/urllib3/packages/six.py", line 770, in reraise
     raise value
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
     httplib_response = self._make_request(
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connectionpool.py", line 398, in _make_request
     conn.request(method, url, **httplib_request_kw)
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
     super(HTTPConnection, self).request(method, url, body=body, headers=headers)
   File "/usr/lib/python3.9/http/client.py", line 1255, in request
     self._send_request(method, url, body, headers, encode_chunked)
   File "/usr/lib/python3.9/http/client.py", line 1301, in _send_request
     self.endheaders(body, encode_chunked=encode_chunked)
   File "/usr/lib/python3.9/http/client.py", line 1250, in endheaders
     self._send_output(message_body, encode_chunked=encode_chunked)
   File "/usr/lib/python3.9/http/client.py", line 1010, in _send_output
     self.send(msg)
   File "/usr/lib/python3.9/http/client.py", line 950, in send
     self.connect()
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
     conn = self._new_conn()
   File "/opt/capy/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
     raise NewConnectionError(
 urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f3fea4140d0>: Failed to establish a new connection: [Errno 111] Connection refused
 During handling of the above exception, another exception occurred:
 Traceback (most recent call last):
   File "/opt/capy/lib/python3.9/site-packages/trytond/protocols/wrappers.py", line 162, in wrapper
     return func(request, pool, *args, **kwargs)
   File "/opt/capy/lib/python3.9/site-packages/trytond/protocols/dispatcher.py", line 207, in _dispatch
     result = rpc.result(meth(*c_args, **c_kwargs))
   File "/opt/capy/lib/python3.9/site-packages/trytond/model/descriptors.py", line 33, in newfunc
     return self.func(owner, *args, **kwargs)
   File "/opt/capy/lib/python3.9/site-packages/trytond/model/modelview.py", line 697, in wrapper
     return func(cls, records, *args, **kwargs)
   File "/opt/capy/lib/python3.9/site-packages/trytond/modules/company/ir.py", line 109, in run_once
     super(Cron, cls).run_once([cron])
   File "/opt/capy/lib/python3.9/site-packages/trytond/model/descriptors.py", line 33, in newfunc
     return self.func(owner, *args, **kwargs)
   File "/opt/capy/lib/python3.9/site-packages/trytond/model/modelview.py", line 697, in wrapper
     return func(cls, records, *args, **kwargs)
   File "/opt/capy/lib/python3.9/site-packages/trytond/ir/cron.py", line 152, in run_once
     getattr(Model, method)()
   File "/opt/capy/lib/python3.9/site-packages/trytond/modules/web_shop_vue_storefront_cms/web.py", line 90, in vsf_update
     super(Shop, cls).vsf_update(shops=shops)
   File "/opt/capy/lib/python3.9/site-packages/trytond/modules/web_shop_vue_storefront/web.py", line 190, in vsf_update
     es.index(
   File "/opt/capy/lib/python3.9/site-packages/elasticsearch/client/utils.py", line 152, in _wrapped
     return func(*args, params=params, headers=headers, **kwargs)
   File "/opt/capy/lib/python3.9/site-packages/elasticsearch/client/__init__.py", line 398, in index
     return self.transport.perform_request(
   File "/opt/capy/lib/python3.9/site-packages/elasticsearch/transport.py", line 390, in perform_request
     raise e
   File "/opt/capy/lib/python3.9/site-packages/elasticsearch/transport.py", line 358, in perform_request
     status, headers_response, data = connection.perform_request(
   File "/opt/capy/lib/python3.9/site-packages/elasticsearch/connection/http_urllib3.py", line 258, in perform_request
     raise ConnectionError("N/A", str(e), e)
 elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f3fea4140d0>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f3fea4140d0>: Failed to establish a new connection: [Errno 111] Connection refused)

Any help will be useful.

For me it is clear that the connection to elasticsearch can not be established so there is some issue on your settings or some firewall that is blocking the comunication.

Fixing that should solve the issue.

1 Like