<div dir="ltr">I believe systemd limits the length of lines in unit files to 2048 characters.<div><br></div><div>Swithun's email seemed correct to me: your ExecStart (as pasted in 1849 email) had a typo, it included:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>-Dhttp.nonProxyHosts=*.service.nexte-Dhttps.proxyHost=<a href="http://internal-outbounds-nat-1.eu-west-2.elb.amazoneaws.com/" rel="noreferrer" target="_blank">internal-outbounds-nat-1.eu-west-2.elb.amazoneaws.com</a></div></blockquote><div>which should have read:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>-Dhttp.nonProxyHosts=*.service.nexte -Dhttps.proxyHost=<a href="http://internal-outbounds-nat-1.eu-west-2.elb.amazoneaws.com/" rel="noreferrer" target="_blank">internal-outbounds-nat-1.eu-west-2.elb.amazoneaws.com</a></div><div><br></div></blockquote><div>Glad you got it fixed!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 8 Dec 2020 at 20:01, Tahir Hafiz <<a href="mailto:tahir.hafiz@gmail.com">tahir.hafiz@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It's okay - it's working now - I got rid of the extra stuff and ran<br>
the ExecStart line with the stuff that worked manually and now it no<br>
longer crashes!<br>
<br>
I just changed the ExecStart to be more simple with just proxy info<br>
and now the app runs without crashing. Maybe systemd can't handle too<br>
many flags or the flags are too long - I mean it was a huge one liner!<br>
<br>
On Tue, Dec 8, 2020 at 7:29 PM Tahir Hafiz <<a href="mailto:tahir.hafiz@gmail.com" target="_blank">tahir.hafiz@gmail.com</a>> wrote:<br>
><br>
> Yep, no spaces in the -Dhttps.proxy flags.<br>
><br>
> So from what you are saying the flags should be passed in?<br>
> It is just one long ExecStart line.<br>
><br>
> I can run my the application manually by:<br>
> java proxy_info_flags _proxy_stuff -jar my_java_app.jar<br>
><br>
> And it works fine, it's able to pick up the proxy and the app is able<br>
> to talk https outbound.<br>
><br>
> Just when systemd runs it up with those flags it doesn't pick up the<br>
> https proxy and it barfs on start-up and then it keeps starting up<br>
> again, crashing, starting, crashing, ... etc... because of systemd<br>
> restart every 10 seconds.<br>
> I just don't know what's wrong.<br>
><br>
> Tai - good shout about running the commands in screen or tmux - so if<br>
> I screen/tmux it, the parent shell kicks me out, the sub-shell will<br>
> keep running! Brilliant - thank you!!<br>
><br>
> Cheers,<br>
> Tahir<br>
><br>
> On Tue, Dec 8, 2020 at 7:21 PM Tai Kedzierski <<a href="mailto:dch.tai@gmail.com" target="_blank">dch.tai@gmail.com</a>> wrote:<br>
> ><br>
> > @Swithun Java has a parameterisation thing that specifies passing the "-D<argument>" thing with no spaces...<br>
> ><br>
> > // Sent from a mobile device. Typos and brevity may transpire.<br>
> ><br>
> > On Tue, 8 Dec 2020, 19:17 Swithun Crowe, <<a href="mailto:swithun@swithun.com" target="_blank">swithun@swithun.com</a>> wrote:<br>
> >><br>
> >> Hello<br>
> >><br>
> >> TH> It’s a line like this in the systemd service file:ExecStart=/bin/java<br>
> >> TH> -Xmx1200m -Dhttp.nonProxyHosts=*.service.nexte-Dhttps.proxyHost=<a href="http://internal-outbounds-nat-1.eu-west-2.elb.amazoneaws.com" rel="noreferrer" target="_blank">internal-outbounds-nat-1.eu-west-2.elb.amazoneaws.com</a><br>
> >> TH> -Dhttps.proxyPort=3128 -Dlogging.config=/opt/my-api/config/logback.xml<br>
> >> TH> -jar /opt/my-api/my-api-6.1.jar<br>
> >><br>
> >> Has the line got mangled in an email, or should there be spaces between<br>
> >> the -D... flags?<br>
> >><br>
> >> Looking at my systemd .service files, the ExecStart lines have arguments<br>
> >> that get passed to the commands.<br>
> >><br>
> >> TH> Also, how can I log into different server boxes and run these two<br>
> >> TH> commands in a shell but with some kind of nohup option (or similar) so<br>
> >> TH> the process won’t crash if I get timed out (kicked out) from the<br>
> >> TH> shells:<br>
> >><br>
> >> Can you install GNU screen or tmux on these servers? If you start a<br>
> >> session, and run the commands in there, you can disconnect (or get<br>
> >> disconnected) and the processes will keep running.<br>
> >><br>
> >> Good luck.<br>
> >><br>
> >> Swithun.--<br>
> >> EdLUG mailing list<br>
> >> <a href="mailto:EdLUG@mailman.lug.org.uk" target="_blank">EdLUG@mailman.lug.org.uk</a><br>
> >> <a href="https://lists.edlug.org.uk/mailman/listinfo/edlug" rel="noreferrer" target="_blank">https://lists.edlug.org.uk/mailman/listinfo/edlug</a><br>
> ><br>
> > --<br>
> > EdLUG mailing list<br>
> > <a href="mailto:EdLUG@mailman.lug.org.uk" target="_blank">EdLUG@mailman.lug.org.uk</a><br>
> > <a href="https://lists.edlug.org.uk/mailman/listinfo/edlug" rel="noreferrer" target="_blank">https://lists.edlug.org.uk/mailman/listinfo/edlug</a><br>
<br>
-- <br>
EdLUG mailing list<br>
<a href="mailto:EdLUG@mailman.lug.org.uk" target="_blank">EdLUG@mailman.lug.org.uk</a><br>
<a href="https://lists.edlug.org.uk/mailman/listinfo/edlug" rel="noreferrer" target="_blank">https://lists.edlug.org.uk/mailman/listinfo/edlug</a></blockquote></div>