Closed andre-senna closed 1 month ago
btw I saw the same behavior reported by Saulo when trying to setup a local environment in my ubuntu workstation
@andre-senna, could you please provide the metta file and the hyperon-das version that was used when this error occurred so I can try to reproduce the error?
@levisingularity
I can't reproduce it anymore. I believe it's because I updated openfaas and das-cli to latest versions.
@sauloapp
Can you please share the version of das-cli and openfaas function you are having this error?
@andre-senna
das-cli: 0.2.21 faas: query-engine 1.12.11
Name: hyperon-das Version: 0.8.1
Hi @sauloapp, I’m encountering an error related to a version mismatch for hyperon-das. The error message is:
raise RetryConnectionError(
hyperon_das.exceptions.RetryConnectionError: ('An error occurred while connecting to the server', "Local DAS version 'das: 0.8.0 and atom_db: 0.7.0', DAS server is expecting 'das: 0.7.13 and atom_db: 0.6.12'")
I’m currently using the following versions, same as yours:
das-cli 0.2.21
query-engine 1.12.11
hyperon-das
INSTALLED: 0.8.1
LATEST: 0.8.1
hyperon-das-atomdb
INSTALLED: 0.7.1
LATEST: 0.7.1
Is the issue exception still happening for you?
@levisingularity Currently there are some colleagues working with a robot vision system on the Bizon machine and they are changing some settings, I think... Look at this:
saulo@dl:/mnt/hdd_2/saulo/snet/rejuve.bio/das/shared_rep/data$ das-cli --version das-cli 0.3.0
saulo@dl:/mnt/hdd_2/saulo/snet/rejuve.bio/das/shared_rep/data$ das-cli faas version [DockerImageNotFoundError] The image trueagi/openfaas:query-engine-latest for the function could not be located in the Docker Hub repository. Please verify the existence of the version or ensure the correct function name is used.
Besides. mongodb is not starting:
saulo@dl:/mnt/hdd_2/saulo/snet/rejuve.bio/das/shared_rep/data$ das-cli db start Starting Redis service... Redis has started successfully on port 20123 at localhost, operating under the server user saulo. Starting MongoDB service...
hyperon-das is the same version as yours.
@sauloapp, could you try running das-cli config set
and then testing it again? It might be using a setting from an older version of das-cli
.
@levisingularity , I did it and it did not work... das-cli config set das-cli db start das-cli metta load /mnt/hdd_2/saulo/snet/rejuve.bio/das/shared_rep/data/test.metta das-cli faas start
saulo@dl:/mnt/hdd_2/saulo/snet/rejuve.bio/das/shared_rep/data$ python3 bio2.py {'das': {'name': 'hyperon-das', 'version': '0.8.0', 'summary': 'Query Engine API for Distributed AtomSpace'}, 'atom_db': {'name': 'hyperon-das-atomdb', 'version': '0.7.0', 'summary': 'Persistence layer for Distributed AtomSpace'}} Traceback (most recent call last): File "/home/saulo/.local/lib/python3.10/site-packages/hyperon_das/decorators.py", line 21, in wrapper status, response = function(*args, **kwargs) File "/home/saulo/.local/lib/python3.10/site-packages/hyperon_das/utils.py", line 172, in connect_to_server raise Exception(message) Exception: Error unpickling objects in peer's response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/mnt/hdd_2/saulo/snet/rejuve.bio/das/shared_rep/data/bio2.py", line 9, in
bio2.py: from hyperon_das import DistributedAtomSpace
print(DistributedAtomSpace().about())
host = '127.0.0.1' port = '8080' das = DistributedAtomSpace(query_engine='remote', host=host, port=port)
print(f"Connected to DAS at {host}:{port}") print("(nodes, links) =", das.count_atoms())
test.metta: (allele FBal0351315) (allele_symbol (allele FBal0351315) ash1[DeltaSET.Ubi-p63E]) (gene_id (allele FBal0351315) FBgn0005386) (taxon_id (allele FBal0351315) 7227) (allele FBal0351468) (allele_symbol (allele FBal0351468) Top3beta[TKO.GS04238]) (gene_id (allele FBal0351468) FBgn0026015) (taxon_id (allele FBal0351468) 7227) (allele FBal0351534) (allele_symbol (allele FBal0351534) Mef2[UAS.cUa]) (gene_id (allele FBal0351534) FBgn0011656) (taxon_id (allele FBal0351534) 7227) (allele FBal0351671) (allele_symbol (allele FBal0351671) piwi[SL(HsAGO2).UASp.Tag:FLAG,Tag:HA]) (gene_id (allele FBal0351671) FBgn0004872) (taxon_id (allele FBal0351671) 7227)
@sauloapp even though I'm using the same setup I could not be able to reproduce this issue, can you run das-cli logs faas
to see what it shows when this exception is thrown?
It seems that 8080 is being used.... the whole log:
2024/08/05 20:13:15 Version: 0.9.10 SHA: eefeb9dd8c979398a46fc0decc3297591362bfab
2024/08/05 20:13:15 Forking: python, arguments: [index.py]
2024/08/05 20:13:15 Started logging: stderr from function.
2024/08/05 20:13:15 Started logging: stdout from function.
2024/08/05 20:13:15 Watchdog mode: http fprocess: "python index.py"
2024/08/05 20:13:15 Timeouts: read: 30m0s write: 30m0s hard: 30m0s health: 30m0s
2024/08/05 20:13:15 Listening on port: 8080
2024/08/05 20:13:15 Writing lock-file to: /tmp/.lock
2024/08/05 20:13:15 Metrics listening on port: 8081
2024/08/05 20:13:15 stderr: Traceback (most recent call last):
2024/08/05 20:13:15 stderr: File "/home/app/index.py", line 109, in
Is it possible to customize faas port, @levisingularity ?
@sauloapp Unfortunately not yet, but It is something to be done. If there is another user running a different version of faas on the same machine, this might be the reason for this issue.
@levisingularity look t this, please: I started openfaas and it exited before any connection:
nice_moore saulo@dl:/mnt/hdd_2/saulo/snet/rejuve.bio/das/shared_rep/data$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3e0d7a9a1ef1 trueagi/openfaas:query-engine-latest "fwatchdog" 27 seconds ago Exited (1) 19 seconds ago das-cli-openfaas-8080
@sauloapp I suppose It might be closing because it cannot be connected to the port
Can you run docker logs das-cli-openfaas-8080
?
@levisingularity it seems to be equal:
faas-8080
2024/08/06 18:21:44 Version: 0.9.10 SHA: eefeb9dd8c979398a46fc0decc3297591362bfab
2024/08/06 18:21:44 Forking: python, arguments: [index.py]
2024/08/06 18:21:44 Started logging: stderr from function.
2024/08/06 18:21:44 Started logging: stdout from function.
2024/08/06 18:21:44 Watchdog mode: http fprocess: "python index.py"
2024/08/06 18:21:44 Timeouts: read: 30m0s write: 30m0s hard: 30m0s health: 30m0s
2024/08/06 18:21:44 Listening on port: 8080
2024/08/06 18:21:44 Writing lock-file to: /tmp/.lock
2024/08/06 18:21:44 Metrics listening on port: 8081
2024/08/06 18:21:44 stderr: Traceback (most recent call last):
2024/08/06 18:21:44 stderr: File "/home/app/index.py", line 109, in
@sauloapp Can you close the port 8080 to be available for connection?
I've loaded a MeTTa file into a local DAS, but my Python script is not able to connect to the DAS server. Steps I did:
The script is only:
from hyperon_das import DistributedAtomSpace
host = '127.0.0.1' port = '8080' das = DistributedAtomSpace(query_engine='remote', host=host, port=port)
And the error message is:
Traceback (most recent call last): File "/home/saulo/.local/lib/python3.10/site-packages/hyperon_das/decorators.py", line 21, in wrapper status, response = function(args, *kwargs) File "/home/saulo/.local/lib/python3.10/site-packages/hyperon_das/utils.py", line 172, in connect_to_server raise Exception(message) Exception: Error unpickling objects in peer's response
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/mnt/hdd_2/saulo/snet/rejuve.bio/das/shared_rep/data/bio2.py", line 9, in
das = DistributedAtomSpace(query_engine='remote', host=host, port=port)
File "/home/saulo/.local/lib/python3.10/site-packages/hyperon_das/das.py", line 75, in init
self.set_query_engine(**kwargs)
File "/home/saulo/.local/lib/python3.10/site-packages/hyperon_das/das.py", line 109, in set_query_engine
self.query_engine = RemoteQueryEngine(self.backend, self.system_parameters, kwargs)
File "/home/saulo/.local/lib/python3.10/site-packages/hyperon_das/query_engines/remote_query_engine.py", line 29, in __init
self.remote_das = FunctionsClient(self.host, self.port)
File "/home/saulo/.local/lib/python3.10/site-packages/hyperon_das/client.py", line 24, in init
self.url = connect_to_server(host, port)
File "/home/saulo/.local/lib/python3.10/site-packages/hyperon_das/decorators.py", line 29, in wrapper
raise RetryConnectionError(
hyperon_das.exceptions.RetryConnectionError: ('An error occurs while connecting to the server', "Error unpickling objects in peer's response")