Plugin Development Jetty Configuration

I’m trying to troubleshoot an issue with my company’s Jenkins plugin that only happens under specific circumstances requiring me to need to setup my dev environment with an agent running on a separate machine than my dev laptop.

The problem I’m running into is when running Jenkins from IntelliJ I cannot access it from outside my dev machine. I’ve ruled out any firewall/network issues, I’ve completely turned off Windows Firewall and can access sites running on IIS on the same port as Jenkins when it’s running.

I haven’t even figured out how to change the port it listens on, much less see what more advanced settings I could tweak to troubleshoot this. I’ve spent a week+ trying to find any info on this but have only found info relating to standalone Jenkins installations that refer to configuration/files that don’t exist in my environment.

Also, something else that might be related and is very strange to me, but could just be confusion of 20yr .Net development. I can’t ever access Jenkins by IP, the logs say it’s listening on localhost:8080, http://localhost:8080 works, but http://[ip address]:8080 doesn’t. For shits and giggles I added a host file entry “ laptop” and http://laptop:8080 works fine. Why would http://[ip address]:8080 not work?

If anyone can help or even just point me to any documentation regarding this it would be greatly appreciated

When I run from the command line and want to allow access outside my own machine, I use:

mvn -Dhost= hpi:run

Access is limited to my local machine if I run with the command:

mvn hpi:run

See the hpi plugin documentation and the additional details in the hpi:run documentation.

1 Like

We tried setting that in the runner options, but for some reason it didn’t work.

We did just now get it working by adding this section in the plugin def

                    <!-- for local pipeline testing -->