Hello,
I am running into an issue when executing the wget script that was generated in RAMADDA. Here is an example of a portion of the wget script that is currently not working:
wget -O "wind_250_d01_f09.png" "http://verif.rap.ucar.edu:8080/repository/entry/get/....
When I execute this, it hangs on this message and then times out:
Connecting to verif.rap.ucar.edu|128.117.192.214|:8080... failed: Connection timed out.
However, when I manually take out the http port (:8080) in the script, my wget commands work as expected, for example:
wget -O "wind_250_d01_f09.png" "http://verif.rap.ucar.edu/repository/entry/get/....
Do you now of any settings I can change to make the wget commands work without timing out?
Thank you for your continued help!
Michelle Harrold
NCAR/RAL
Hi Michelle,
This is (sortof) a problem with RAMADDA that I will fix. RAMADDA is generating an absolute URL, e.g. http://hostname:port/..
It should use the hostname and the port that the request is coming in on. Instead it is using the port specified in the Admin->Settings page.
For now, just set the HTTP port in
Admin-Settings->Site and Contact Info
to 80 (assuming its set to 8080)
-Jeff
Hi again,
I think I misspoke about the port but I think I know what is going on.
RAMADDA does not use the HTTP port set in the Admin pages when constructing the absolute URL, it does use the url and hostname of the incoming request. That said, I am guessing you are running with an Apache front-end proxying to a Tomcat backend running on port 8080. The problem is that the port that Tomcat sees on the request is 8080, the port that Apache talks to. That port is not available directly though.
So, RAMADDA uses 8080 instead of 80.
I need to fix this but I need to think about it a bit. A couple of possible quick fixes on your end -
allow access directly to Tomcat on 8080
or
use modjk to connect Apache to Tomcat directly - this preserves the incoming host name and port. In general, this is probably the best way to run Tomcat anyways as it allows for better usage logs in Tomcat
-Jeff
Jeff,
We do indeed proxy tomcat via Apache, but both mod_jk and mod_proxy_ajp result in wget URLs being generated with :8080. As you stated, ajp should preserve the port from the proxy server (available via getServerPort() per my reading of http://tomcat.apache.org/connectors-doc/generic_howto/printer/proxy.html), so I suspect RAMADDA may be doing something other than calling getServerPort() when generating self-referencing URLs for the wget scripts.
If it helps, RAMADDA does correctly preserve the hostname. Apache hits ajp://localhost:8080 but the wget URLs have the correct domain name rather than 'localhost', so RAMADDA must be calling getServerName() somewhere.
I have a temporary fix in place on our site, but please let me know whether or not you agree that this is a (potentially fixable) RAMADDA problem. I'd prefer to eliminate the not-standard Apache gymnastics of my fix so it doesn't silently and unexpectedly break on us in the future when we upgrade or change things and neglected to re-apply that fix.
Thanks for your help.
Hi Adam,
Sorry for the Apache gymnastics.
Ramadda does use HttpServletRequest.getServerName() and getServerPort().
I'm not sure why it isn't picking up the right port. I've seen some bug reports from some years ago about this with jboss and jetty. Maybe there is a problem in Tomcat?
I've added some logging on the wget request to print out the serverport and the localport.
I'm traveling this week with spotty internet connectivity. When I return I will get a new release. Hopefully the logging will shed some light on the problem
-Jeff
Jeff,
Great!. I even tried adding proxyPort=80 to my tomcat <connector> which
should, in theory, force those calls to return 80.
We're running Tomcat 7.0.41. Nothing in the 7.0.42 release notes jumps
out at me as being a potential fix, and I suspect a Tomcat bug would
affect lots of folks and get fixed quickly, so either something in my
config or something in RAMADDA seems more likely in my mind.
Thanks for being willing to work with us on it. I'll be glad to throw up
the new release and help figure out the root cause when it's available.
Thanks
Adam Carheden
SNAT RAL UCAR
x2753
On 08/13/2013 08:00 AM, Jeff McWhirter wrote:
Related
Support Requests: #8
Hi Adam,
Sorry for the delay. I have just made a new 1.5b release or Ramadda:
https://sourceforge.net/projects/ramadda/files/ramadda1.5b/
Why don't you try to install this (don't forget to install the new allplugins.jar).
There is a entry point:
.../repository/test
that will show what the HttpServletRequest has for the server name and port
Hopefully this will shed some light on the port and server name problems with the Apache/Tomcat connection
-Jeff
Hi,
Are you folks still having the problem with the absolute URLs in the wget script in RAMADDA? If so the latest 1.5b has a workaround available. In the Admin->Settings->Site and Contact Information you can specify a hostname/port (which you may have already) but you can also now check off the "Use the fixed hostname:port in absolute URLs instead of the request's info" box. This will have RAMADDA use the given hostname/port when constructing absolute URLS and it will not use the HttpServletRequest hostname/port
-Jeff
Jeff,
Thanks for the fix. I'll put that in next time we upgrade.
Also, sorry I never got around to testing the code you sent, but looks
like you figured out what was happening anyway. Thanks for the great
support.
Thanks
Adam Carheden
SNAT RAL UCAR
x2753
On 11/04/2013 05:42 AM, Jeff McWhirter wrote:
Related
Support Requests: #8