[EdLUG] How can I troubleshoot misbehaving java application

Tahir Hafiz tahir.hafiz at gmail.com
Tue Dec 8 19:29:24 UTC 2020


Yep, no spaces in the -Dhttps.proxy flags.

So from what you are saying the flags should be passed in?
It is just one long ExecStart line.

I can run my the application manually by:
java proxy_info_flags _proxy_stuff -jar my_java_app.jar

And it works fine, it's able to pick up the proxy and the app is able
to talk https outbound.

Just when systemd runs it up with those flags it doesn't pick up the
https proxy and it barfs on start-up and then it keeps starting up
again, crashing, starting, crashing, ... etc... because of systemd
restart every 10 seconds.
I just don't know what's wrong.

Tai - good shout about running the commands in screen or tmux - so if
I screen/tmux it, the parent shell kicks me out, the sub-shell will
keep running! Brilliant - thank you!!

Cheers,
Tahir

On Tue, Dec 8, 2020 at 7:21 PM Tai Kedzierski <dch.tai at gmail.com> wrote:
>
> @Swithun Java has a parameterisation thing that specifies passing the "-D<argument>" thing with no spaces...
>
> // Sent from a mobile device. Typos and brevity may transpire.
>
> On Tue, 8 Dec 2020, 19:17 Swithun Crowe, <swithun at swithun.com> wrote:
>>
>> Hello
>>
>> TH> It’s a line like this in the systemd service file:ExecStart=/bin/java
>> TH> -Xmx1200m -Dhttp.nonProxyHosts=*.service.nexte-Dhttps.proxyHost=internal-outbounds-nat-1.eu-west-2.elb.amazoneaws.com
>> TH> -Dhttps.proxyPort=3128 -Dlogging.config=/opt/my-api/config/logback.xml
>> TH> -jar /opt/my-api/my-api-6.1.jar
>>
>> Has the line got mangled in an email, or should there be spaces between
>> the -D... flags?
>>
>> Looking at my systemd .service files, the ExecStart lines have arguments
>> that get passed to the commands.
>>
>> TH> Also, how can I log into different server boxes and run these two
>> TH> commands in a shell but with some kind of nohup option (or similar) so
>> TH> the process won’t crash if I get timed out (kicked out) from the
>> TH> shells:
>>
>> Can you install GNU screen or tmux on these servers? If you start a
>> session, and run the commands in there, you can disconnect (or get
>> disconnected) and the processes will keep running.
>>
>> Good luck.
>>
>> Swithun.--
>> EdLUG mailing list
>> EdLUG at mailman.lug.org.uk
>> https://lists.edlug.org.uk/mailman/listinfo/edlug
>
> --
> EdLUG mailing list
> EdLUG at mailman.lug.org.uk
> https://lists.edlug.org.uk/mailman/listinfo/edlug



More information about the EdLUG mailing list