Can any explain how to solve these error in kafka-node when connecting to Node.js - kafka-node

C:\Users\local-folder\node\kafka-trial\server\routes\index.js:26const kafka = new Kafka({
^
TypeError: Kafka is not a constructor
When I remove the new and the error is function not working

Related

Istio Primary Remote multi cluster error - unsupported service type ExternalName

I followed here.
In next step(verify the installation),
When I create deployment in cluster2(remote cluster), sidecar injector not working like below...
kubectl get event -n sample
LAST SEEN TYPE REASON OBJECT MESSAGE
42m Warning FailedCreate replicaset/helloworld-v2-79bf565586 Error creating: Internal error occurred: failed calling webhook "namespace.sidecar-injector.istio.io": failed to call webhook: Post "https://istiod.istio-system.svc:443/inject/cluster/cluster2/net/network1?timeout=10s": unsupported service type "ExternalName"
2m45s Warning FailedCreate replicaset/helloworld-v2-79bf565586 Error creating: Internal error occurred: failed calling webhook "namespace.sidecar-injector.istio.io": failed to call webhook: Post "https://istiod.istio-system.svc:443/inject/cluster/cluster2/net/network1?timeout=10s": unsupported service type "ExternalName"
53m Normal ScalingReplicaSet deployment/helloworld-v2 Scaled up replica set helloworld-v2-79bf565586 to 1
41m Normal ScalingReplicaSet deployment/helloworld-v2 Scaled up replica set helloworld-v2-79bf565586 to 1
Is this issue about firewalld ? (I used AWS EKS v1.24)
When I searched something about this, Other people's message is context deadline exceeded in here...
Can anybody help me? :(
Search Internet, and re install istio at all...

MassTransit - Socket exception with AmazonMQ when starting bus

I'm trying to get a basic PoC app running with MassTransit using our Amazon MQ instance, and running into the following problem when I call StartAsync on IBusControl:
MassTransit.ActiveMqTransport.ActiveMqConnectException: Connection exception: (user)#(host)
---> Apache.NMS.NMSConnectionException: Error connecting to (host) ---> System.Net.Sockets.SocketException (0xFFFFFFFE): Unknown error (0xfffffffe)
at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.DoConnect(String host, Int32 port, String localAddress, Int32 localPort)
Note: In the exception above, I've edited the items in bold to remove sensitive information. We know that the credentials we are using are in fact correct since we have integration tests for NMS and ActiveMq that use the same credentials. But when trying to connect using MassTransit, we get the above error.
I've tried a number of different approaches but they all produce the same result. Here's some example code to give a general idea of how we're trying to connect:
var busControl = Bus.Factory.CreateUsingActiveMq(configurator =>
{
configurator.Host(host, activeMqHostConfigurator =>
{
activeMqHostConfigurator.Username(activeMqConfiguration.UserName);
activeMqHostConfigurator.Password(activeMqConfiguration.Password);
});
});
await busControl.StartAsync(new CancellationTokenSource(TimeSpan.FromSeconds(10)).Token);
The call to StartAsync is what throws the exception. I have my doubts that this is an issue with MassTransit, it's more likely something that I'm missing but I cannot see what's wrong, and I've had my team review it as well.
As I mentioned in my comment this ended up not being related to MassTransit. It was due to the host being inactive.

How to connect ioredis to google cloud function?

I am currently running some Google Cloud functions (in typescript) that require a connection to a Redis instance in order to LPUSH into the queue (on other instances, I am using Redis as a queue worker).
Everything is fine, except I am getting a huge number of ECONNECTRESET and ECONNECTIMEOUT related errors despite everything working properly.
The following code can execute successfully on the cloud function but still, I am seeing constant errors thrown related to the connection to the Redis.
I think it is somehow related to how I am importing my client- ioredis. I have utils/index.ts, utils/redis.js and inside the redis.js I have:
const Redis = require('ioredis');
module.exports = new Redis(6380, 'MYCACHE.redis.cache.windows.net', { tls: true, password: 'PASS' });
Then I am importing this in my utils/index.ts like so: code missing
And exporting some aysnc function like: code missing
When executing in the GCF environment, I get the # of expected results in results.length and I see (by monitoring the Redis internally) this list was pushed as expected to the queue.
Nevertheless, these errors continue to appear incessantly.
ioredis] Unhandled error event: Error: read ECONNRESET at _errnoException (util.js:1022:11) at TLSWrap.onread (net.js:628:25)

Getting error while adding connection factory in HermesJMS

I am getting an error while adding 'Connection factory' in 'HermesJMS'.
What could be reason for this error?
Error:
'javax.naming.NamingException: org.xml.sax.SAXNotRecognizedException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.'

FlowGear Droppoint error

I'm getting the following error when trying to Test a SQL connection via a droppoint:
DropPoint Invoke Error: Unable to instance node SqlQuery 2.1.0.6:
Decryption failed: Padding is invalid and cannot be removed.
How do I fix this?
This indicates that either the transport or the stored Node at the DropPoint is corrupt. A DropPoint restart should resolve this but it's strongly recommended that you upgrade to the new WebSockets-based DropPoints which can be downloaded from the Console. More at https://developers.flowgear.net/kb/DropPoint