jenkinsci / gitlab-plugin

A Jenkins plugin for interfacing with GitLab
https://plugins.jenkins.io/gitlab-plugin/
GNU General Public License v2.0
1.44k stars 613 forks source link

After starting with hpi:run, you can only interact with localhost #1652

Closed tanglinyan closed 5 months ago

tanglinyan commented 5 months ago

Jenkins and plugins versions report

Environment ```text Paste the output here ```

What Operating System are you using (both controller, and any agents involved in the problem)?

mac, Intel

Reproduction steps

Try adding -Djetty.httpHost=0.0.0.0

Expected Results

Can be accessed through local area network (LAN), such as http://192.168.4.129:8080

Actual Results

It can only be accessed using http://localhost:8080

Anything else?

No response

Are you interested in contributing a fix?

No response

MarkEWaite commented 5 months ago

The command that you need to use is:

mvn -Dhost=0.0.0.0 hpi:run
tanglinyan commented 5 months ago

Thanks a lot for

tanglinyan commented 5 months ago

I look at the log and see that hpi:run uses jetty server internally Attempt to modify jetty server parameters But it didn't work Why does mvn-Dhost =0.0.0.0 hpi:run take effect

MarkEWaite commented 5 months ago

I believe that the details of the hpi plugin for Apache Maven are described in its documentation. In that documentation, it says:

Specifies the host (network interface) to bind to. If connectors are configured in the Mojo, that'll take precedence. Default: localhost User Property: host

tanglinyan commented 5 months ago

Thank you. I think I got it