Closed lospoelos closed 10 months ago
Dear team, I'm having issues getting the agent dispatcher connect to the server.
server: api_port: 443 host: _<removed>_ ssl: true ssl_cert: '' ssl_ignore: 'False' websocket_port: 443 tokens: agent: hwVSxCtTXdko3MTHjcDG2URoqQ8JDbGx2NerREYkTwVEpVnlIUSigta83l1ThyB1
faraday-dispatcher run --token <copied from server web gui>
2023-04-28 09:33:12,440 - faraday_agent_dispatcher - INFO {MainThread} [dispatcher.py:200 - register()] Registered successfully Traceback (most recent call last): File "/usr/local/bin/faraday-dispatcher", line 8, in <module> sys.exit(cli()) File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__ return self.main(*args, **kwargs) agent: agent_name: ichabod executors: nmap: max_size: 65536 params: HOST_TIMEOUT: base: integer mandatory: false type: integer OPTION_PN: base: boolean mandatory: false type: boolean OPTION_SC: base: boolean mandatory: false type: boolean OPTION_SV: base: boolean mandatory: false type: boolean PORT_LIST: base: string mandatory: false type: string SCRIPT_CMD: base: string mandatory: false type: string SCRIPT_TIMEOUT: base: integer mandatory: false type: integer TARGET: base: string mandatory: true File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/faraday_agent_dispatcher/cli/main.py", line 98, in run exit_code = asyncio.run(main(config_file, logger, token)) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete return future.result() File "/usr/local/lib/python3.10/dist-packages/faraday_agent_dispatcher/cli/main.py", line 75, in main await dispatcher.connect() File "/usr/local/lib/python3.10/dist-packages/faraday_agent_dispatcher/dispatcher.py", line 231, in connect async with websockets.connect( File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/client.py", line 642, in __aenter__ return await self File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/client.py", line 659, in __await_impl_timeout__ return await asyncio.wait_for(self.__await_impl__(), self.open_timeout) File "/usr/lib/python3.10/asyncio/tasks.py", line 445, in wait_for return fut.result() File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/client.py", line 666, in __await_impl__ await protocol.handshake( File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/client.py", line 332, in handshake raise InvalidStatusCode(status_code, response_headers) websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 200
@lospoelos Hi this is resolved in latest versions, please delete dispatcher.yaml and download it from the instance, all should be in latest 5.0.1 and agents in 3.0.1. Cheers!
Dear team, I'm having issues getting the agent dispatcher connect to the server.
dispatcher.yaml
Command
faraday-dispatcher run --token <copied from server web gui>
Error message
Server log