Connection reset by peer > Linux ϵĴíÎó error.h
ÎÊÌ⣺Á½Ì¨DVRͬʱÁ¬½Óͬһ̨2·µÄDVS£¬ÆäÖÐһ̨DVRÕý³£Á¬½ÓDVSµÄÁ½Â·Êä³ö£¬Ô¤ÀÀÒ²Õý³£¡£
¶øÁíһ̨DVRÖ»ÄÜÁ¬ÉÏDVSµÄ1·Êä³ö£¬Áíһ·ÔõôҲÁ¬²»ÉÏ¡£
¸ú×Ù·¢ÏÖ£¬DVRÓëDVS½¨Á¢rtspÁ¬½ÓÕý³££¬µ«ÔÚDVR·¢ËÍDESCRIBEÃüÁîÒÔºó£¬ÔÙÒ²ÊÕ²»µ½
DVSµÄÏìÓ¦£¬´íÎóºÅ104£ºConnection reset by peer
²éGoogle ·¢ÏÖÍøÉÏÓÐÕâÑù½âÊÍ£º
¢Ù£º·þÎñÆ÷µÄ²¢·¢Á¬½ÓÊý³¬¹ýÁËÆä³ÐÔØÁ¿£¬·þÎñÆ÷»á½«ÆäÖÐһЩÁ¬½ÓDownµô£»
¢Ú£º¿Í»§¹ØµôÁËä¯ÀÀÆ÷£¬¶ø·þÎñÆ÷»¹ÔÚ¸ø¿Í»§¶Ë·¢ËÍÊý¾Ý£»
¢Û£ºä¯ÀÀÆ÷¶Ë°´ÁËStop
errno
ÊǸöint±äÁ¿£¬·µ»Ø´íÎó
ÓдíÎóʱʹÓ÷½·¨
fprintf(fp, "%s", strerror(errno))
perrorÓ÷¨
#include <stdio.h>
#include <stdlib.h>
#include<errno.h>
int main(void)
{
FILE *fp;
if((fp=fopen("aaa.txt","r+"))==NULL)
{
puts("²»ÄܽøÈëÎļþ");
perror("ÔÒò");
printf("errno=%d\n",errno);
exit(1);
}
system("PAUSE");
return 0;
}
fopen·µ»ØNULLÒòΪûÓÐÎļþ
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Argument list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF&n
Ïà¹ØÎĵµ£º
ת×Ôhttp://liuleijsjx.javaeye.com/blog/450933
1.²ßÂÔ·ÓÉ
»ùÓÚ²ßÂԵķÓɱȴ«Í³Â·ÓÉÔÚ¹¦ÄÜÉϸüÇ¿´ó£¬Ê¹ÓøüÁé»î£¬ËüʹÍøÂç¹ÜÀíÔ±²»½öÄܹ»¸ù¾ÝÄ¿µÄµØÖ·¶øÇÒÄܹ»¸ù¾Ý±¨ÎÄ´óС¡¢Ó¦ÓûòIPÔ´µØÖ·À´Ñ¡Ôñת·¢Â·¾¶...
#/etc/iprout ......
ÓÃsecureCRTÁ¬½ÓLinuxʱ³öÏÖÈçÏ´íÎó£ºThe remote system refused the connection.
1¡¢²éѯsshd¹¤×÷״̬
#service sshd status
ÏÔʾstop
2¡¢ÔËÐÐ#service sshd restart
ÏÔʾPermissions 0777 for '/etc/ssh/ssh_host_rsa_key' are too openµÈһЩȨÏÞ´íÎó
3¡¢ÐÞ¸Ä/etc/sshϵÄÃÜԿȨÏÞ
#chmod 600 sshd_config
#chm ......
1) ÓÀ¾ÃÐÔÉúЧ£¬ÖØÆôºó²»»á¸´Ô
¿ªÆô£º chkconfig iptables on
¹Ø±Õ£º chkconfig iptables off
2) ¼´Ê±ÉúЧ£¬ÖØÆôºó¸´Ô
¿ªÆô£º service iptables start
¹Ø±Õ£º service iptables stop
ÐèҪ˵Ã÷µÄÊǶÔÓÚLinuxϵÄÆäËü·þÎñ¶¼¿ÉÒÔÓÃÒÔÉÏÃüÁîÖ´ÐпªÆôºÍ¹Ø±Õ²Ù×÷¡£
ÔÚ¿ªÆôÁË·À»ðǽʱ£¬×öÈçÏÂÉèÖ㬿ªÆôÏà¹Ø¶Ë¿Ú£¬ ......
¹¹½¨»ù±¾µÄLinux C ±à³Ì»·¾³ ÊÕ²Ø
±¾ÎÄ»ùÓÚdebian-40r0(ÄÚºË2.6.18)½éÉÜÒ»ÏÂÈçºÎÔÚÒ»¸ö±ê׼ϵͳÖй¹½¨Linux CµÄ»ù±¾±à³Ì¿ª·¢»·¾³¡£
Ò»¸öÍêÕûµÄ¿ª·¢»·¾³Ö÷Òª°üÀ¨Ëĸö²¿·Ö£º±ê×¼C¿â¡¢Í·Îļþ¡¢¹¤¾ßÁ´¡¢±à¼Æ÷¡¢°ïÖúÎĵµ£¬ÏÂÃæÒÀ´Î½éÉÜ¡£
±ê×¼C¿âglibc
glibcÊÇgnu·¢²¼µÄlibc¿â£¬¼´cÔËÐп⡣glibcÊÇlinuxϵͳÖÐÄÚºËÖ ......
ÈçºÎ¿ªÆô¹Ø±Õlinux·À»ðǽ
¡¡¡¡ÖØÆôºóÉúЧ
¡¡¡¡¿ªÆô£ºchkconfig iptables on
¡¡¡¡¹Ø±Õ£ºchkconfig iptables off
¡¡¡¡¼´Ê±ÉúЧ£¬ÖØÆôºóʧЧ
¡¡¡¡¿ªÆô£ºservice iptables start
¡¡¡¡¹Ø±Õ£ºservice iptables stop
¡¡¡¡»ò
¡¡¡¡¹Ø±Õ£º /etc/rc.d/init.d/iptables stop
¡¡¡¡Æô¶¯£º /etc/rc.d/init.d/ip ......