ENOENT with nodejs mysql and sequelize - mysql

I have struggled with this for a few days and cannot figure out what is wrong.
I am using:
-node.js 0.10.4
-mysql 5.5.29
-node mysql 2.0.0.alpha7
-node sequelize 1.6.0
When I try to execute any queries, I get an error message with ENOENT somewhere in it. From my research it seems like that is a generic node error message for a filesystem issue like a file not existing or insufficient permissions. I have checked and my credentials are correct. So, my create statements fail and then when my app goes to query the database, no tables exist and I get something like:
Error: connect ENOENT
at errnoException (net.js:883:11)
at Object.afterConnect [as oncomplete] (net.js:874:19)
--------------------
at Handshake.Sequence (/home/greg/snipit/node_modules/mysql/lib/protocol/sequences/Sequence.js:15:21)
at new Handshake (/home/greg/snipit/node_modules/mysql/lib/protocol/sequences/Handshake.js:9:12)
at Protocol.handshake (/home/greg/snipit/node_modules/mysql/lib/protocol/Protocol.js:41:50)
at Connection.connect (/home/greg/snipit/node_modules/mysql/lib/Connection.js:63:18)
at Connection._implyConnect (/home/greg/snipit/node_modules/mysql/lib/Connection.js:162:10)
at Connection.query (/home/greg/snipit/node_modules/mysql/lib/Connection.js:88:8)
at module.exports.connect (/home/greg/snipit/node_modules/sequelize/lib/dialects/mysql/connector-manager.js:247:16)
at Object.pool.Pooling.Pool.create (/home/greg/snipit/node_modules/sequelize/lib/dialects/mysql/connector-manager.js:111:19)
at dispense (/home/greg/snipit/node_modules/sequelize/node_modules/generic-pool/lib/generic-pool.js:216:17)
at Object.me.acquire (/home/greg/snipit/node_modules/sequelize/node_modules/generic-pool/lib/generic-pool.js:260:5)
What type of thing usually causes this? Thanks so much.

I checked the way I was making my connections, and it turns out I had a typo. My application reads in credentials from a json file, but I was accidentally passing the mysql password I read in to my connection as the port to connect on! So I was trying to connect at localhost:'password'. haha. This explains why half of my workers were experiencing no issue... they has no mysql password and so the connection port was defaulting.

Related

How can I solve Error: connect ECONNREFUSED 127.0.0.1:3306?

If I run adonis migration:run, there exist error like this :
I using xampp
My env like this :
I using adonis js
It seems that the settings are correct, but why does the error still appear
How can I solve this problem?

jhipster - create front end only

I am trying to generate a jhipster application but i only want the frontend .... the command I am running is
jhipster --skip-server --auth jwt
The error i get it
events.js:173
throw er; // Unhandled 'error' event
^
Error: ERROR! When using skip-server flag, you must pass a database option and authentication type using --db and --auth flags
at Environment.error (C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-environment\lib\environment.js:157:40)
at module.exports.error (C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\generators\generator-base.js:1488:18)
at module.exports.validateSkipServer (C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\generators\client\index.js:159:26)
at Object.<anonymous> (C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:418:27)
at C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\run-async\index.js:25:25
at new Promise (<anonymous>)
at C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\run-async\index.js:24:19
at self.env.runLoop.add.completed (C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:419:13)
at processImmediate (timers.js:637:19)
Emitted 'error' event at:
at Immediate.setImmediate (C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:427:22)
at processImmediate (timers.js:637:19)
But i dont want a DB at all i just need a nice front end application
Ive just tried with --db sql,
then changed path in webpack.common.js SERVER_API_URL:
working fine.
So this key says what db is on your backend, and yes, it's confusing.

Firebase functions logging with winston papertrail gives ECONNRESET error

When developing node-js app's I enjoy using winston logging in combination with papertrail (a logging SaaS provider).
I can get the logging from firebase-functions working with papertrail, however, my problem is that when the functions instance is closing down, winston-papertrail throws an error:
Papertrail connection error: { Error: read ECONNRESET
at exports._errnoException (util.js:1020:11)
at TLSWrap.onread (net.js:580:26) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
I try to close down the winston-papertrail with code like this, at the end of my functions:
logger.close();
However the errors arrive in the firebase console like this:
I would love to know if anyone has a working setup with no errors, or could maybe point me in the right direction.

How to Fix Mediawiki Confirm Account Extension Error qmail-inject: fatal: unable to parse this line:

I have an instance of mediawiki installed with an extension called Confirm Account. This works fine on my MAMP setup at home. On my MediaTemple.net account I get this error when the extension is run:
Error sending mail:Unknown error in PHP's mail() function.
The server error log error is:
qmail-inject: fatal: unable to parse this line: Return-Path:apache# 216.70.110.23:7081
I have no idea what to do to fix this.
Thank you.
Set $wgPasswordSender to some meaningful email address.

Reindexing error in 1.6 (PHP exception in indexer.php)

Recently I upgraded from 1.4.2 to 1.6.2. Things actually went fairly smoothly, which was relatively surprising. Until I tried to reindex my store. Using the GUI backend gives me the typical no help "Cannot Initialize the indexer process" message. So I tried running indexer.php from the command line (php shell/indexer.php reindexall) which gives me this error:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' in /home/shopchau/public_html/stage/lib/Zend/Db/Adapter/Pdo/Abstract.php:129
Stack trace:
0 /home/shopchau/public_html/stage/lib/Zend/Db/Adapter/Pdo/Abstract.php(129): PDO->__construct('mysql:model=mys...', 'shopchau_stage', 'gr8target', Array)
1 /home/shopchau/public_html/stage/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
2 /home/shopchau/public_html/stage/lib/Varien/Db/Adapter/Pdo/Mysql.php(300): Zend_Db_Adapter_Pdo_Mysql->_connect()
3 /home/shopchau/public_html/stage/lib/Zend/Db/Adapter/Abstract.php(459): Varien_Db_Adapter_Pdo_Mysql->_connect()
4 /home/shopchau/public_html/stage/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
5 /home/shopchau/public_html/stage/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
in /home/shopchau/public_html/stage/lib/Zend/Db/Adapter/Pdo/Abstract.php on line 144
Now I've tried the various fixes here: delete the locks, delete cache, fixing file permissions, and running checks to see if my DB is corrupt. Far as I can tell, everything else is working. Nothing so far, has helped this issue.
Anyone have any ideas/fixes?
That exception tells about connection problem. Are you sure MySQL uses /var/lib/mysql/mysql.sock socket? Try changing it to /tmp/mysql.sock. You can adjust this in your local.xml