- check DNS server configuration to see if there is a record for the server.
- check /etc/resolv.conf file to see if the DNS server is correct, and if there is a domain,
- search <domainName> (if there is no this line, need to check /etc/sysconfig/network-script/ifcfg-eth0 to see if there is a "DOMAIN=<domain server ip>" existed
- nameserver <ipaddress>
Thursday, 29 January 2015
I can ping ip, but failed to ping hostname on redhat linux
Thursday, 22 January 2015
How to use findByIdAndUpdate on mongdb2.4
backbone client update a model property:
ocase.save({ currentStep : theStep },callback);
server side mongoose code :
OCase.findByIdAndUpdate(req.params.id,
req.body, callback);
it works fine on mongodb2.6, but it doesn't work on mongodb2.4, and the error is :
update err:MongoError: exception: Mod on _id not allowed
so I tried to remove "_id",and only save other attributes:
OCase.findByIdAndUpdate(req.params.id,
{subject : req.body.subject,
description : req.body.description
},callback);
then I got another error :
update err:TypeError: Cannot read property '_id' of undefined
I am really confused, what can I do now?
Finally, I have to query(findById) the document first, and then call "save" method to update.
OCase.findById(req.params.id,
function(err,ocase){
ocase.set(req.body);
ocase.save(function(err,ocase){
res.send(ocase);
});
});
com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=T0.TASK_MODE, DRIVER=3.65.77
com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=T0.TASK_MODE, DRIVER=3.65.77
=-==============================
Column "T0.TASK_MODE" is not existed.
=-==============================
Column "T0.TASK_MODE" is not existed.
Subscribe to:
Posts (Atom)