错误 #2032:Fedora 上发生流错误,但 Ubuntu 上没有

发布于 2024-12-19 22:16:15 字数 3123 浏览 0 评论 0原文

正如通过互联网看到的那样,很多人都遇到过这个错误,但给出的解决方案都不适合我。

问题:
我有一个 Flex 应用程序,我想在 Linux 机器上运行它。在 Ubuntu 上,它工作正常,但在 Fedora 上,单击登录按钮时会出现以下错误。

text="Error #2032: Stream Error. URL: http://192.168.1.115/flexApp/utils/db_mgmt.php"]. 

详细信息:
登录按钮实际上通过 HTTPService 将用户输入的用户名和密码发送到部署在同一台计算机上的服务器。该 HTTPService 实际上将数据发送到服务器上的 db_mgmt.php,该服务器通过查询部署在同一台计算机上的 mysql 数据库来负责用户的授权。我在代码中访问 db_mgmt.php 的方式如下:

_httpS.url= "utils/" + db_mgmt.php;

这里的要点是我通过 localhost 访问它。所以我想,我不需要 crossdomain.xml。

机器信息:

  • 应用程序无法运行的机器:

    Linux 发行版:Fedora
    IP:192.168.1.115
    应用程序路径:/var/www/html/flexApp
    所有者:大卫:大卫
    权限:755
    (我尝试将权限设置为 777 并将所有者设置为 apache:apache 只是为了测试,但 din 也可以工作。顺便说一句,'apache' 是在 Fedora 上运行 Apache/httpd 的用户名。)

  • 应用程序运行正常的机器:

    Linux 发行版:Ubuntu
    IP地址:192.168.1.113
    应用程序路径:/var/www/flexApp
    所有者:标记:标记
    权限:755

问题似乎与 Flash Player 版本无关:
我正在通过 Firefox 浏览器从第三台计算机访问两台计算机。 Ubuntu 下运行良好。 Fedora one 返回上述错误。这里要指出的是,这个问题与我的第三台机器的 Firefox 浏览器中的 FlashPlayer 版本无关。如果是这样的话,Ubuntu 机器上应该也会出现同样的问题。 (注意:Chrome和Internet Explorer中也会出现同样的问题)

问题不是因为路径不正确:
我可以很好地访问以下路径。不会出现问题。我从两台机器上的 db_mgmt.php 文件中获取输出:

Fedora:http://192.168.1.115/flexApp/utils/db_mgmt.php
Ubuntu: http://192.168.1.113/flexApp/utils/db_mgmt.php

我认为问题出在哪里?
好吧,在浏览了很多关于这个问题的论坛并尝试了给出的解决方案(结果不成功)之后,我唯一能想到的是我的文件在 Fedora 服务器上的权限有问题。 Fedora 机器上的 HTTPService 无法访问 db_mgmt.php。但我不知道如何确定它或它的解决方案是什么。我需要对 Fedora 机器上的 apache 设置进行一些更改吗?

由于其他一些原因,我必须在 Fedora 上运行这个应用程序。希望能在这里找到解决办法。 :)

谢谢。

更新:
这是错误消息的完整转储:

(mx.messaging.messages::ErrorMessage)#0
body=""
cliendId = "DirectHTTPChannel0"
correlationId= "CD7D67A8-1AD1-5C89-331B-
07B7E51BC3A0"
  destination = ""
  extendedData = (null)
  faultCode = "Server.Error.Request"
  faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://192.168.1.115/flexApp/utils/db_mgmt.php"]. URL: http://192.168.1.115/flexApp/utils/db_mgmt.php"
  faultString = "HTTP request error"
  headers = (Object)#1
    DSStatusCode = 500
  messageId = "5D10EE4D-BFA5-201E-EABE-07B7E550F727"
  rootCause = (flash.events::IOErrorEvent)#2
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#3
      bytesLoaded = 0
      bytesTotal = 0
      data = ""
      dataFormat = "text"
    errorID = 0
    eventPhase = 2
    target = (flash.net::URLLoader)#3
    text = "Error #2032: Stream Error. URL: http://192.168.1.115/flexApp/utils/db_mgmt.php"
    type = "ioError"
  timestamp = 0

This error has been faced by many people, as seen via internet, but none of the solutions given worked for me.

Problem:
I have a flex application which I am trying to run on a Linux machine. On Ubuntu, it works fine but on Fedora following error arises when a login button is clicked.

text="Error #2032: Stream Error. URL: http://192.168.1.115/flexApp/utils/db_mgmt.php"]. 

Details:
Login button actually sends username and password entered by a user to a server deployed on same machine via HTTPService. That HTTPService actually sends data to db_mgmt.php on the server which takes care of authorization of the user by querying mysql database deployed on same machine. I am accessing db_mgmt.php in my code as:

_httpS.url= "utils/" + db_mgmt.php;

Point here is that I am accessing it via localhost. So I guess, I don't need crossdomain.xml.

Machines Information:

  • Machine on which App is not working:

    Linux Distro: Fedora
    IP: 192.168.1.115
    App Path: /var/www/html/flexApp.
    Owner: david:david
    Permissions: 755
    (I have tried setting permissions to 777 and owner to apache:apache just for testing but that din work either. Btw 'apache' is the user name running Apache/httpd on Fedora.)

  • Machine on which App is working fine:

    Linux Distro: Ubuntu
    IP: 192.168.1.113
    App Path: /var/www/flexApp.
    Owner: mark:mark
    Permissions: 755.

Problem seems not related to the Flash Player version:
I am accessing both machines from a third machine via firefox browser. Ubuntu one works fine. Fedora one returns the error mentioned. Point here is that this problem is not related to the FlashPlayer version I have in my third machine's firefox browser. Had it been the case, same problem should have popped up with the Ubuntu machine. (Note: same problem occurs in Chrome and Internet Explorer)

Problem is not because of incorrect path:
I can access following path fine. No problem occurs. And I get output from the file db_mgmt.php on both machines:

Fedora: http://192.168.1.115/flexApp/utils/db_mgmt.php
Ubuntu: http://192.168.1.113/flexApp/utils/db_mgmt.php

Where do I think the problem can be?
Well, after going through a lot of forums about this problem and trying the solutions given (with unsuccessful results), only thing i can think of is that some thing is wrong with the permissions of my files on Fedora server. HTTPService on Fedora machine is unable to access db_mgmt.php. But I don't know how can I be sure of it or what can be its solution. Do I need to make some changes to the settings of apache on Fedora machine?

I have to have run this app on Fedora for some other reasons. Hope to find a solution here. :)

Thanks.

Update:
Here is the whole dump of the error message:

(mx.messaging.messages::ErrorMessage)#0
body=""
cliendId = "DirectHTTPChannel0"
correlationId= "CD7D67A8-1AD1-5C89-331B-
07B7E51BC3A0"
  destination = ""
  extendedData = (null)
  faultCode = "Server.Error.Request"
  faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://192.168.1.115/flexApp/utils/db_mgmt.php"]. URL: http://192.168.1.115/flexApp/utils/db_mgmt.php"
  faultString = "HTTP request error"
  headers = (Object)#1
    DSStatusCode = 500
  messageId = "5D10EE4D-BFA5-201E-EABE-07B7E550F727"
  rootCause = (flash.events::IOErrorEvent)#2
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#3
      bytesLoaded = 0
      bytesTotal = 0
      data = ""
      dataFormat = "text"
    errorID = 0
    eventPhase = 2
    target = (flash.net::URLLoader)#3
    text = "Error #2032: Stream Error. URL: http://192.168.1.115/flexApp/utils/db_mgmt.php"
    type = "ioError"
  timestamp = 0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

执手闯天涯 2024-12-26 22:16:15

第一个猜测:您的 SELinux 强制访问控制 配置未为您的应用程序正确设置。 Fedora 附带 SELinux,而 Ubuntu 附带 AppArmor,因此您使用的 MAC 框架在不同平台上有很大不同不同的系统。

检查您的 /var/log/audit/audit.log/var/log/messages 中是否有 avc:denied 消息。请参阅 Fedora SELinux 常见问题解答,了解如何真正工作的建议正确使用 SELinux。只是猜测您的 db_mgmt.php 的安全上下文可能未正确设置。检查 db_mgmt.php 文件上的 ls -Z 输出,并将其与其他工作 PHP 脚本进行比较 - 也许您只需要更新安全性PHP 解释器域可以访问的上下文。

第二个猜测:您的服务器未配置为侦听 Fedora 计算机上可公开访问的 IP 地址 192.168.1.115。检查 netstat -anp 输出,确保为您的应用程序提供服务的 Web 服务器正在侦听 0.0.0.0:80,而不是 127.0.0.1:80 >。

第三种猜测:查看是否有任何应用程序允许您通过硬件接口的地址进行“本地”通信。 (检查 ssh 192.168.1.115ssh 127.0.0.1 并确保两者均有效。请参阅 /proc/sys/net/ipv4 Linux 内核源代码中的 /conf/*/accept_local 文档 Documentation/networking/ip-sysctl.txt。)

First guess: your SELinux mandatory access control configuration isn't correctly set for your application. Fedora ships with SELinux and Ubuntu ships with AppArmor, so the MAC frameworks you're using are vastly different on the different systems.

Check your /var/log/audit/audit.log or /var/log/messages for avc:denied messages. See the Fedora SELinux FAQ for suggestions on how to really work with SELinux properly. Just a guess that the security context of your db_mgmt.php might not be properly set. Check ls -Z output on the db_mgmt.php file and compare it against other working PHP scripts -- perhaps you just need to update the security context to something the PHP interpreter domain can access.

Second guess: your server isn't configured to listen on the publicly accessible IP address 192.168.1.115 on the Fedora machine. Check netstat -anp output to make sure that the web server serving your application is listening to 0.0.0.0:80, not 127.0.0.1:80.

Third guess: See if any applications allow you to communicate "locally" via the hardware interface's address. (Check ssh 192.168.1.115 against ssh 127.0.0.1 and make sure both work. See /proc/sys/net/ipv4/conf/*/accept_local documentation in the Linux kernel source Documentation/networking/ip-sysctl.txt.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文