import requests import sys import time def check_server(): url = "http://localhost:3015/health" try: response = requests.get(url, timeout=10) print(f"Server is running. Status: {response.status_code}") print(f"Response: {response.text}") return True except requests.exceptions.ConnectionError: print("Server is not running or not accessible on port 3015") return False except Exception as e: print(f"Error checking server: {e}") return False if __name__ == "__main__": print("Checking LightRAG server status...") if check_server(): sys.exit(0) else: sys.exit(1)