Comments (12)
Maybe you have too many open tabs? Are you closing the tabs you're not using?
"After running for a while" means about how long?
from nickjs.
I always close the tab.
After crawling 10 web site, I get this error message.
from nickjs.
Does it happen on other websites? Is the website so heavy that maybe you have no memory left? What have to tried? Thx
from nickjs.
No it dose not happened on other website.
Then, my server has 8G memory and the memory is always 3G left as well as swap not being happened.
Also, now the error happens sometimes, not often.
This is bit weird for me.
from nickjs.
Possibly, we wait and see how things go.
from nickjs.
Maybe start NickJS in debug mode (debug: true
in constructor) and we can see some output showing us what's wrong
from nickjs.
Sorry for late reply.
I got following errors.
2019-12-12 12:28 : CHROME STDERR: [1212/122838.971585:ERROR:socket_posix.cc(145)] bind() failed: address already in use (98)
DevTools listening on ws://[::1]:9222/devtools/browser/98a1a41d-1cb9-4a6c-97e8-ca7cdb590840
2019-12-12 12:28 : > It took 103ms to start and connect to Chrome (1 tries)
2019-12-12 12:28 : Error: could not list chrome tabs: Error: connect ECONNREFUSED 127.0.0.1:9222
2019-12-12 12:28 : CHROME STDERR:
DevTools listening on ws://127.0.0.1:9222/devtools/browser/833f02dc-74f5-484f-930e-5e5b4881d26b
2019-12-12 12:28 : > It took 256ms to start and connect to Chrome (2 tries)
from nickjs.
Well, it looks like the 9222 port is already in use on your system. Maybe you already have Chrome running with debug enabled, even though NickJS tries to start a new one?
A fix would be to disable debug mode on this other Chrome instance, or at least change the port (which is one of the cmd line options of Chrome).
from nickjs.
@paps
Thanks for your reply.
I finally found the reason why I am getting these errors every time I access to my crawler.
I use pm2 for load balancing node process and port collision occurs because of multiple node process.
Dose nickJS has options for the port number?
from nickjs.
Oh ok, I see. That means your node instances are started with debugging enabled right?
You can use additionalChildOptions
(array of command line parameters) to change how Chrome is started in NickJS (this only works in the latest version, please update if necessary). But I'm afraid you will not be able to change the port number this way, this is one of the hardcoded options of NickJS. You will need to free port 9222 somehow. Or submit a PR :)
from nickjs.
@paps
Thanks for that.
I will take a look at that option and see if I can change port number as well as submitting PR :)
from nickjs.
@paps
Hi there,
I just had quick look at your source code and I understand what the hardcoded options mean.
This sort of option should be optionally set when it is constructed or after initialized.
I will have a look at this issue after the long holiday.
Happy Holiday :)
from nickjs.
Related Issues (20)
- Is it possible to change userAgent? HOT 1
- Running NickJs in node:9-alpine HOT 1
- Features that would be nice HOT 2
- calling nick.exit() closes chrome process and node process HOT 2
- Cannot open two node instances HOT 1
- Independent tabs with PhantomJS HOT 1
- I have a question for many requests HOT 3
- Acessing frame elements HOT 1
- Phantombuster api-store source removed? HOT 2
- Trying to save content with fs.writeFile HOT 2
- Help request: Struggling to do what feels like fairly basic push 'show more' button and scroll HOT 3
- Setting environment variables on PHP / Ubuntu HOT 8
- Using jQuery instead of querySelector on Tab HOT 1
- Error: timeout: load event did not fire after xxx ms HOT 1
- I have a lot of same error[you may have forgotten to catch a Promise rejection] HOT 3
- Ability to set custom Chrome flags on NickJS constructor
- Drivers/browser
- site data
- Question about this project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nickjs.