GRPC - nodejs DNS resolution failed - node.js

I'm working with a GRPC service hosted with HTTPS and self-signed cert. When I connect using syntax like:
const client = new productService('https://grpc-server-xxx.com:9090',
grpc.credentials.createInsecure())
I am getting the error like this
{ Error: 14 UNAVAILABLE: DNS resolution failed
at Object.exports.createStatusError (C:\grpc\node_modules\grpc\src\common.js:91:15)
at Object.onReceiveStatus (C:\grpc\node_modules\grpc\src\client_interceptors.js:1209:28)
at InterceptingListener._callNext (C:\grpc\node_modules\grpc\src\client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (C:\grpc\node_modules\grpc\src\client_interceptors.js:618:8) at callback (C:\grpc\node_modules\grpc\src\client_interceptors.js:847:24)code: 14,metadata: Metadata { _internal_repr: {}, flags: 0 },details: 'DNS resolution failed'
Anyone help me how can I resolve the issue.
Note:
My OS is Windows 10,
nodejs -- v10.16.0,
GRPC

The gRPC library does not recognize the https:// scheme for addresses, so that target name will cause it to try to resolve the wrong name. You should instead use grpc-server-xxx.com:9090 or dns:grpc-server-xxx.com:9090 or dns:///grpc-server-xxx.com:9090. More detailed information about how gRPC interprets channel target names can be found in this documentation page.

Noob mistake, but I did it.
Make sure your IP address is 0.0.0.0:9090 and not 0.0.0.0.9090

Related

Problem with rabbitmq when starting service (Linux)

Does anyone knows how to fix this?
error that the service gives when trying to start:
Process terminated. Fatal error detected: RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable
RabbitMQ.Client.Exceptions.OperationInterruptedException: The AMQP operation was interrupted: AMQP close-reason, initiated by Library, code=541, text='Unexpected Exception', cla...
System.Net.Sockets.SocketException (104): Connection reset by peer
rabbitmq log:
{handshake_error,opening,0, {amqp_error,access_refused, "access to vhost '/hostname' refused for user 'admin2'", 'connection.open'}}
tell me what can be done?
I made trough the rabbitmq web interface new vhost and user, made an access to the vhost, did not help

Receiving "EPROTO" when HTTPS requests with Node 10

a few days ago i moved my frontend with NextJS to Vercel and i started experiencing this following intermittent error during build and production server. So i searched all over the internet but i cannot find the solution.
I am receiving the following error when my App tries to make HTTPS request:
Compiled successfully.
09:47:13.026 Automatically optimizing pages...
09:47:15.212 Error at BlogService.getRecentPosts, details: Error: request to https://**masked** failed, reason: write EPROTO 140256911292224:error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1550:SSL alert number 80
09:47:16.629 Error at getStaticProps on Homepage, details: Error: write EPROTO 140657767638848:error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1550:SSL alert number 80
09:47:16.654 Error at BlogService.getRecentPosts, details: Error: request to https:/**masked** failed, reason: write EPROTO 139955108906816:error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1550:SSL alert number 80
The backend destination is using a Nginx with Reverse Proxy with LetsEncrypt Certificate
So anybody can help me? I never experienced this issue
UPDATE
I changed my backend to AWS Api Gateway but the issue remains.
I already changed my frontend to just make Https requests using TLS 1.2, and the error remains intermittent
Anybody help me?

Dialogflow NodeJS library issue

I'm working on a dialogflow POC where I'm trying to invoke the v2 API provided by DialogFlow. While trying the NodeJS code example provided here, I'm getting the below error
{ Error: EHOSTUNREACH undefined: Getting metadata from plugin failed with error: request to https://www.googleapis.com/oauth2/v4/token failed, reason: connect EHOSTUNREACH 0.0.38.172:80 - Local (192.168.0.103:51468)
at Object.callErrorFromStatus (/Users/devuser/Development/workspaces/df-poc/node_modules/#grpc/grpc-js/build/src/call.js:30:26)
at Http2CallStream.call.on (/Users/devuser/Development/workspaces/df-poc/node_modules/#grpc/grpc-js/build/src/client.js:96:33)
at Http2CallStream.emit (events.js:203:15)
at process.nextTick (/Users/devuser/Development/workspaces/df-poc/node_modules/#grpc/grpc-js/build/src/call-stream.js:75:22)
at process._tickCallback (internal/process/next_tick.js:61:11)
code: 'EHOSTUNREACH',
details:
'Getting metadata from plugin failed with error: request to https://www.googleapis.com/oauth2/v4/token failed, reason: connect EHOSTUNREACH 0.0.38.172:80 - Local (192.168.0.103:51468)',
metadata: Metadata { internalRepr: Map {}, options: {} } }
I have imported GOOGLE_APPLICATION_CREDENTIALS and point the environment variable to the credentials. The invocation works fine if I try the REST API route with the Authorization header.
Kindly let me know if there is something which I'm missing here.
This means EHOST (the remote host of the files you are requesting) are unreachable. They are either down, or your computer cannot access them due to some other restriction, such as location, which can be solved with a VPN.

Error reading from 192.168.1.164:44214: rpc error: code = Canceled desc = context canceled

i got this error when i am trying to connect peers running in different machines .I found this error in docker logs of orderer.There is an error in docker logs of peer2 running in different machine
Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050]
You can find the orderer.yaml file at fabric-samples/config folder.
Going through the fields and their respective comments in orderer.yaml and core.yaml can help you to understand the method of configuring the network(orderer/peer).
And here you can get the info related to TLS.

Chef-server-ctl reconfigure/ Creating Admin User on chef server

I am fairly new to Linux (and brand new to chef) and I have ran into an issue when setting up my chef server. I am trying to create an admin user with the command
sudo chef-server-ctl user-create admin Admin Ladmin admin#example.com
examplepass -f admin.pem
but after I keep getting this error:
ERROR: Connection refused connecting...
ERROR: Connection refused connecting to https://127.0.0.1/users/, retry 5/5
ERROR: Network Error: Connection refused - Connection refused
connecting to https://..., giving up
Check your knife configuration and network settings
I also noticed that when I ran chef-server-ctl I got this output:
[2016-12-21T13:24:59-05:00] ERROR: Running exception handlers Running
handlers complete
[2016-12-21T13:24:59-05:00] ERROR: Exception
handlers complete Chef Client failed. 0 resources updated in 01 seconds
[2016-12-21T13:24:59-05:00] FATAL: Stacktrace dumped to
/var/opt/opscode/local-mode-cache/chef-stacktrace.out
[2016-12-21T13:24:59-05:00] FATAL: Please provide the contents of the
stacktrace.out file if you file a bug report
[2016-12-21T13:24:59-05:00] FATAL:
Chef::Exceptions::CannotDetermineNodeName: Unable to determine node
name: configure node_name or configure the system's hostname and fqdn
I read that this error is due to a prerequisite mistake but I'm uncertain as to what it means or how to fix it. So any input would be greatly appreciated.
Your server does not have a valid FQDN (aka full host name). You'll have to fix this before installing Chef server.

Resources