Gatsby develop throws this error: Error: listen EADDRINUSE: address already in use 127.0.0.1:52179 - build

This error starts when I change the time zone of the Wordpress from where the data is pulled via gatsby-source-wordpress plugin. Before I changed the time zone everything was working fine.
The complete error:
C:\Users\XXXX\Documents\XXXX\XXX\2021\www\XXX-www\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
throw ex;
^
Error: listen EADDRINUSE: address already in use 127.0.0.1:51116
at Server.setupListenHandle [as _listen2] (net.js:1318:16)
at listenInCluster (net.js:1366:12)
at GetAddrInfoReqWrap.doListen (net.js:1503:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:8)
Emitted 'error' event on Server instance at:
at emitErrorNT (net.js:1345:8)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
code: 'EADDRINUSE',
errno: -4091,
syscall: 'listen',
address: '127.0.0.1',
port: 51116
}
The development server is deployed, but right after that the app starts to update posts, create categories and other Wordpress data stuff:
info gatsby-source-wordpress update mediaItem getz-150lb (#425)⠀
⠀
info gatsby-source-wordpress create mediaItem tolva-getz-450lb (#445)⠀
⠀
info gatsby-source-wordpress create mediaItem bomba-transfer-co2 (#423)⠀
⠀
info gatsby-source-wordpress create tag getz (#417)
To finally crash throwing the mentioned error.
Gatsby info:
System:
OS: Windows 10 10.0.19042
CPU: (4) x64 Intel(R) Core(TM) i5-4200U CPU # 1.60GHz
Binaries:
Node: 14.15.5 - C:\Program Files\nodejs\node.EXE
npm: 7.5.3 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 90.0.4430.212
Edge: Spartan (44.19041.964.0), Chromium (90.0.818.66)
npmPackages:
gatsby: ^3.4.1 => 3.6.0
gatsby-plugin-google-analytics: ^3.5.0 => 3.6.0
gatsby-plugin-image: ^1.5.0 => 1.6.0
gatsby-plugin-manifest: ^3.5.0 => 3.6.0
gatsby-plugin-react-helmet: ^4.5.0 => 4.6.0
gatsby-plugin-sharp: ^3.5.0 => 3.6.0
gatsby-plugin-sitemap: ^4.1.0 => 4.2.0
gatsby-source-filesystem: ^3.5.0 => 3.6.0
gatsby-source-wordpress: ^5.5.0 => 5.6.0
gatsby-transformer-sharp: ^3.5.0 => 3.6.0
npmGlobalPackages:
gatsby-cli: 3.5.0
Any ideas in how to fix this?
Regards!

According to this GitHub thread the issue is related more to Node dependencies rather than Gatsby.
Try lowering your Node version to 10, remove your node_modules as well as your package-lock.json, and install the dependencies again as the thread suggests.

Try this release gatsby-source-wordpress#5.7.0-alpha-wordpress.0+fe81b6e978 .It will fix the issue, it worked for me and suggested here on github github issue

Stumbled upon this page today when we were having the same issue... at first I completely skimmed over the "WordPress timezone" aspect, but then realized that we had just made the same change on our WordPress.
In my case, I had one post that I had published shortly before the timezone setting change, and that post currently exists with created/modified timestamps in the future. I set that post to "draft" and now gatsby develop is running.

Related

how to start a Redis server on port 6379

i'm getting this error while working with django channels tutorial project
redis:5
docker: Error response from daemon: failed to start service utility VM
(createreadwrite): hcsshim::CreateComputeSystem
9eb1deb8fc69ee2656d9e049530b329c0fa8ca44a1f6523e9d5a27768fbedb62_svm:
The virtual machine could not be started because a required feature is
not installed. (extra info:
{"SystemType":"container","Name":"9eb1deb8fc69ee2656d9e049530b329c0fa8ca44a1f6523e9d5a27768fbedb62_svm","Layers":null,"HvPartition":true,"HvRuntime":{"ImagePath":"C:\\Program
Files\\Linux
Containers","LinuxInitrdFile":"initrd.img","LinuxKernelFile":"kernel"},"ContainerType":"linux","TerminateOnLastHandleClosed":true}).
Seems you have not enabled hyper-V and container.Please check if the hyper-V and container are enabled from control panel => Programs and features => Turn Windows Features on or off
If you have still issue then plese check this answer.

SSL not available in watson-developer-cloud example microphone-speech-to-text.py

Hello i try to get the following example running:
microphone-speech-to-text
I run this python script on Gentoo Linux device with a Python 2.7.6.
The device is connected to the internet via a mobile Hotspot from my mobile phone.
Unfortunately it does not work and get the following output:
Enter CTRL+C to end recording...
Error received: SSL not available.
Connection closed
I ran the script on my windows and it worked fine.
SSL libs are installed:
ldconfig -p | grep ssl
vocon_ssl.so (libc6) => /opt/aldebaran/lib/vocon_ssl.so
libssl.so.1.0.0 (libc6) => /usr/lib/libssl.so.1.0.0
libssl.so (libc6) => /usr/lib/libssl.so
libgnutls-openssl.so.27 (libc6) => /usr/lib/libgnutls-openssl.so.27
libgnutls-openssl.so (libc6) => /usr/lib/libgnutls-openssl.so
libevent_openssl-2.0.so.5 (libc6) => /usr/lib/libevent_openssl-2.0.so.5
If i run another example (speech_to_text_v1)
I get the correct result from watson followed by:
Error received: SSL not available.
Does anybody have an idea what could be the issue here?
Thanks
I could get rid of the "SSL not available" error by
pip install backports.ssl-match-hostname
I got this hint from here.
Also here is mentioned that websocket_client depends on backports.ssl-match-hostname for Python 2.x
After installing the package i got:
Error received: _ssl.c:334: No root certificates specified for verification of other-side certificates.
This could be fixed temporarily by calling disable_SSL_verification() of SpeechToTextV1 before the processing.
To fix it in the long term an approach could be downgrading the websocket-client library to 0.47.0 link1 link2
Another approach to get rid of the "No root certificates specified" Error is setting the Environment variable WEBSOCKET_CLIENT_CA_BUNDLE that is checked by the websocket library.
e.g.
os.environ['WEBSOCKET_CLIENT_CA_BUNDLE'] = '/etc/ssl/certs/ca-certificates.crt'
If I were to hazard a guess it would be that your Gentoo Linux device hasn't been setup with the appropriate TLS / SSL libraries. As a test run a list models request through cURL on your device, as per the API documentation - https://cloud.ibm.com/apidocs/speech-to-text#list-models
curl -X GET -u "apikey:{apikey}" "https://stream.watsonplatform.net/speech-to-text/api/v1/models"
That is going over TLS so, if you can get that to work, you may have better luck with the python application.

SBT buid error:[error] Server access Error: Received fatal alert: access_denied

I have been getting server access denied error.Unable to find the fix.Investigated through web.But none of them worked well.I am using windows7.
C:\Users\thathine>sbt
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; sup
port was removed in 8.0
[info] Loading project definition from C:\Users\thathine\project
[info] Updating {file:/C:/Users/thathine/project/}thathine-build...
[info] Resolving org.scala-lang#scala-library;2.11.8 ...
[error] Server access Error: Received fatal alert: access_denied url=https://rep
o.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.11.8/ivys/iv
y.xml
[error] Server access Error: Received fatal alert: access_denied url=https://rep
o.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-library/2.11.8
/ivys/ivy.xml
my buld.sbtis as follows:
name := "spark_codebase"
version := "1.0"
scalaVersion := "2.11.8"
I am in need to fix this as soon as possible. Please suggest any solution.Thanks in advance.
Please find the versions of scala, java, sbt:
C:\Users\thathine>javac -version
javac 1.8.0_131
C:\Users\thathine>scala -version
Scala code runner version 2.11.8 -- Copyright 2002-2016, LAMP/EPFL
and sbt version is sbt-0.13.15.
After some struggle, found that this issue is because of our company network used some proxy to give restricted access to employees like a firewall. As i was behind a proxy, Maven would fail to download any dependencies.
I got the proxy setings from my companie's IT helpdesk. After using them, It worked finally.I am using windows 7.use the following command line options before using sbt for that session,by replacing [your-ProxyServer] and <port-number> with your actual proxy server and port details.
set JAVA_OPTS=-Dhttp.proxySet=true -Dhttp.proxyHost=[your-ProxyServer] -Dhttp.proxyPort=<port-number> -Dhttps.proxyHost=[your-ProxyServer] -Dhttps.proxyPort=<port-number> -Dftp.proxyHost=[your-ProxyServer] -Dftp.proxyPort=<port-number>
If you are using IDE like IntelliJ or Eclipse:
use the same options under -VM parameters while creating/importing the project.

Something wrong on deploy chaincode for hyperledger v1.0

I have tried to use docker toolbox to setup Hyperledger V1.0 in my local machines.
I according to this document:
http://hyperledger-fabric.readthedocs.io/en/latest/asset_setup.html
But when I tried to deploy chaincode.
$node deploy.js
I got an error message:
info: Returning a new winston logger with default configurations
info: [Chain.js]: Constructed Chain instance: name - fabric-client1, securityEnabled: true, TCert download batch size: 10, network mode: true
info: [Peer.js]: Peer.const - url: grpc://localhost:8051 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca
info: [Peer.js]: Peer.const - url: grpc://localhost:8055 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca
info: [Peer.js]: Peer.const - url: grpc://localhost:8056 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca
info: [Client.js]: Failed to load user "admin" from local key value store
info: [FabricCAClientImpl.js]: Successfully constructed Fabric COP service client: endpoint - {"protocol":"http","hostname":"localhost","port":8054}
info: [crypto_ecdsa_aes]: This class requires a KeyValueStore to save keys, no store was passed in, using the default store C:\Users\daniel\.hfc-key-store
[2017-04-15 22:14:29.268] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:8054]
at ClientRequest.<anonymous> (C:\Users\daniel\node_modules\fabric-ca-client\lib\FabricCAClientImpl.js:304:12)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at Socket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1278:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
[2017-04-15 22:14:29.273] [ERROR] DEPLOY - Error: Failed to obtain an enrolled user
at ca_client.enroll.then.then.then.catch (C:\Users\daniel\helper.js:59:12)
at process._tickCallback (internal/process/next_tick.js:103:7)
events.js:160
throw er; // Unhandled 'error' event
^
Error: Connect Failed
at ClientDuplexStream._emitStatusIfDone (C:\Users\daniel\node_modules\grpc\src\node\src\client.js:201:19)
at ClientDuplexStream._readsDone (C:\Users\daniel\node_modules\grpc\src\node\src\client.js:169:8)
at readCallback (C:\Users\daniel\node_modules\grpc\src\node\src\client.js:229:12)
Is this an question about unable to connect to ca? Or other causes?
Edit:
Environment:
OS: Windows 10 Professional Edition
Docker Toolbox: 17.04.0-ce
Go: 1.7.5
Node.js: 6.10.0
My steps:
1.Open Docker Quickstart Terminal and key commands.
$curl -L https://raw.githubusercontent.com/hyperledger/fabric/master/examples/sfhackfest/sfhackfest.tar.gz -o sfhackfest.tar.gz 2> /dev/null; tar -xvf sfhackfest.tar.gz
$docker-compose -f docker-compose-gettingstarted.yml build
$docker-compose -f docker-compose-gettingstarted.yml up -d
$docker ps
It has been confirmed that six containers have been activated
2.Download examples and install modules.
$curl -OOOOOO https://raw.githubusercontent.com/hyperledger/fabric-sdk-node/v1.0-alpha/examples/balance-transfer/{config.json,deploy.js,helper.js,invoke.js,query.js,package.json}
//This link didn't work, so I downloaded the required files from GitHub of fabric-sdk-node
$npm install --global windows-build-tools
$npm install
3.Try to deploy chaincode.
$node deploy.js
There were several problems, not the least of which that documentation was outdated and was for a preview release of Hyperledger Fabric. The docs are actually in the process of being removed as we need to update our examples / samples.
You mentioned Docker Toolbox - so are you trying to run all of this on Windows or Mac?
UPDATE:
So one of the issue with Docker Toolbox or Docker for Windows is that you cannot use localhost / 127.0.0.1 as the address when trying to communicate from apps on the host (even in the QuickStart Terminal) to the endpoints of the Docker containers. When the QuickStart Terminal first launches Docker, you'll see that it will output the IP address of the endpoint you should use when communicating with exposed ports.
I was having the same issue while following the latest "Writing Your First Application" tutorial (http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html). I had installed all the pre-requisites and the fabric-samples and started the local network.
When I got to the step of enrolling the Admin user, $ node enrollAdmin.js, I was getting the same error message as above, Error: connect ECONNREFUSED, followed by the localhost domain.
As the first answer suggests, the root cause is that I'm running Docker Toolbox. I'm developing on an older Mac, OSX v10.9.5, so I couldn't use Docker for Mac.
To fix the issue, I replaced 'localhost' in the enrollAdmin.js code with the IP from Docker Toolbox.
Here are the steps I took:
Started Docker with Applications > Docker Quickstart Terminal
Copied the IP from this sentence: docker is configured to use the default machine with IP...
Opened the copy of enrollAdmin.js from fabric-samples/fabcar directory
Found this code:
// be sure to change the http to https when the CA is running TLS enabled
fabric_ca_client = new Fabric_CA_Client('http://localhost:7054', tlsOptions , 'ca.example.com', crypto_suite); // <-- This is the line to change
Replaced 'localhost' with the Docker IP, leaving the port :7054 as is.
Saved
Re-ran the command, $ node enrollAdmin.js
The script connected to the CA and successfully completed the Admin enrollment.
On to the next step!

Rails 4 fails to load assets in dev

In production all works fine. I am using a Mac Book Pro as dev env.
In development I am getting these (several) errors:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
When trying to load from http://localhosts:8080/assets ...
Not sure why rails is not loading from public/assets?
What is wrong here?
And after restarting the server I am getting this error:
Errno::EINVAL
Invalid argument
connection.connect_unix(config[:path], connect_timeout)
else
connection.connect(config[:host], config[:port], connect_timeout)
end
instance = new(connection)
What is wrong with my dev env?
I uninstalled the rack-cors gem.
Problem solved.