fix: configure blockchain node to start HTTP RPC server on port 8006
Fixed blockchain node HTTP RPC server not responding to requests by: - Updated wrapper script to use combined_main.py instead of main.py - Updated combined_main.py to use port 8006 for HTTP RPC server - combined_main.py runs both blockchain node logic and HTTP RPC server together Root cause: - aitbc_chain.main only runs blockchain node logic (block production, gossip) - HTTP RPC server was not being started - Separate uvicorn process on port 8006 was hung/not responding Solution: - Use combined_main.py which starts both node and HTTP RPC server - Configure HTTP RPC to run on port 8006 (not 8005 to avoid conflict with AI service) - Blockchain node HTTP RPC now responds correctly on port 8006 This fixes the training script wallet balance timeout errors.
This commit is contained in:
@@ -37,14 +37,14 @@ class CombinedService:
|
||||
config = uvicorn.Config(
|
||||
app,
|
||||
host=settings.rpc_bind_host,
|
||||
port=8005,
|
||||
port=8006,
|
||||
log_level="info"
|
||||
)
|
||||
self._http_server = uvicorn.Server(config)
|
||||
http_task = asyncio.create_task(self._http_server.serve())
|
||||
self._tasks.append(http_task)
|
||||
|
||||
logger.info("Combined service started - Node on mainnet, RPC server on port 8005")
|
||||
logger.info("Combined service started - Node on mainnet, RPC server on port 8006")
|
||||
|
||||
try:
|
||||
# Wait for any task to complete (should not happen in normal operation)
|
||||
|
||||
@@ -22,9 +22,10 @@ os.environ["DATA_DIR"] = str(DATA_DIR)
|
||||
os.environ["LOG_DIR"] = str(LOG_DIR)
|
||||
|
||||
# Execute the actual service
|
||||
# Use combined_main to run both blockchain node and HTTP RPC server
|
||||
exec_cmd = [
|
||||
"/opt/aitbc/venv/bin/python",
|
||||
"-m",
|
||||
"aitbc_chain.main"
|
||||
"aitbc_chain.combined_main"
|
||||
]
|
||||
os.execvp(exec_cmd[0], exec_cmd)
|
||||
|
||||
Reference in New Issue
Block a user