Cannot start multiple nodes for RabbitMQ cluster on Windows - node.js

I am trying to setup multiple RabbitMQ nodes in Windows environment. Based on the official guide, I am setting up 2 nodes but that's where problem starts to occur.
My first node is successfully created and up and running. But I cannot start 2nd node.
Check below output. ( All the commands are executed from Admin cmd. Erlang and python is also present. All precautionary steps are taken as per guide along with management plugin.)
You can see above, that my "hare" node is running. But second node "rabbit " fails to start.
I also replaced cookie as per stack-overflow similar question. Still the problem persists.
Any help is appreciated. Thanks.

For anyone facing similar problem, I changed my approach and was successfully able to run rabbitmq cluster.
I moved my cluster to Linux and faced no problems. Although it did satisfy my current needs; any solution to above problem is welcome.
Cheers.

Related

Deploying simpleStorage contract with Kaleido

I have been following this tutorial to connect the consortium i have created using the Kaleido UI to truffle: link . When i finally do : ./truffle_migrate.sh
it gets stuck in there, here is the output:
$ ./truffle_migrate.sh
+ truffle migrate --network supnode --reset Using network 'supnode'.
Running migration: 1_initial_migration.js Saving artifacts... Running
migration: 2_deploy_simplestorage.js Deploying SimpleStorage...
... 0xd6d9cfe1ab5b01abb759fb8280920d8f7ba0cef73340af22e47a9c7e40120c14
I don't understand where is the problem, i'm sure i have followed the tutorial carefully and i ve created the same scenario.. If anyone have any idea i would appreciate it. Thanks.
So I went through step by step in an attempt to recreate your scenario - 3 nodes running Quorum + Raft and a private transaction between nodes 1 & 3.
On the initial migration attempt I came across the same hung state as you observed. Inspection of the block explorer reveals that both contracts were actually deployed, however neither were invoked (i.e. no state was set for simple storage via the migration file).
I then changed the truffle_migrate.sh file to target the original privateFor node (3) and used the original targeted node (1) as the new privateFor recipient. This worked immediately. The question is why :)
Truffle is finicky sometimes, especially when using RAFT with private transactions.
I would suggest:
Check your block explorer to ensure that the connection to the network was successful and the contracts were deployed.
Kill the running migrate process and just kick it off again.
If that doesn't work, try the flip flop process I described.
I'm curious if there is a correlation with targeting the RAFT leader or if perhaps truffle just needs a few extra nudges sometimes. We will investigate.
FYI I tried originally with a public transaction and used a truffle.js file with only a single node. This also worked immediately. So my supposition is there is some nuanced approach for private transactions and RAFT.
In the meantime this should give you a potential workaround; you'll just have the original migration and simple storage contracts as orphans in your environment.

Node-Windows service starts multiple instances

I'm running some file management tasks through a node script. The node-windows package is included to allow me to run this script as a windows service. I encountered a serious error this morning when I realized that the service had started a duplicate instance of the same script. This is very bad, it corrupted 24-hrs worth of data because both scripts were trying to process the same data sets and ended up shredding them. I've never seen the windows service allow something like this. Has anyone else had this problem or have any idea what is causing it?
See my comment about node-windows instances.
The real problem, which is data corruption, doesn't have anything to do with node-windows. The node script should have fault tolerance for this. More specifically, it should be implementing file locking, which is a standard practice to prevent this exact scenario.
There are a couple of file locking modules available. lockfile is what npm uses. There is also another project called proper-lockfile, which solves the problem in a slightly different (more Windows-friendly) way.

unknown directive "passenger_force_max_concurrent_requests_per_process"

I'm trying to write a web backend using Node.js, Passenger, and nginx.
It was working great until I tried to add multiple node processes using the passenger_force_max_concurrent_requests_per_process setting. For some reason adding that setting gives me the following error:
unknown directive "passenger_force_max_concurrent_requests_per_process"
If I comment that line out it works fine, so I really don't know what's going on. Any help would be welcome.
Thanks,
-tlf
EDIT:
nginx and Passenger both work perfectly until I try to change that setting, at which point nginx fails to start due to the aforementioned error. If I remove that line, everything works normally again.
And yes, I do know exactly what that line of code does, which is why I'm trying to add it in the first place. I would really appreciate being able to set that property, but I am unable to because it's crashing.
The most likely possibility is that your Passenger version is too old. passenger_force_max_concurrent_requests_per_process was introduced in version 5.0.22.
The other possibility is that you did not update your Nginx installation when upgrading Passenger.
You have made it comment out that means it is made 0.
There are two main use cases for this option:
To make dynamic process scaling work in Node.js and Meteor
applications. Set this option to approximately the number of
concurrent requests at which the performance of a single process
begins to degrade.
To make SSE and WebSockets work well in Ruby applications. Set this
option to 0.
Resource Link:
passenger_force_max_concurrent_requests_per_process
Dynamic scaling of Node.js application processes vs fixed process
pool
UPDATE1:
passenger_start_timeout specifies a timeout for the startup of application processes. If an application process fails to start within the timeout period then it will be forcefully killed with SIGKILL, and the error will be logged.

oracle temporary ora 12505 error after linux startup

I am experiencing a very strange behavior with oracle, maybe somebody can help me, let me summarize it real quick:
My OS of choice is debian linux, I am using Oracle XE 11.0.2.0. On linux startup, I run a script file which is located under /etc/init.d/. I added the following line to make oracle start on system start:
/etc/init.d/oracle-xe start
Right after this line , I run my application from the script, my application heavily relies on the oracle db, therefore once oracle starts, I am positive that my application will run ok. Unfortunately my assumption seems wrong.Here's why: I set up similar set up in 3 machines, in 2 of them I see weird behavior, after system start oracle db is not responding to connection requests, Even though oracle-xe start command completed executing.
My observation is the following, if I run my application right after oracle-xe start is executed, I receive ora-12505 errors at least for a minute: "TNS listener does not currently know of SID" . After a minute everything stabilizes, and my application starts working ok. 1 minute without a db on system startup is not acceptable for me performance-wise, therefore I am trying to solve this problem.
Surprisingly it does not happen in one of the other linux boxes I have here, I am not quite sure what is different on that box. I compared ora files, but couldn't find any difference, it seems like a wild goose chase...
I would be so grateful if anybody has experienced and solved ths problem before and shares that valuable solution with me.
I think I found the problem, looks like I am starting oracle-xe instance before I assign network interfaces an IP address, in that case it takes some time for oracle to receive connections, that requires me to set static ip on the linux boxes, which is something I don't want. Is there a solution so that I can still assign IP addresses later on?

Issues getting Node.js running with MongoDB on Windows Azure

I have been struggling to do the tutorial, https://www.windowsazure.com/en-us/develop/nodejs/tutorials/web-app-with-mongodb/, which basically makes a simple node.js application that has access to a Mongo DB. I keep running into the following issue when launching the program locally with the command Start-AzureEmulator:
"No connection could be made because the target machine actively refused it 127.0.0.1:27017"
I tried various ports and configurations with no success. Oddly enough, when I run mongodb.exe, the database launches without hiccup (this is just through the command line not within the Azure Emulator). I have also tried reinstalling all of the tools multiple times. It seems I am at a loss of what to do next.
Have any of you experienced this problem or have been able to complete this tutorial?
As a side note, do any of you know any cloud providers that allow the use of sockets with node.js? This is one of the main reasons I am trying to use Azure.
I assume you've followed the instructions step by step and haven't modified anything yet?
I note from the screenshot below, that the sample tries to open Mongo at 127.255.0.1:27017, not 127.0.0.1:27017:
I suggest checking your Azure services' URL's in case you're looking for Mongo on the wrong address.

Resources