Tomcat 6.0.35 Windows 32b服务使用系统代理 [英] Tomcat 6.0.35 Windows 32b Service useSystemProxies

查看:85
本文介绍了Tomcat 6.0.35 Windows 32b服务使用系统代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我整天都在尝试使Tomcat6使用系统代理设置.尝试了多种方式,大约有200种不同的版本

I've been trying the whole day to make Tomcat6 use system proxy settings. Tried various ways, about 200 different Versions of

tomcat6 //US/Tomcat6 ++JvmOptions "-Djava.net.useSystemProxies=true"

我试图这样在安装"部分的service.bat中设置属性(也有许多类似的版本):

I tried to set the property in service.bat in the "install" section like this (also many similar versions):

...
:foundJvm
echo Using JVM:              "%PR_JVM%"
"%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop --JvmOptions "-Djava.net.useSystemProxies=true"

我尝试使用tomcat6w GUI进行设置.不知道它是否仍然可以执行任何操作.

I tried settings this with the tomcat6w GUI. Not sure if it does anything anyway.

还尝试将JAVA_HOME设置为JRE和JDK.没什么.

Also tried setting JAVA_HOME to JRE and JDK. No difference.

尝试设置-Dhttp.proxyHost=proxyhostURL-Dhttp.proxyPort=proxyPortNumber.至少似乎不会忽略这些内容,因为连接随后失败了(使用了随机的本地ip和端口).

Tried setting -Dhttp.proxyHost=proxyhostURL and -Dhttp.proxyPort=proxyPortNumber. Those at least seem not to be ignored because the connection then failed (used random local ip and port).

现在有趣的事实是:我可以通过catalina.bat运行它,在其中设置参数(CATALINA_OPTS=...),它的工作原理就像一个超级按钮.那在那里做什么?我希望将其作为一种更加用户友好的服务,但是如果没有办法实现,我愿意考虑将catalina.bat投入自动运行.

Now the fun fact: I can run it through catalina.bat, set the parameter there (CATALINA_OPTS=...) and it works like a charm. So what is that doing there? I would like to have it as a service which would be way more user friendly, but if there's no way to achieve it, I'm willing to consider just throwing catalina.bat into autorun.

那么...有人能做到这一点吗?还是有人有想法/建议?

So... did anybody ever get that working? Or does anybody have ideas/advices?

推荐答案

假设它在Windows上,我在以下位置找到了一个注册表项:

Assuming this is on Windows, I found a Registry key under:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\<app-name>\Parameters\Java

该条目被命名为REG_MULTI_SZ类型的Options.它包含所有-D JVM选项,每个选项一行.我添加了HTTP/HTTPS代理名称(我们使用的是NTLM身份验证代理)

The entry is named Options of type REG_MULTI_SZ. This contained all the -D JVM options, one line per option. I added our HTTP/HTTPS proxy name (we're using NTLM authentication proxies)

-Dhttp.proxyHost=proxy.company.local
-Dhttp.proxyPort=8080
-Dhttps.proxyHost=proxy.company.local
-Dhttps.proxyPort=8080
-Dhttp.proxyUser=svc_account
-Dhttp.proxyPassword=svc_Password

这篇关于Tomcat 6.0.35 Windows 32b服务使用系统代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆