{"id":20952,"library":"assemblyline-service-server","title":"Assemblyline Service Server","description":"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.","status":"active","version":"4.7.2.4","language":"python","source_language":"en","source_url":"https://github.com/CybercentreCanada/assemblyline-service-server/","tags":["assemblyline","forensics","malware","service-server"],"install":[{"cmd":"pip install assemblyline-service-server","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Core library for data models and communication","package":"assemblyline","optional":false},{"reason":"Message queue and caching backend","package":"redis","optional":false}],"imports":[{"note":"Wrong package hierarchy; correct module is assemblyline_service_server","wrong":"from assemblyline.service_server import ServiceServer","symbol":"ServiceServer","correct":"from assemblyline_service_server import ServiceServer"},{"note":"ServiceRequest is defined in the server package, not core ODM","wrong":"from assemblyline.odm.messages import ServiceRequest","symbol":"ServiceRequest","correct":"from assemblyline_service_server.request import ServiceRequest"}],"quickstart":{"code":"from assemblyline_service_server import ServiceServer\nfrom assemblyline.odm.models.service import Service\nfrom assemblyline.odm.models.submission import Submission\n\nconfig = {\n    'logging': {'log_level': 'INFO'},\n    'core': {'redis': {'host': os.environ.get('REDIS_HOST', 'localhost'), 'port': 6379}},\n    'service': {'name': 'MyService', 'tool_version': '1.0'}\n}\nserver = ServiceServer(config)\nserver.start()\n# Serve one task\ntask = server.get_task()\n# ... process task ...\nserver.submit_result(task, {'success': True})","lang":"python","description":"Initialize and run a simple service server, processing a single task."},"warnings":[{"fix":"Use 'from assemblyline_service_server import ServiceServer'","message":"In version 4.0.0, the import path changed from assemblyline.service_server to assemblyline_service_server. Old imports will fail.","severity":"breaking","affected_versions":"<4.0.0"},{"fix":"Ensure Redis is configured and accessible. Set REDIS_HOST environment variable or config['core']['redis']['host'].","message":"The service server requires a running Redis instance. It will silently hang if Redis is unreachable.","severity":"gotcha","affected_versions":"all"},{"fix":"Always provide explicit configuration for production environments.","message":"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.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install assemblyline-service-server' and ensure you are importing 'assemblyline_service_server' (with underscores).","cause":"Package not installed or pip installed old version with different name.","error":"ModuleNotFoundError: No module named 'assemblyline_service_server'"},{"fix":"Use 'from assemblyline_service_server import ServiceServer' (not 'import assemblyline_service_server').","cause":"Importing from the top-level package incorrectly; ServiceServer is a class inside the package.","error":"AttributeError: module 'assemblyline_service_server' has no attribute 'ServiceServer'"},{"fix":"Start Redis or update configuration with correct REDIS_HOST and REDIS_PORT environment variables.","cause":"Redis is not running or not reachable at the configured host/port.","error":"ConnectionError: Error connecting to Redis server"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}