#824  Publish artifacts step with nginx reverse proxy setup fails
Closed
cryzed opened 3 weeks ago

I followed the reverse proxy instructions from here: https://code.onedev.io/projects/162/files/main/pages/reverse-proxy-setup.md. My OneDev 7.4.9 setup release runs on my Raspberry Pi bare-metal (because there's no Docker Image for aarm64), following the instructions from here: https://code.onedev.io/projects/162/files/main/pages/run-on-bare-metal-machine.md.

I have my agent started and configured on my desktop PC and configured as an executor on the OneDev server. When I specify the serverUrl in the agent's conf/agent.properties as an IP with port (e.g. http\://192.168.178.24:6610) everything works perfectly. However, when I specify the serverUrl in the agent's conf/agent.properties using my internal domain: http://onedev.raspberry-pi.local every step of the build process seems to work, except the last publish step -- which fails:

[...]
16:47:03 Step "Build" is successful
16:47:03 Running step "Publish"...
16:47:04
)
	at io.onedev.k8shelper.KubernetesHelper.checkStatus(KubernetesHelper.java:607)
	at io.onedev.k8shelper.KubernetesHelper.runServerSideStep(KubernetesHelper.java:1181)
	at io.onedev.agent.AgentSocket$4.execute(AgentSocket.java:421)
	at io.onedev.k8shelper.LeafFacade.execute(LeafFacade.java:11)
	at io.onedev.k8shelper.CompositeFacade.execute(CompositeFacade.java:34)
	at io.onedev.agent.AgentSocket.executeShellJob(AgentSocket.java:345)
	at io.onedev.agent.AgentSocket.service(AgentSocket.java:926)
	at io.onedev.agent.AgentSocket.access$000(AgentSocket.java:95)
	at io.onedev.agent.AgentSocket$1.run(AgentSocket.java:202)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

There doesn't seem to be anything additional on the server's log/server.log around that time, but clearly something is failing with the nginx proxied web request. Here's my nginx configuration for OneDev:

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

server {
  listen 80;
  server_name onedev.raspberry-pi.local;

  location /wicket/websocket {
    proxy_pass http://localhost:6610/wicket/websocket;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }

  location /server {
    proxy_pass http://localhost:6610/server;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }

  location / {
    proxy_pass http://localhost:6610/;
  }
}

Any idea what I'm doing wrong?

Artem Veschitsky commented 3 weeks ago

Add in nginx config aclient_max_body_size 250M;
250M - custom size for you needs.

cryzed commented 3 weeks ago

You are right, that was the issue! I didn't consider at all that my zipped artifacts would go past that default configured limit. Thank you.

cryzed changed state to 'Closed' 3 weeks ago
Previous Value Current Value
Open
Closed
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Seen Builds
Issue Votes (0)
Watchers (5)
Reference
issue onedev/server#824
Please wait...
Page is in error, reload to recover