分类 默认分类 下的文章

windows 端口占用

之前曾发现过windows上 skype 偷偷占用8080端口, 导致本地tomcat 无法启动的问题, 今天竟然发现即使eclipse关掉之后, 竟然后台还有一个进程, 名字叫 javaw.exe, 同时它还绑定了8080端口.
怎么在windows 上找到这个进程并且杀死它?
1) 通过端口找到进程ID

netstat -aon | findstr "8080"

2) 通过进程ID 找到进程名字

tasklist | findstr "14869"

然后任务管理器杀死它

eclipse tomcat 启动 timeout issue

今天启动tomcat 的时候, 遭遇如下错误:

Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.

解决:
双击 server, 弹出 server 编辑器, 修改 timeout 数值.

状况:
serverTimeout1.png
解决:
serverTimeout2.png

html 页面内容不能选中, 不能复制

今天查看一朋友所在公司官方主页的联系我们页面, 发现竟然这个页面的内容竟然不能copy.
百度了一下, 竟然是有这么一段代码:

<body oncontextmenu="return false" ondragstart="return false" onselectstart="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false">

里面的内容大概就是不准复制, 不准copy, 不能拖拉...

不过这个页面适得其反, 不能copy, 人家连你那么长的地址都要自己敲出来, 不能copy 真还是麻烦.

Message - RabbitMQ - Clustering

  • RabbitMQ clustering 就是把物理上的多个 RabbitMQ 的 server instance 组成一个逻辑上的 RabbitMQ server instance.
  • Clustering 有效的避免了 hardware failure 导致的系统信息丢失
  • all definitions (of exchanges, bindings, users, etc) are mirrored across the entire cluster.
  • Queues behave differently, by default residing only on a single node, but optionally being mirrored across several or all nodes. Queues remain visible and reachable from all nodes regardless of where they are located.

Message - RabbitMQ - AMQP

  • RabbitMQ 使用AMQP 协议, AMQP 是 Advanced Message Queuing Protocol 的缩写;
  • AMQP 这个网络协议, 称消息中间件为 Broker. Broker 从 producer/publisher 接收消息, 然后 route 到特定的 consumer/Subscriber
  • AMQP 的模型简图

请输入图片描述

  • AMQP 的 broker 内部的概念有: exchange, route, queue, binding, routeKey, exchange type, ack, confirm.
  • 当一个Message 不能被 route 的时候, Broker 可以返回给 producer, 或者丢弃, 或者扔到一个特殊的队列.
  • AMQP 是一个 programable(可编程) 的协议, 是因为, client 可以定义声明 exchange, queue, binding, 而不是Administer 在 server 上定义. 同时可能出现的问题是: 定义冲突.
  • AMQP 定义了4种 exchange type: direct, fanout, topic, header. Borker route 算法根据 exchange 类型和 binding 有不同.
  • AMQP 的 Connection 是典型的长连接. 一个连接内建立多个 Channel.
  • 一个 AMQP 的 broker 可以 host 多个分开的环境, 每个环境称之为一个 virtual host