我有一个服务器有一个开放的套接字,侦听一个特定的文本string,以执行一个操作。 我们的linux机器通过以下方式发送此数 echo "text_string" | nc -w 2 server-name port# 这可能在Windows上(可能在PowerShell或其他内置工具)? 如果是这样,怎么样?
我在debian 5的机器上运行lighttpd-1.4.19,并尝试使用fastcgi运行web2py。 问题在于,lighttpd不会创build套接字文件/tmp/fcgi.sock。 如果我自己创build文件 touch /tmp/fcgi.sock lighttpd会启动,但会在运行一段时间后抛出这个错误: unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: unix:/tmp/fcgi.sock 我的configuration如下所示: fastcgi.server =( “/handler_web2py.fcgi”=>( “handler_web2py”=>(日志的#name “check-local”=>“禁用”, “socket”=>“/tmp/fcgi.sock”, “空闲超时”=> 20, “max-procs”=> 1 ) ) ) 在Debian 5上运行lighttpd有没有什么已知的问题? 谢谢你的帮助。 我粘贴了整个lighttpdconfiguration: http : //pastie.org/1660646
我正在使用新安装的CentOS 5.7 Linux 64位与PGDG软件包: # rpm -qa|grep -i PG postgresql-libs-8.4.8-2PGDG.rhel5 pgdg-centos-8.4-2 postgresql-8.4.8-2PGDG.rhel5 pgbouncer-1.3.4-1.rhel5 postgresql-server-8.4.8-2PGDG.rhel5 并在/var/log/audit/audit.log中获取以下Apache错误 type=AVC msg=audit(1316700316.235:41): avc: denied { write } for pid=2748 comm="httpd" name=".s.PGSQL.6432" dev=sda1 ino=754350 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file type=SYSCALL msg=audit(1316700316.235:41): arch=c000003e syscall=42 success=no exit=-13 a0=c a1=2b712748bee0 a2=6e a3=0 items=0 ppid=2721 pid=2748 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 […]
我使用iperf测量了计算机上本地绑定的TCP套接字连接(Intel Q9550,64 GB RAM,Windows XP 64位)的吞吐量。 无论我如何调整TCP设置(缓冲区长度,窗口大小,最大段大小,没有延迟),每次都得到不满意的结果(大约1.6Gbit / s)。 当我尝试netperf时,我得到了类似的结果。 现在,我明白(从这些来源)回环连接的平均吞吐量应该在5 Gbit / s左右。 可能是这种糟糕performance的原因是什么?
我们正在运行Python WSGI服务器(uWSGI),并更改为套接字文件而不是tcp / ip localhost:port连接。 现在我们的uwsgi日志充满了像这样的错误 IOError: write error SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) during GET /en/photos/?orientation… (ip …) !!! uwsgi_response_write_headers_do(): Broken pipe [core/writer.c line 296] during GET /en/photos/?orientation… (ip …) 改回本地主机:端口,日志中没有错误。 页面正在加载两种configuration。 我们更喜欢Unix套接字,因为它们速度更快一些…有没有人知道是什么原因导致了这个错误? uwsgi.ini: daemonize = /var/log/uwsgi/debug.log module = project.wsgi:application socket=127.0.0.1:1111 #socket = /tmp/tmp.sock #chmod-socket = 666 master = […]
我尝试用nging / munin隔离SELinux问题。 我在“/var/log/nging/error.log”中看到了这个错误信息: [crit] 8802#0:* 55连接()到unix:/var/run/munin/fcgi-html.sock失败(13:权限被拒绝)连接上游时,客户端:1.2.3.5,server:,request: “GET / munin / HTTP / 1.1”,上游:“fastcgi:// unix:/var/run/munin/fcgi-html.sock:”,主机:“1.2.3.4” 然后我试着audit2allow来修复selinux权限: # cat /var/log/audit/audit.log | audit2allow -M nginx-munin-socket # semodule -i nginx-munin-socket audit.log消息消失了,但nginx套接字错误总是在那里。 当我使用“setenforce 0”,那么我没有nginx套接字错误消息。 所以我相信我的问题绝对是selinux。 但是我现在不知道如何隔离这个问题!? nginx的,穆宁,socket.te module nginx-munin-socket 1.0; require { type httpd_t; type init_t; type munin_var_run_t; class sock_file write; class unix_stream_socket connectto; } #============= httpd_t ============== allow […]
我有一个networking套接字和我的反向代理Apache的一个小问题,我已经在最新版本2.4.5升级,并加载模块mod_proxy_wstunnel。 httpd.conf: <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName www.toto.fr ServerAlias toto.fr ProxyPass /my_app http://1X.XX1:8080/my_app ProxyPassReverse /web_pmr http://1X.XX1:8080/my_app ProxyPassReverseCookiePath /my_app / ProxyPassReverseCookieDomain localhost my_app ProxyRequests off ProxyTimeout 15 #WEBSOCKETS ProxyPass /my_app/BasicWebsocketServlet ws://1X.XX1:8080/my_app/BasicWebsocketServlet retry=0 ProxyPassReverse /my_app/BasicWebsocketServlet ws://1X.XX1:8080/web_pmr/BasicWebsocketServlet retry=0 ErrorLog "logs/my_app_error.log" LogLevel debug CustomLog "logs/my_app_access.log" combined <Proxy *> Order deny,allow Allow from all </Proxy> </VirtualHost> 当我testing我的本地URL,websockets正在工作,但与反向代理apache在tomcat日志中没有跟踪。 加载模块列表: Loaded Modules: […]
在php5-fpm状态页面上,阻止我的服务器accept()新插槽足够快的瓶颈是什么? pool: www process manager: static start time: 20/Jan/2015:16:37:18 +0000 start since: 176705 accepted conn: 903749 listen queue: 0 max listen queue: 129 listen queue len: 128 idle processes: 59 active processes: 69 total processes: 128 max active processes: 128 max children reached: 0 正如你所看到的,我已经到达了我的监听队列,而且这经常发生。 我理解监听队列背后的基本逻辑,这里详细介绍: php-fpm状态页面:本报告中的“队列”项目是什么? 我意识到我应该增加队列长度,我会这样做的。 不过,我的问题是, 为什么我的听众队伍已经填满了, 为什么要阻止它填满呢? 我假设如果有大量积压的积压,那么肯定会有一些不“保持”的东西? 这是一个CPU瓶颈/负载问题,它不能够accept()足够快?
在Linux中,将大量数据转储到域套接字中没有问题,但是在大约65条logging之后,OS X 10.6.2上的相同代码就会出现。 套接字阅读器代码看起来像 #!/usr/bin/perl use strict; use warnings; use IO::Socket; unlink "foo"; my $sock = IO::Socket::UNIX->new ( Local => 'foo', Type => SOCK_DGRAM, Timeout => 600, ) or die "Could not create socket: $!\n"; while (<$sock>) { chomp; print "[$_]\n"; } 客户端代码看起来像 #!/usr/bin/perl use strict; use warnings; use IO::Socket; my $sock = IO::Socket::UNIX->new ( […]
VMwareconfiguration为我提供了升级虚拟机cpu的各种选项。 虚拟套接字的数量 每个sockets的核心数量 如果我需要4个CPU在我的Linux机箱,这是更好的性能,4×1,2×2,1×4?