I’m getting an error when running a pattern-matching query. Both the attention-broker and query-agent containers are running fine, and the port ranges I’m using are taken directly from the query-agent logs. Any idea what could be causing this?
Hey @yohanes, looks like something is wrong while initializing the Query Agent there.
Could you please post the output of the following commands:
das-cli --version
docker ps -a
docker logs das-cli-query-agent-40002
sure.
(base) john@john:~/das/das$ das-cli --version
das-cli 1.0.2
(base) john@john:~/das/das$
(base) john@john:~/das/das$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
441a656d4289 trueagi/das:1.0.1-rc "busnode --service=q…" 6 seconds ago Up 5 seconds das-cli-query-agent-40002
625fa102377d trueagi/das:1.0.1-rc "attention_broker_se…" 15 seconds ago Up 14 seconds das-cli-attention-broker-40001
04ece1746ee6 trueagi/das:mork-server-1.0.0 "/mork_server" 46 hours ago Up 4 minutes das-cli-morkdb-40022
34ffbaafb146 mongodb/mongodb-community-server:8.2-ubuntu2204 "python3 /usr/local/…" 46 hours ago Up 4 minutes (healthy) das-cli-mongodb-27017
0205bd0bc385 redis:7.2.3-alpine "docker-entrypoint.s…" 46 hours ago Up 39 seconds das-cli-redis-6379
(base) john@john:~/das/das$ docker logs das-cli-query-agent-40002
2025-12-12 14:50:18 | [INFO] | Starting service: query-engine
2025-12-12 14:50:18 | [INFO] | Using default MongoDB chunk size: 1000
2025-12-12 14:50:18 | [INFO] | Connected to MongoDB at 0.0.0.0:27017
2025-12-12 14:50:18 | [INFO] | Connected to MORK at 0.0.0.0:40022
2025-12-12 14:50:18 | [INFO] | BUS static initialization
2025-12-12 14:50:18 | [INFO] | BUS command: <atomdb>
2025-12-12 14:50:18 | [INFO] | BUS command: <context>
2025-12-12 14:50:18 | [INFO] | BUS command: <inference>
2025-12-12 14:50:18 | [INFO] | BUS command: <link_creation>
2025-12-12 14:50:18 | [INFO] | BUS command: <pattern_matching_query>
2025-12-12 14:50:18 | [INFO] | BUS command: <query_evolution>
2025-12-12 14:50:18 | [INFO] | Port range: [42000 : 42999]
2025-12-12 14:50:18 | [ERROR] | service_bus/PortPool.cc | initialize_statics : 25 | Discarding unavailable PORT 42158
2025-12-12 14:50:18 | [ERROR] | service_bus/PortPool.cc | initialize_statics : 25 | Discarding unavailable PORT 42248
2025-12-12 14:50:18 | [ERROR] | service_bus/PortPool.cc | initialize_statics : 25 | Discarding unavailable PORT 42481
2025-12-12 14:50:18 | [INFO] | New BUS on: 0.0.0.0:40002
2025-12-12 14:50:18 | [INFO] | SynchronousGRPC listening on 0.0.0.0:40002
2025-12-12 14:50:19 | [INFO] | Calling AttentionBroker GRPC. Ping
2025-12-12 14:50:19 | [INFO] | Connected to AttentionBroker at 0.0.0.0:40001
2025-12-12 14:50:19 | [INFO] | Registering processor for service: query-engine
2025-12-12 14:50:19 | [INFO] | Processor registered for service: query-engine
2025-12-12 14:50:19 | [INFO] | BUS node 0.0.0.0:40002 is taking ownership of command pattern_matching_query
Looks like your Query Agent is not starting up properly, it is missing this last message:
2025-12-13 11:22:29 | [INFO] | BUS node 0.0.0.0:40002 is taking ownership of command pattern_matching_query
2025-12-13 11:22:29 | [INFO] | ############################# REQUEST QUEUE EMPTY ##################################
I’m checking `das-cli v1.0.2` to understand what’s going on here…
@yohanes are you running DAS on a MacOS? If so try using host.docker.internal as your client/notebook host instead of localhost, like:
run('!(bind! &das (new-das! (host.docker.internal:47000-47999) (localhost:40002)))')
I’m running this on Ubuntu Linux, not macOS. I’ve also tested it on another Ubuntu server and see the same behavior.
Ok, let’s try rollback das-cli to version 1.0.0 by:
sudo apt -y install das-toolbox=1.0.0
Thanks Artur. Downgrading resolved the issue. The query-agent logs now look like this:
(base) john@john:~$ das-cli logs query-agent
2025-12-15 11:11:09 | [INFO] | Using default MongoDB chunk size: 1000
2025-12-15 11:11:09 | [INFO] | Connected to MongoDB at 0.0.0.0:27017
2025-12-15 11:11:09 | [INFO] | Connected to (NON-CLUSTER) Redis at 0.0.0.0:6379
2025-12-15 11:11:09 | [INFO] | Starting query engine server with id: 0.0.0.0:40002
2025-12-15 11:11:09 | [INFO] | BUS static initialization
2025-12-15 11:11:09 | [INFO] | BUS command: <atomdb>
2025-12-15 11:11:09 | [INFO] | BUS command: <context>
2025-12-15 11:11:09 | [INFO] | BUS command: <inference>
2025-12-15 11:11:09 | [INFO] | BUS command: <link_creation>
2025-12-15 11:11:09 | [INFO] | BUS command: <pattern_matching_query>
2025-12-15 11:11:09 | [INFO] | BUS command: <query_evolution>
2025-12-15 11:11:09 | [INFO] | Port range: [42000 : 42999]
2025-12-15 11:11:09 | [ERROR] | service_bus/PortPool.cc | initialize_statics : 25 | Discarding unavailable PORT 42538
2025-12-15 11:11:09 | [ERROR] | service_bus/PortPool.cc | initialize_statics : 25 | Discarding unavailable PORT 42548
2025-12-15 11:11:09 | [ERROR] | service_bus/PortPool.cc | initialize_statics : 25 | Discarding unavailable PORT 42562
2025-12-15 11:11:09 | [ERROR] | service_bus/PortPool.cc | initialize_statics : 25 | Discarding unavailable PORT 42568
2025-12-15 11:11:09 | [ERROR] | service_bus/PortPool.cc | initialize_statics : 25 | Discarding unavailable PORT 42572
2025-12-15 11:11:09 | [INFO] | New BUS on: 0.0.0.0:40002
2025-12-15 11:11:09 | [INFO] | SynchronousGRPC listening on 0.0.0.0:40002
2025-12-15 11:11:10 | [INFO] | Calling AttentionBroker GRPC. Ping
2025-12-15 11:11:10 | [INFO] | Connected to AttentionBroker at 0.0.0.0:40001
2025-12-15 11:11:10 | [INFO] | BUS node 0.0.0.0:40002 is taking ownership of command pattern_matching_query
2025-12-15 11:11:10 | [INFO] | ############################# REQUEST QUEUE EMPTY ##################################
Cool!
Are you able to run those notebook’s cells now?
Yes, I am able to run them. So far, I have tested the query-agent, link-creating agent, context-agent, and evolution agent, and all of them are working correctly. The outputs in the notebooks are as expected.
