城市中的一条鱼

雪化了,就是春天
 
 

留言簿(1)

  • 给我留言
  • 查看公开留言
  • 查看私人留言

随笔分类

  • C 语言(1) (rss)
  • JAVA 基础(7) (rss)
  • JBOSS 5(1) (rss)
  • OSGI(1) (rss)
  • SCA(1) (rss)
  • 其他技术话题(3) (rss)
  • 开源软件 (rss)
  • 数据库(2) (rss)
  • 架构模式(1) (rss)
  • 生活点滴(2) (rss)
  • 网络(2) (rss)

随笔档案

  • 2010年4月 (1)
  • 2010年1月 (3)
  • 2009年3月 (1)
  • 2007年10月 (2)
  • 2007年5月 (4)

文章分类

  • 技术点滴(2) (rss)
  • 读书笔记(1) (rss)

文章档案

  • 2008年11月 (1)

搜索

  •  

最新评论

  • 1. re: 在IPV6环境下使用Net-SNMP搭建snmp Agnet[未登录]
  • 评论内容较长,点击标题查看
  • --菜鸟
  • 2. re: 谈谈osgi中的事件机制
  • 期待深入的讲解。。。
  • --gembin
  • 3. re: ftp通信时的指令[未登录]
  • rubbish
  • --king

Powered by: 博客园
模板提供:沪江博客
BlogJava | 首页 | 发新随笔 | 发新文章 | 联系 | 聚合 | 管理

2010年4月22日

遇到了JVM的一个奇怪的现象

  昨天,遇到了一个测试的环境,虽然在启动脚本中,使用-server参数指定了sun jvm的运行模式,但是通过ProcessExplorer来看,居然是运行在client模式下,后来以为是打开了调试端口导致的,jvm_opts=%jvm_opts% -classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=y,最后发现时因为-classic造成的,解释参见 http://wangpan80.javaeye.com/blog/248708

posted @ 2010-04-22 18:11 narry 阅读(193) | 评论 (0) | 编辑 收藏
 

2010年1月7日

另一种导致原因导致的ORA-01658
  前天同事反映在测试环境中,给表创建新的分区时,出现了:
 ORA-01658: unable to create INITIAL extent for segment in tablespace XXXX
  根据经验和oracle官方的解释,是所在表空间的空间不够导致的,但是根据OEM观察,这个表空间的还有不少未使用的部分,这下就比较迷惑了。
  当把oracle的alert.log文件拿出来分析后,发现有提示指明temp表空间不足了,当扩展了temp表空间的数据文件后,异常消失了,看来temp表空间的不足也能引发 ORA-01658异常,并且是提示另一个表空间,值得注意



posted @ 2010-01-07 12:32 narry 阅读(461) | 评论 (0) | 编辑 收藏
 

2010年1月6日

oracle11gR2,在Linux IPV6环境下的一次Listener无法启动的问题
  今天在linux搭建的IPV6环境下重新启动了一下oracle,在启动listener时得到如下的输出:
 
        LSNRCTL> start
        Starting /oracle/11g/bin/tnslsnr: please wait
        
        TNSLSNR for Linux: Version 11.2.0.1.0 - Production
        System parameter file is /oracle/11g/network/admin/listener.ora
        Log messages written to /oracle/diag/tnslsnr/node2/listener/alert/log.xml
        Trace information written to /oracle/diag/tnslsnr/node2/listener/trace/ora_8028_3086591680.trc
        Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node2)(PORT=1521)))
        
        Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1521)))
        STATUS of the LISTENER
        ------------------------
        Alias                     LISTENER
        Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
        Start Date                06-JAN-2010 13:07:43
        Uptime                    0 days 0 hr. 0 min. 0 sec
        Trace Level               admin
        Security                  ON: Local OS Authentication
        SNMP                      OFF
        Listener Parameter File   /oracle/11g/network/admin/listener.ora
        Listener Log File         /oracle/diag/tnslsnr/node2/listener/alert/log.xml
        Listener Trace File       /oracle/diag/tnslsnr/node2/listener/trace/ora_8028_3086591680.trc
        Listening Endpoints Summary
          (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node2)(PORT=1521)))
        The listener supports no services
        The command completed successfully
        LSNRCTL> status
        Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1521)))
        TNS-12541: TNS:no listener
         TNS-12560: TNS:protocol adapter error
          TNS-00511: No listener
           Linux Error: 111: Connection refused
  根据提示listener在start后,显示启动成功,但是查看状态时报错,随即分析了Listener的日志,并且将listener的trace level设定为了admin,也无法定位问题。
  随后,在google进行搜索,发现在linux下出现listener相关的问题,有很大部分是和/etc/hosts的配置有关,特别是其中一篇提到在/etc/hosts 中没有设定 127.0.0.1,会产生错误,的确在这个IPV6的环境中,已经将127.0.0.1从/etc/hosts,替换为::1,在/etc/hosts恢复了127.0.0.1的配置,问题解决。不知这个问题是否oracle的一个缺陷?特别是启动的提示太有误导了,一点提示都找不到


posted @ 2010-01-06 13:30 narry 阅读(786) | 评论 (0) | 编辑 收藏
 

2010年1月5日

在IPV6环境下使用Net-SNMP搭建snmp Agnet
   今天在IPV6环境下使用NET-SNMP搭建了一个snmp Agnet,搭建步骤记录在此,操作系统为CentOS 5.3
1.安装NET-SNMP,需要安装 net-snmp,net-snmp-libs,net-snmp-utils,其对应的rpm都能在CentOS的安装盘中找到。
2.修改/etc/snmp/snmpd.conf,内容如下,其中2001::/64是snmp manager所在IPV6的子网前缀:

rwcommunity6 public

com2sec6 mynet 2001::/64 public

group mygroup v1 mynet
group mygroup v2c mynet
group mygroup usm mynet

view    systemview    included   .1.3.6.1.2.1.1
view    systemview    included   .1.3.6.1.2.1.25.1.1

access mygroup "" any noauth exact all all all
3.修改snmpd
snmpd -f -L udp:161,udp6:161 -d -c /etc/snmp/snmpd.conf
4.在2001::/64子网中另一台主机上,运行如下命令进行测试,其中2001:468:181:f101:20c:29ff:fe5d:10b4为agnet所在主机的IPV6地址
snmpwalk -v 2c -c public udp6:[2001:468:181:f101:20c:29ff:fe5d:10b4] system




posted @ 2010-01-05 18:45 narry 阅读(3374) | 评论 (1) | 编辑 收藏
 

2009年3月3日

使用String对象作为锁的异常行为的分析
     摘要: 使用String对象作为锁时,可能会因为String对象是通过“”创建,而造成程序出现死锁的现象  阅读全文
posted @ 2009-03-03 13:17 narry 阅读(548) | 评论 (0) | 编辑 收藏
 

2007年10月18日

软件架构的十大错误(转)

软件架构的十大错误

作者 Niclas Nilsson译者 郭晓刚 发布于 2007年10月17日 上午10时49分

IASA成员Eoin Woods发表了一篇文章讲述他所认为的十大软件架构错误——常常要碰得头破血流才会得到的一些教训。这十大错误简要总结如下:

  1. 不能界定项目范围。“在这种情况发生时,一个简单的出差登记系统结果变成内建了完整的花费报销管理系统,项目费用、时间跨度和质量都留下不可避免的烂摊子……除了简单的登录真的不需要安全措施了?用户登录系统后真的不能够执行任何系统操作吗?”
  2. 网撒得不够宽。“我们都曾经犯过的一个错误是,只关注系统所有利益相关者中的一两方——通常受让人(为系统出钱的人)和最终用户得到了全部的关注。”
  3. 只关注功能。“……除非系统表现出了全面的高质量(诸如性能、安全、可维护性等等),否则不太可能成功。”
  4. 用方框和线条来描述。“[一个无所不包的]巨大的Visio图无法成为有效的架构描述,有两个原因:第一,它试图在单一表示中呈现太多信息;第二,没人真正清楚地知道你画的各种符号到底表示什么意思。”
  5. 忘了需要培养的过程。“在建造系统的时候常常需要小心的事物包括:开发者和测试者没法真正理解设计,他们不热衷或者没时间学习技术,以及还没有很好的工具支持的新技术,或者新技术会强迫人们以新的不熟悉的方式工作。”
  6. 平台定义不精确。“光用‘需要Unix和Oracle’来描述你的平台是不足够的。你需要精确地说明每一部分具体的版本和配置,才能保证得到你所需的平台。不然如果有人好心为平台的某一部分升级了一个库,就可能导致某些东西停止运作。精确定义平台你才能在部署中避免这样的情形。”
  7. 对性能和伸缩能力想当然。“及早开始考虑性能和伸缩性,构建性能模型尝试预测关键的性能指标并定位瓶颈,在设计逐渐成型的同时投入到一些实际的验证性工作中去。这会帮助你提高对设计中不存在严重性能和伸缩性缺陷的信心。”
  8. 自己发明安全技术。“多年来许多系统所犯的一个错误是试图加入自己发明的安全技术来提高系统安全性。比如定制的加密算法,开发者自己编写的审核系统,甚至完全DIY的访问控制系统。自家开发的安全方案基本上都是不明智的。虽然很多人都以为自己可以马上搞出一些聪明的安全技术,但通常都只是自作聪明。”
  9. 没有灾难恢复。“要想得到资源来实现系统的灾难恢复机制,其关键在于在若干真实的场景中,具体衡量系统不可用所导致的损失。如果你还能估算这些场景发生的概率,你就可以用这两组数据去说服人们灾难恢复的重要性,并获得合理的预算去实现它。”
  10. 没有撤退计划。“确保无论在系统部署或升级的过程中发生任何事,你都有一份书面的、经过审查的、一致同意的撤退计划,允许你将整个环境恢复到部署之前的状态。”

Eoin Woods是UBS Investment Bank的软件及企业架构师。

查看英文原文:Top Ten Software Architecture Mistakes
posted @ 2007-10-18 19:21 narry 阅读(323) | 评论 (0) | 编辑 收藏
 

2007年10月16日

The SCA V1.0 metamodel
posted @ 2007-10-16 21:10 narry 阅读(322) | 评论 (0) | 编辑 收藏
 

2007年5月18日

被诺顿玩了!!
   今天升级诺顿后,居然导致系统瘫痪了,而且我还重装了,我的资料呀~~~~~~~~,
posted @ 2007-05-18 20:12 narry 阅读(261) | 评论 (0) | 编辑 收藏
 

2007年5月16日

这段时间在学java nio
    这段时间为了能写一个高效的socket server,开始学习java nio,主要的资料是 ibm 《nio 入门》和 《O'Reilly - Java NIO》,现在正在看《O'Reilly - Java NIO》,发现原来java 的i/o操作其实有很多东东呀
posted @ 2007-05-16 18:58 narry 阅读(359) | 评论 (0) | 编辑 收藏
 

2007年5月11日

ftp通信时的指令
今天在一个国外网站看到了ftp通信时的指令,将它贴在这里:

FTP Commands

This document describes all the FTP commands implemented.

ABOR

Aborts the previous FTP service command and any associated transfer of data.

Server Replies

226 ABOR command successful.

ACCT

Provides the user's account. Not used by FtpServer.

Server Replies

202 Command ACCT not implemented.

APPE

Appends data to the end of a file on the remote host. If the file does not already exist, it is created. This command must be preceded by a PORT or PASV command.

Server Replies

501 Syntax error.
550 Not a plain file.
550 Permission denied.
150 Opening data connection.
425 Cannot open data connection.
426 Data connection error.
551 Error on output file.
226 Transfer complete.

AUTH

Establishes SSL encrypted session. Only SSL type is supported.

Server Replies

501 Syntax error.
431 Service is unavailable.
234 AUTH command okay; starting SSL connection.

CDUP

Change to parent directory.

Server Replies

250 Command okay.
550 No such directory.

CWD

Changes the working directory. If directory name is not specified, root directory (/) is assumed.

Server Replies

250 Command okay.
550 No such directory.

DELE

Deletes the file specified by the provided path.

Server Replies

250 Command okay.
450 No permission to delete.
450 Can't delete file.
550 Not a valid file.
501 Syntax error in parameters or arguments.

EPRT

The EPRT command allows for the specification of an extended address for the data connection. The extended address MUST consist of the network protocol as well as the network and transport addresses. The format of EPRT is EPRT |<net-prt>|<net-addr>|<tcp-port>|

Server Replies

501 Syntax error.
510 EPRT is disabled.
510 Syntax error.
553 Host unknown.
510 EPRT IP is not same as client IP.
552 Not a valid port number.
200 EPRT command okay.

EPSV

The EPSV command requests that a server listen on a data port and wait for a connection.

Server Replies

425 Cannot open passive connection.
229 Entering passive mode (<message>).

FEAT

Displays the feature list.

Server Replies

221 List of all the extensions supported.

HELP

Displays the help information.

Server Replies

214 Help information.

LANG

A new command "LANG" is added to the FTP command set to allow server-FTP process to determine in which language to present server greetings and the textual part of command responses.

Server Replies

502 Not yet implemented.

LIST

This command causes a list to be sent from the server to the passive DTP. If the pathname specifies a directory or other group of files, the server should transfer a list of files in the specified directory. If the pathname specifies a file then the server should send current information on the file. A null argument implies the user's current working or default directory. The data transfer is over the data connection. This command must be preceded by a PORT or PASV command.

Server Replies

150 Opening data connection.
425 Cannot open data connection.
426 Data connection error.
551 File listing failed.
501 Syntax error.
226 Closing data connection.

MDTM

Returns the date and time of when a file was modified.

Server Replies

501 Syntax error.
550 File unavailable.
213 <timestamp>

MKD

This command causes the directory specified in the pathname to be created as a directory (if the pathname is absolute) or as a subdirectory of the current working directory (if the pathname is relative).

Server Replies

501 Syntax error.
550 Not a valid file.
550 Already exists.
550 No permission.
250 Directory created.
550 Cannot create directory.

MLSD

Causes a list to be sent from the server to the passive DTP

Server Replies

150 File status okay; about to open data connection.
226 Closing data connection.
425 Can't open data connection.
426 Data connection error.
501 Syntax error in parameters or arguments.
551 File listing failed.

MODE

Set data transfer mode. The valid values are S and Z.

Server Replies

501 Syntax error.
504 Not implemented for this command.
200 Command okay.

NLST

This command causes a directory listing to be sent from server to user site. The pathname should specify a directory or other system-specific file group descriptor; a null argument implies the current directory. The server will return a stream of names of files and no other information.

Server Replies

150 Opening data connection.
425 Cannot open data connection.
426 Data connection error.
551 File listing failed.
501 Syntax error.
226 Closing data connection.

NOOP

No operation.

Server Replies

200 Command okay.

NOOP

Cause the server use optional features for the command specified.

Server Replies

500 Execution failed.
501 Syntax error in parameters or arguments.
502 Command OPTS not implemented for ...
Additional return codes available for different OPTS commands.

PASS

The argument field is a Telnet string specifying the user's password. This command must be immediately preceded by the USER command.

Server Replies

501 Syntax error.
503 Login with USER first.
202 Already logged-in.
421 Maximum anonymous login limit has been reached.
421 Maximum login limit has been reached.
530 Authentication failed.
230 User logged in, proceed.

PASV

This command requests the server-DTP to listen on a data port (which is not its default data port) and to wait for a connection rather than initiate one upon receipt of a transfer command. The response to this command includes the host and port address this server is listening on.

Server Replies

425 Cannot open passive connection.
227 Entering passive mode (<h1,h2,h3,h4,p1,p2>)

PBSZ

protection buffer size.

Server Replies

200 Command okay.

PORT

The argument is a HOST-PORT specification for the data port to be used in data connection. There are defaults for both the user and server data ports, and under normal circumstances this command and its reply are not needed. If this command is used, the argument is the concatenation of a 32-bit internet host address and a 16-bit TCP port address. This address information is broken into 8-bit fields and the value of each field is transmitted as a decimal number (in character string representation). The fields are separated by commas. A port command would be:

PORT h1,h2,h3,h4,p1,p2

Server Replies

501 Syntax error.
510 Syntax error in parameters.
510 Port is disabled.
553 Host unknown.
510 PORT IP mismatch.
552 Invalid port number.
200 Command PORT okay.

PROT

Data channel protection level. The supported level values are C, P.

Server Replies

501 Syntax error.
431 Security is disabled.
504 Server does not understand the specified protection level.
200 Command PROT okay.

PWD

This command causes the name of the current working directory to be returned in the reply.

Server Replies

257 "<current directory>"

QUIT

Closes connection.

Server Replies

200 Goodbye.

REIN

Flushes a user, without affecting transfers in progress

Server Replies

220 Service ready for new user.

REST

The argument field represents the server marker at which file transfer is to be restarted. This command does not cause file transfer but skips over the file to the specified data checkpoint. This command shall be immediately followed by the appropriate FTP service command which shall cause file transfer to resume.

Server Replies

501 Syntax error.
501 Not a valid number.
501 Marker cannot be negetive.
350 Restarting at <position>. Send STORE or RETRIEVE to initiate transfer.

RETR

This command causes the server-DTP to transfer a copy of the file, specified in the pathname, to the server- or user-DTP at the other end of the data connection. The status and contents of the file at the server site shall be unaffected.

Server Replies

501 Syntax error.
550 No such file or directory.
550 Not a plain file.
550 Permission denied.
150 Opening data connection.
425 Cannot open the data connection.
426 Data connection error.
551 Error on input file.
226 Transfer complete.

RMD

This command causes the directory specified in the pathname to be removed as a directory (if the pathname is absolute) or as a subdirectory of the current working directory (if the pathname is relative).

Server Replies

501 Syntax error.
550 No permission.
550 Not a valid directory.
250 Directory removed.
550 Cannot remove directory.

RNFR

This command specifies the old pathname of the file which is to be renamed. This command must be immediately followed by a RNTO command specifying the new file pathname.

Server Replies

501 Syntax error.
550 File unavailable.
350 Requested file action pending further information.

RNTO

This command specifies the new pathname of the file specified in the immediately preceding RNFR command. Together the two commands cause a file to be renamed.

Server Replies

501 Syntax error.
503 Cannot find the file which has to be renamed.
553 Not a valid file name.
553 No permission.
250 Requested file action okay, file renamed.
553 Cannot rename file.

SITE

Handle Apache FTP Server specific custom commands. Please see the SITE commands page.

Server Replies

200 Command SITE okay.
502 Command SITE not implemented for this argument.
500 Execution failed.
530 Access denied.

SIZE

Returns the size of the file in bytes.

Server Replies

501 Syntax error.
550 No such file or directory.
550 Not a plain file.
213 <size>

STAT

This command shall cause a status response to be sent over the control connection in the form of a reply.

Server Replies

211 Statistics information.

STOR

This command causes the server-DTP to accept the data transferred via the data connection and to store the data as a file at the server site. If the file specified in the pathname exists at the server site, then its contents shall be replaced by the data being transferred. A new file is created at the server site if the file specified in the pathname does not already exist.

Server Replies

501 Syntax error.
550 Invalid path.
550 Permission denied.
150 Opening data connection.
425 Cannot open the data connection.
426 Data connection error.
551 Error on output file.
226 Transfer complete.

STOU

This command behaves like STOR except that the resultant file is to be created in the current directory under a name unique to that directory. The 250 Transfer Started response must include the name generated.

Server Replies

550 Unique file name error.
550 Permission denied.
150 Opening data connection.
425 Cannot open the data connection.
250 <file> Transfer started.
426 Data connection error.
551 Error on output file.
226 Transfer complete.

STRU

The argument is a single Telnet character code specifying file structure. The allowed argument is F.

Server Replies

501 Syntax error.
504 Command not implemented.
200 Command okay.

SYST

This command is used to find out the type of operating system at the server.

Server Replies

215 UNIX Type: Apache FTP Server

TYPE

The argument specifies the representation type. The allowed types are A and I.

Server Replies

501 Syntax error.
504 Command not implemented.
200 Command okay.

USER

The argument field is a Telnet string identifying the user. The user identification is that which is required by the server for access to its file system. This command will normally be the first command transmitted by the user after the control connections are made.

Server Replies

501 Syntax error.
230 Already logged-in.
530 Invalid user name.
530 Anonymous connection is not allowed.
421 Maximum anonymous login limit has been reached.
421 Maximum login limit has been reached.
331 Guest login okay, send your complete e-mail address as password.
331 User name okay, need password.



posted @ 2007-05-11 19:27 narry 阅读(4323) | 评论 (1) | 编辑 收藏
 
仅列出标题  下一页