500 internal server error on WebLogic server - java

when I pass more than 1000 param I'm getting 500 internal server error on WebLogic server. Please suggest me any configuration have to be changed or any other. When I execute in tomcat setting max parameter attribute that issue getting resolved. But I need a solution in Weblogic server.Please help me

First result in google:
https://community.oracle.com/thread/4044784
Configure it by setting a higher value in MaxRequestParameterCount.
It would be helpful to know your WebLogic version, error message, etc.

Related

Tomcat9 web access other than localhost failed

I am trying to evaluate ofbiz ( v17.2.03 ) just now. I can access it via https://127.0.0.1:8443/.../ from local machine (192.168.110.182) but not from other machines. The error message is like(from Chrome),
org.apache.ofbiz.webapp.control.RequestHandlerException: Domain
192.168.110.182 not accepted to prevent host header injection.
No idea at all, and please if someone can help with this.
You need to set host-headers-allowed property in security.properties file. I'll make the error message more explicit!
Update: done with
https://github.com/apache/ofbiz-framework/commit/3c9fe5f91684de54570e6ec61575c11368a2ffd6/
https://github.com/apache/ofbiz-framework/commit/d0fceffadda57dbe6e87398c47b4a575bc33137d/

HTTP ERROR: 404 solr not running

Yesterday if was opening http://my-ip:3000/solr then the home page is opening of Solr.
But today I restarted VM after that is showing me like that.
HTTP ERROR: 404
Problem accessing /solr. Reason:
Not Found
Powered by Jetty://
If I run this URL http://my-ip:3000 then it shows me
Error 404 - Not Found.
No context on this server matched or handled this request.
Contexts known to this server are:
Powered by Jetty:// Java Web Server
I checked Jetty and it is running fine.
Now I'm confused whats not running. I'm new to Solr. Please help me?
Solr page is now opening on this URL http://my-ip:3000/solr
And showing me 4.4
I killed java process then it starts working
You may need going to the Solr directory: cd solr-6.2.0/ and launching it: bin/solr start The Solr admin UI will run on the port 8983 by default: http://localhost:8983/solr/. However, the support for deploying Solr 5.0 and newer on Jetty is unsuported, so you might consider another solution, without Jetty.

(70007)The timeout specified has expired: proxy: error reading status line from remote server

I have this error in my apache acces log.
I work with apache 2.2 and tomcat 7. In the access file i see that apache send request to tomcat but tomcat can't treat them all. And when the error occures, i must restart tomcat to make my application work.
I have 2 j2ee applications application on tomcat. That application use connexion to posgres database via jdbc connexion pool. I see in my application log their is at least 4 free connexions. So i don't think there is trouble with database.
Does someone know what could cause this error ? Thank you in advence !
Try adding following apache parameters inside the virtual host section which should be in httpd.conf file or any other place per your server configuration
Timeout 2400
ProxyTimeout 2400
ProxyBadHeader Ignore
This resolved problem in my case. I am using Apache 2.4 and tomcat ajp/http configurations.
It seems that your application take more time to respond that apache ProxyTimeout
ProxyTimeout
try to increase proxytimeout in you vhost/httpd configuration and try again
The root cause is slowness in you application. you need to find the root cause of slowness
The settings for the packet data transfer needs to be increased which is now low and the ab tool is not able to serve any data after the completion of the mentioned packets.
You can change the configuration as below and then can enjoy running ab tool for your applications.
On Ubuntu Server you can find them in /etc/sysctl.conf
net.ipv4.netfilter.ip_conntrack_max = 32768
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_tw_reuse = 0
net.ipv4.tcp_orphan_retries = 1
net.ipv4.tcp_fin_timeout = 25
net.ipv4.tcp_max_orphans = 8192
net.ipv4.ip_local_port_range = 32768 61000

Tomcat 6.0.36 not reporting why it responded with 400

I have a tomcat server and java client with java.net.HttpUrlConnection sending messages. Usually all works fine, but there some requests the client sends out which are responded with a 400 http error.
The problem is that nothing is shown on tomcat logs. I even tried to put .level=fine and other log level changes, and still no exception or error was shown.
I'm suspecting bad encoding in request or something like that, but tomcat doesn't give me any clues.
By the way, the URL is OK. I also see the request reaches the server but not to my servlet.
It appears tomcat gets the message, declares it bad and doesn't log what's wrong.
Can anybody think of a way to see the 400 reason?
Thank you
I finally figured out -
I saw that the size of the total headers + size of data written to OutputStream - was exceptionally high - and so I defined in the Tomcat HTTP connector:
Connector port="8080" protocol="HTTP 1/1" maxPostSize="10485760" maxHttpHeaderSize="10485760"/
It is a shame Tomcat doesn't just tell me this, and I had to guess my - I will report this as a bug.
Thank you
Indeed, this was also the solution to the "http 400 bad request" error on Internet Explorer 11.
Adding
maxHttpHeaderSize="10485760" maxPostSize="10485760"
to the Connector-node of Tomcat's server.xml.
Seems my ajax-request (extjs) on IE11 are using a bigger request header then the default (8192 = 8 KB) max http header size on Tomcat 6?
With IE10 and Chrome I didn't experience this problem.
This is a very nice issue to be discussed about. I also faced the same issue in my organization's work. I was clueless about it as there were no good logging about it in catalina.out or in our application logs. Http calls made from client apps to the API that was running in Tomcat_8 were getting rejected by the server with 400 bad request. Only Tomcat locahost_access logs records it by printing the 400 http status fro the request. After I increased the http header size the issue got resolved.

Issue while connecting to remote weblogic server over proxy

I have configured a proxy in my java source code as:
systemSettings.put("http.proxyHost", "www.proxyserver.com");
systemSettings.put("http.proxyPort", "8080");
systemSettings.put("http.nonProxyHosts", "10.x.y.z");
Here 10.x.y.z is the actual IP of my weblogic server.
But whenever code tried to connect to weblogic server, I receive error as:
Caused by: java.net.ConnectException: t3://10.x.y.z:7001: Destination
unreachable; nested exception is: java.net.ProtocolException:
unrecognized response from proxy: 'HTTP/1.0 403 Forbidden'; No
available router to destination at
weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:216) at
weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170) at
weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153) at
weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:345)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:340)
It seems that setting http.nonProxyHosts is not working as expected. I tried to find solution over the Internet, but most of them says remove proxy settings. I can not remove proxy, as my code tries to connect to some of the Internet URLs. Also note that, weblogic server is on remote machine.
Can you please give me a hint, what must be the issue here?
Have a look at this OTN thread.
From 3rd comment :
You are setting nonProxyHosts, which doesn't exist as a system property, via System.setProperties().
I haven't read all so far, but it seems the system.properties is not the convenient way to set
nonProxyHosts.
Did you tried to set it from command line ?
-Dhttp.nonProxyHosts="*.foo.com|localhost".
I resolved the issue. I had setup the proxy initially when connection with weblogic was setup. So due to some network restrictions I believe it didnt work. In modified code, I used the same 3 lines to setup proxy:
System.setProperty("java.net.useSystemProxies", "false");
System.setProperty("http.proxyHost", "www.proxyserver.com");
System.setProperty("http.proxyPort", "8080");
The only difference is, I did it at exact place where I needed. So for initial connection setup with weblogic proxy wont be used. I also did not have to bypass, weblogic server URL to not to use proxy.
#Arcadien: I appreciate your efforts to help me. Thanks.

Categories