Common issues and their solutions when working with Moose.
moose dev fails to startPossible causes and solutions:
Port conflicts
# Find processes using ports
lsof -i :4000-4002
# Kill process by PID
kill <PID>Configuration Override: You can also change the ports Moose uses via environment variables:
export MOOSE_HTTP_PORT=4040
export MOOSE_MANAGEMENT_PORT=5010
moose devMissing dependencies
pip install .Docker not running
# Check Docker status
docker info
# Start Docker on Linux
sudo systemctl start dockerContainer Startup Failures
# View logs
moose logsValidation errors
moose logsStream processing errors
moose logs --filter functionsDatabase connectivity
.moose/config.toml[clickhouse_config]db_name = "local"user = "panda"password = "pandapass"use_ssl = falsehost = "localhost"host_port = 18123native_port = 9000Insufficient parallelism
from moose_lib import Stream, StreamConfig stream = Stream[Data]("high_volume", StreamConfig(parallelism=8))Transform function errors
# Add logging to transformdef transform(record: Data) -> Data: print(f"Processing record: {record.id}") try: # Your transformation logic return transformed_record except Exception as e: print(f"Transform error: {e}") return None # Skip record on errorMissing or improper indexes
from moose_lib import OlapTable, OlapConfig table = OlapTable[Data]("slow_table", OlapConfig( order_by_fields=["frequently_queried_field", "timestamp"]))Large result sets
# In query APIresults = client.query.execute( # not an f-string, the values are provided in the dict """ SELECT * FROM large_table WHERE category = {category} LIMIT {limit} """, {"category": "example", "limit": 100})Configuration errors
# Validate configuration
moose validate --configResource limitations
# In kubernetes manifestresources: requests: memory: "1Gi" cpu: "500m" limits: memory: "2Gi" cpu: "1000m"Permission issues
# Check permissions
moose auth checkCause: A previous migration was interrupted without releasing its lock.
Solution:
Wait 5 minutes - locks expire automatically
Or manually clear the lock:
DELETE FROM _MOOSE_STATE WHERE key = 'migration_lock';Verify it worked:
SELECT * FROM _MOOSE_STATE WHERE key = 'migration_lock';-- Should return no rowsThe _MOOSE_STATE table uses ClickHouse's KeeperMap engine for distributed locking, ensuring only one migration runs at a time across multiple deployments.
If you can't resolve an issue:
moose --version)