简体   繁体   English

OrientDB反向代理与Apache

[英]OrientDB Reverse Proxy with Apache

I am using OrientDB to serve as a RESTful way to do GET and POST data back and forth to my AJAX application. 我正在使用OrientDB作为一种RESTful方法来对我的AJAX应用程序来回执行GET和POST数据。 I have now setup Apache to serve out the AJAX application and do reverse proxy to the OrientDB RESTful calls to get around cross domain restrictions. 现在,我已经设置了Apache,以提供AJAX应用程序,并对OrientDB RESTful调用进行反向代理,以解决跨域限制。 For the most part things are happy but for part of my application I use jsTree (http://www.jstree.com/) to dynamically load tree nodes and for some unknown reason it is working on every other AJAX load of child nodes. 在大多数情况下,事情很高兴,但是对于我的应用程序,我使用jsTree(http://www.jstree.com/)动态加载树节点,并且由于某些未知原因,它正在其他所有AJAX子节点加载中工作。

In the AJAX application http network trace I get "204 No Content" and in the Apache logs I see: 在AJAX应用程序http网络跟踪中,我得到“ 204 No Content”,而在Apache日志中,我看到:

APR does not understand this error code: proxy: pass request body failed
An established connection was aborted by the software in your host machine.  : proxy: error reading status line from remote server

I have tried setting timeouts and keep alive settings but nothing has helped as of yet. 我已经尝试设置超时并保持活动设置,但到目前为止还没有任何帮助。 I am imagining that there is some magic setting that will get this to work like it was but I have not found that as of yet. 我在想像有一种神奇的设置可以使它像以前那样工作,但到目前为止我还没有发现。

The apache error: apache错误:

proxy: error reading status line from remote server 代理:从远程服务器读取状态行时出错

means that the origin server (OrientDB in your case) is killing the established TCP connection with the client (apache as reverse proxy) before apache can send the request body to OrientDB. 意味着在apache可以将请求主体发送到OrientDB之前,源服务器(在您的情况下为OrientDB)正在终止与客户端(作为反向代理的apache)建立的TCP连接。

It could happen when the client (the browser) begins a HTTP request to apache but it's slow sending the request. 当客户端(浏览器)开始发出HTTP请求以使其达到请求速度,但发送请求速度很慢时,可能会发生这种情况。 Apache opens a connection to OrientDB, but orientdb closes the connection due to inactivity timeout. Apache打开与OrientDB的连接,但是由于不活动超时,orientdb关闭了连接。 At this point, an error is raised and the connection with the broser returns with no luck. 此时,将引发错误,并且与broser的连接没有运气就返回。

Try to raise the HTTP timeout in OrientDB. 尝试提高OrientDB中的HTTP超时。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM