HTTP 400 on connecting new agent (OD-430)
majatocaha opened 4 years ago

Hi,

I just tried to connect a new windows shell agent, but every time I run agent.bat console, all I'm getting is

org.eclipse.jetty.websocket.api.UpgradeException: Failed to upgrade to websocket: Unexpected HTTP Response Status Code: 400 Bad Request

I assume this is a bug?

  • Robin Shen commented 4 years ago
    It works fine at my side. Please diagnose the issue via below steps:

    1. Make sure property "serverUrl" in "conf\agent.properties" is specified correctly, it should be something like "http://<your OneDev server>:6610"
    2. If there is proxy between agent and server, disable it temporarily and connect directly to see if it works
    3. Check server log to see if there is detail information about the error
  • Robin Shen commented 4 years ago

    If you are using reverse proxy for OneDev server, make sure to proxy /server path as documented here:

    https://code.onedev.io/projects/162/blob/main/pages/reverse-proxy-setup.md

  • majatocaha commented 4 years ago

    I am using a reverse proxy and I indeed messed up setting up the /server path 😬 I must have skipped it accidentally

    It works now, thank you so much for the hint and I'm sorry for the silly question.

  • Robin Shen commented 4 years ago

    I just added the /server entry to the manual today, realizing that the agent does not connect through a reverse proxy. Thanks for reporting the issue.

  • Robin Shen changed state to 'Closed' 4 years ago
    Previous Value Current Value
    Open
    Closed
issue 1/1
Type
Bug
Priority
Normal
Assignee
Affected Versions
Not Found
Issue Votes (0)
Watchers (3)
Reference
OD-430
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover