存档

文章标签 ‘error’

snmpd不能启动的问题

2009年6月4日 哈哈 没有评论

有台机器启动snmpd一会儿就当
log里看是系统提示:

Error opening specified endpoint: “10.0.0.11″

man 8 snmpd看了一下

Note that not all the transport domains listed above will always be available; for instance, hosts with no IPv6 support will not be able to use udp6 transport addresses, and attempts to do so will result in the error “Error opening specified endpoint”. Likewise, since AAL5 PVC support is only currently available on Linux, it will fail with the same error on other platforms.

貌似是某些资源得不到满足的时候会报”Error opening specified endpoint”的错
看来问题的关键在于这个ip地址”10.0.0.11″
grep -r “10.0.0.11″ /etc/*了一下
运气比较好
马上返回:
/etc/snmp/snmpd.local.conf中有这个ip
进去一看
发现

agentaddress 127.0.0.1,10.0.0.11

将10.0.0.11这个ip换成这台机器的私网地址
再重起snmpd就好了

原因看来是snmpd要监听10.0.0.11这个ip的某个端口
结果这个ip又没有绑定在本地的某个网络设备上
所以失败

赫赫
看来这台机器原来的ip是10.0.0.11

vconfig添加vlan出”error: Invalid argument”错的问题

2009年6月3日 哈哈 没有评论

rhel5u3的机器
需要在一块网卡(eth0)上设上两个网段的ip地址
(交换机上已经配好,vlan id分别为10和11)
当用命令vconfig add eth0 10
的时候
系统抱错:

ERROR: trying to add VLAN #10 to IF -:eth0:- error: Invalid argument

man vconfig貌似也没有说法
后来查了下资料
才知道vconfig添加vlan
需要网络设备是up状态才行
于是明白了
ifconfig eth0 up
然后再vconfig add eth0 10
vconfig add eth0 11

就ok了
最后记得在系统里将eth0改成缺省是up状态
(改文件/etc/sysconfig/network-scripts/ifcfg-eth0中的ONBOOT参数为yes)
否则重起就没用了

安装daemontools的问题

2008年3月5日 哈哈 没有评论

工作上有需求
要看着(监控)某些服务器上的某些进程
想了,也尝试了n种方法
总觉得不是很完美
偶然想起n年前常用的svc
貌似能帮我们看着特定的进程(发现当掉会帮忙重起)
于是今天就找台机器想装上
svc是软件包daemontools里的东西
于是按照安装文档里所说:
mkdir -p /package
chmod 1755 /package
cd /package
wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
tar xzvf daemontools-0.76.tar.gz
rm daemontools-0.76.tar.gz
cd admin/daemontools-0.76
package/install

没料到居然出错:
./load envdir unix.a byte.a
envdir.o(.text+0xce): In function `main’:
: undefined reference to `errno’
envdir.o(.text+0×1b4): In function `main’:
: undefined reference to `errno’
envdir.o(.text+0×1ce): In function `main’:
: undefined reference to `errno’
unix.a(openreadclose.o)(.text+0×3b): In function `openreadclose’:
: undefined reference to `errno’
unix.a(pathexec_run.o)(.text+0xef): In function `pathexec_run’:
: undefined reference to `errno’
unix.a(pathexec_run.o)(.text+0×167): more undefined references to `errno’ follow
collect2: ld returned 1 exit status
make: *** [envdir] Error 1
Copying commands into ./command…
cp: cannot stat `compile/svscan’: No such file or directory

翻了翻google
发现是一个变量errno的问题
于是
vim src/error.h

extern int errno;

这一行改成:

#include

再重新
package/install
OK了

编译varnish时的错误

2008年2月29日 哈哈 没有评论

源代码编译varnish的时候
cd varnish-1.1.2/
./autogen.sh
./configure –enable-debugging-symbols –enable-developer-warnings –enable-dependency-tracking
make

这时候出错:

“varnishhist.c:35:20: error: curses.h: No such file or directory“

然后安装ncurses-devel
yum install ncurses-devel
重新再make
还是报错
然后
make clean;make
还是报错
最后
重新
./configure –enable-debugging-symbols –enable-developer-warnings –enable-dependency-tracking
make
make install

OK了

what’s meaning of “configure: error: cannot run /bin/sh config/config.sub”

2006年7月23日 哈哈 没有评论

编一个东西的时候
执行./configure的时候出的错

“configure: error: cannot run /bin/sh config/config.sub”

结果发现是系统没有装libtool的缘故
所以yum install libtool
然后再./configure则没有这个问题了