错误信息: console.log(“node: …/deps/uv/src/unix/stream.c:1329: uv_read_stop: Assertion `!uv__io_active(&stream->io_watcher, 4) || !(&stream->write_completed_queue == (&stream->write_completed_queue)->prev) || !(&stream->write_queue == (&stream->write_queue)->prev) || stream->shutdown_req != ((void *)0) || stream->connect_req != ((void *)0)’ failed. ’)”
app.js
var express=require("express");
var http=require("http");
var bodyParser = require('body-parser');
var DBTool=require("./DBTool");
var log4j=require('./Log4j');
var app=express();
app.set('port', '4005');
log4j.use(app);
app.use(express.static('public'));
app.use(bodyParser.json());
app.use("/favicon.ico",function(req,res){
res.send();
});
app.post("/insert",function(req,res){
var sql=" INSERT INTO list (`company`, `name`, `count`, `time`) VALUES ( ?,?,?,?)";
var options=req.body;
if(!options.company || !options.name || !options.count || !options.time){
res.send({status:"500","data":"请将内容填写完整!"});
}
var param=[
options.company?options.company:null,
options.name?options.name:null,
options.count?options.count:null,
options.time?options.time:null
]
console.log(param)
DBTool.Execute(sql,param,function(err,datas){
if(err){
res.send({status:"500","exception":"插入出错了!"});
}
res.send({status:"200","data":"添加成功!"})
})
})
http.createServer(app).listen(app.get('port'), function(){
console.log(">>服务器已启动,端口号:" + app.get('port'));
});
//捕获系统异常
process.on('uncaughtException', function (err) {});
\n```
node: …/deps/uv/src/unix/stream.c:1329: uv_read_stop: Assertion `!uv__io_active(&stream->io_watcher, 4) || !(&stream->write_completed_queue == (&stream->write_completed_queue)->prev) || !(&stream->write_queue == (&stream->write_queue)->prev) || stream->shutdown_req != ((void *)0) || stream->connect_req != ((void *)0)
这个是什么错误呢 ?求大牛帮忙下
接口就一个应该没问题, 这个主要是一个静态网站,最后报错日志如下:(linux时间不准确) … [36m[2015-03-13 08:44:22.106] [DEBUG] OpenServer - [39mGET /Tools/MoCoop/img/back.png [36m[2015-03-13 08:44:22.173] [DEBUG] OpenServer - [39mGET /Tools/MoCoop/img/forward-grey.png [36m[2015-03-13 08:44:27.429] [DEBUG] OpenServer - [39mGET /img/test2.jpg [36m[2015-03-13 08:44:27.560] [DEBUG] OpenServer - [39mGET /img/test2.jpg [36m[2015-03-13 08:45:00.404] [DEBUG] OpenServer - [39mGET /index.html?from=timeline&isappinstalled=0 [36m[2015-03-13 08:45:00.507] [DEBUG] OpenServer - [39mGET /Tools/MoCoop/MoCoop.css [36m[2015-03-13 08:45:00.565] [DEBUG] OpenServer - [39mGET /css/style.css [36m[2015-03-13 08:45:00.913] [DEBUG] OpenServer - [39mGET /Tools/jquery-2.1.3.js [36m[2015-03-13 08:45:00.922] [DEBUG] OpenServer - [39mGET /Tools/Ractive.js [36m[2015-03-13 08:45:00.952] [DEBUG] OpenServer - [39mGET /js/pages/index.js [36m[2015-03-13 08:45:00.959] [DEBUG] OpenServer - [39mGET /js/common.js [36m[2015-03-13 08:45:00.960] [DEBUG] OpenServer - [39mGET /Tools/MoCoop/MoCoop.js [36m[2015-03-13 08:45:00.963] [DEBUG] OpenServer - [39mGET /js/dataInterface.js [36m[2015-03-13 08:45:04.790] [DEBUG] OpenServer - [39mGET /img/test2.jpg [36m[2015-03-13 08:45:04.794] [DEBUG] OpenServer - [39mGET /img/bg.png [36m[2015-03-13 08:45:04.928] [DEBUG] OpenServer - [39mGET /Tools/fastclick.js node: …/deps/uv/src/unix/stream.c:1329: uv_read_stop: Assertion `!uv__io_active(&stream->io_watcher, 4) || !(&stream->write_completed_queue == (&stream->write_completed_queue)->prev) || !(&stream->write_queue == (&stream->write_queue)->prev) || stream->shutdown_req != ((void *)0) || stream->connect_req != ((void *)0)’ failed.