Assemblyline Service Server

raw JSON →
4.7.2.4 verified Mon Apr 27 auth: no python

The service server component for Assemblyline 4, a digital forensics and malware analysis platform. Version 4.7.2.4 provides the runtime environment for services, handling task dispatching, result submission, and communication with the core platform. It is actively maintained with regular releases.

pip install assemblyline-service-server
error ModuleNotFoundError: No module named 'assemblyline_service_server'
cause Package not installed or pip installed old version with different name.
fix
Run 'pip install assemblyline-service-server' and ensure you are importing 'assemblyline_service_server' (with underscores).
error AttributeError: module 'assemblyline_service_server' has no attribute 'ServiceServer'
cause Importing from the top-level package incorrectly; ServiceServer is a class inside the package.
fix
Use 'from assemblyline_service_server import ServiceServer' (not 'import assemblyline_service_server').
error ConnectionError: Error connecting to Redis server
cause Redis is not running or not reachable at the configured host/port.
fix
Start Redis or update configuration with correct REDIS_HOST and REDIS_PORT environment variables.
breaking In version 4.0.0, the import path changed from assemblyline.service_server to assemblyline_service_server. Old imports will fail.
fix Use 'from assemblyline_service_server import ServiceServer'
gotcha The service server requires a running Redis instance. It will silently hang if Redis is unreachable.
fix Ensure Redis is configured and accessible. Set REDIS_HOST environment variable or config['core']['redis']['host'].
gotcha Use os.environ.get() for configuration values that may be set by environment variables; the server falls back to default values which may not work in production.
fix Always provide explicit configuration for production environments.

Initialize and run a simple service server, processing a single task.

from assemblyline_service_server import ServiceServer
from assemblyline.odm.models.service import Service
from assemblyline.odm.models.submission import Submission

config = {
    'logging': {'log_level': 'INFO'},
    'core': {'redis': {'host': os.environ.get('REDIS_HOST', 'localhost'), 'port': 6379}},
    'service': {'name': 'MyService', 'tool_version': '1.0'}
}
server = ServiceServer(config)
server.start()
# Serve one task
task = server.get_task()
# ... process task ...
server.submit_result(task, {'success': True})