I am getting an error while trying to connect with node using geth tool - hyperledger-fabric

I am having an error while trying to attach to the quorum node, using the following command :--
geth attach --datadir new-node-1/geth.ipc
then I get this error
Unable to attach to remote geth: dial unix new-node-1/geth.ipc: connect: no such file or
directory
I tried to locate path of geth.ipc but nothing was there. I guess the file is not being created.
any suggestions guys..

You should be running the command like this (without --datadir):
geth attach new-node-1/geth.ipc
If that still doesn't work then make sure you have the correct path for the ipc file. Is new-node-1 definitely the same path that was specified to the quorum node when it was started (i.e. with with --datadir new-node-1).
If the path is correct but geth.ipc file doesn't exist then the node hasn't managed to start up. Check the log file to see if there were any errors.

Try out below:
geth attach http://127.0.0.1:8545
It worked for me

Related

Error while running DotTrace for .net core (6.0) in Linux docker container

I am trying to run DotTrace on Linux container.
Placed dotTrace folder in a tmp folder and accessing the command from app folder reference. Below is the command:
./dotTrace.sh start --framework=NetCore /usr/share/dotnet/dotnet /app/Acidaes.CRMnext.UI.Web.dll --timeout=10s --save-to=./snapshots/snapshot.dtp
Everything with setup and paths is correct here.
But, I am getting below error while executing:
warn: Microsoft.AspNetCore.Server.Kestrel[0]
Overriding address(es) 'http://+:80'. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead.
Unhandled exception. System.IO.IOException: Failed to bind to address https://[::]:443: address already in use.
For capture with process ID, command in use is:
/tmp/./dotTrace.sh attach 1 --save-to=./snapshots/snapshot.dtp
And error is:
Unable to start profiling. Connection refused.
Any help or suggestions are greatly welcomed.
/tmp/./dotTrace.sh start --framework=NetCore /usr/share/dotnet/dotnet /app/Acidaes.CRMnext.UI.Web.dll --timeout=10s --save-to=/tmp/./snapshots/snapshot.dtp

Database 'neo4j' is unavailable. Cannot reset neo4j database

I have my community 4.1.1 neo4j service installed on the ubuntu commandline running on my windows machine. I have been using neo4j steadily for a month or two now, just recently it has prevented me from accessing the neo4j database, it will say this in neo4j browser:
Database 'neo4j' is unavailable. Run :sysinfo for more info.
I have tried uninstalling neo4j and reinstalling but that has not worked either. I tried playing around with the default listen address previously, but now with the reinstall all config data is back to normal. Running ./neo4j-community-4.1.1/bin/cypher-shell under bin does not work. It says:
Unable to establish connection in 3000ms
If I run ./neo4j-community-4.1.1/bin/cypher-shell -a 192.168.0.19 it says:
Database 'neo4j' is unavailable
When I run ./neo4j-community-4.1.1/bin/neo4j-admin check-consistency --database=neo4j it also states:
.2020-08-18 22:12:16.868+0000 WARN [o.n.c.ConsistencyCheckService] Index was dirty on startup which means it was not shutdown correctly and need to be cleaned up with a successful recovery. Index file: /home/thomp105/neo4j-community-4.1.1/data/databases/neo4j/neostore.relationshipgroupstore.db.id.
I would love to reset everything from scratch but I am unsure how
At this point I cannot even access the browser at localhost:7474. It hangs indefinitely trying to load.
I am truly stumped. Anyone have any advice on how I navigate this issue?
It's not easy to guess the issue without seeing your system, but may I ask if you can try to delete your default database, i.e. neo4j physically from the disk (e.g. rm -rf /home/thomp105/neo4j-community-4.1.1/data/databases/neo4j/), and then try to create another database with different name instead (open neo4j.conf, search for dbms.active_database, which point out on default database, and change it to some other name)?
I had this problem running on a linux server. The server was up but got this error on any query: Database 'neo4j' is unavailable. To troubleshoot I ran sudo neo4j console and the problem went away. When I ran the console as user ne04j the problem came back.
$ /usr/share/neo4j/bin/neo4j console
Directories in use:
home: /var/lib/neo4j
config: /etc/neo4j
logs: /var/log/neo4j
plugins: /var/lib/neo4j/plugins
import: /var/lib/neo4j/import
data: /var/lib/neo4j/data
certificates: /var/lib/neo4j/certificates
run: /var/run/neo4j
So I tried: sudo chown -R neo4j:neo4j /var/lib/neo4j/data and the problem went away. Apparently when I'd done a restore of the database I'd run the neo4j server as root and when the system runs neo4j it does it as the user neo4j so couldn't read any of its data. It seems that an error like this would warrant an easy to parse error message but verbosity is not the neo4j way.

Errors setting up Ruby development environment: nodejs not found, could not connect to server

I'm a new developer-in-training attempting to set up my Ruby development environment on a Windows machine using Ubuntu. I'm following the instructions here:
https://gorails.com/setup/windows/10
I've made it to the last few steps of the process, which is where I'm started to get errors:
# Navigate to the C: drive on Windows. Do this every time you open the Linux console.
cd /mnt/c
# Create a code directory at C:\code for your Rails apps to live (You only need to do this once)
mkdir -p code
#### If you want to use Postgres
# Note that this will expect a postgres user with the same username
# as your app, you may need to edit config/database.yml to match the
# user you created earlier
rails new myapp -d postgresql
#### or if you want to use SQLite (not recommended)
# rails new myapp
#### Or if you want to use MySQL
# rails new myapp -d mysql
# Then, move into the application directory
cd myapp
# If you setup MySQL or Postgres with a username/password, modify the
# config/database.yml file to contain the username/password that you specified
# Create the database
rake db:create
rails server
On the step to set up Postgres:
rails new myapp -d postgresql
I receive this error about setting up nodejs:
/home/event/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /home/event/.rbenv/versions/2.6.5 in PATH, mode 040777
sh: 1: node: not found
sh: 1: nodejs: not found
Node.js not installed. Please download and install Node.js https://nodejs.org/en/download/
Even after I go to the URL provided and install NodeJS, that error still shows up when I attempt to repeat the process. Is this just a matter of it not existing in the correct path and I need to relocate it?
Also, I've attempted to proceed with the other steps despite that error. When I enter this command, the second last one in the article referenced above:
rake db:create
I receive this error:
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Couldn't create 'myapp_development' database. Please check your configuration.
rake aborted!
ActiveRecord::NoDatabaseError: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Caused by:
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Tasks: TOP => db:create
(See full trace by running task with --trace)
I've searched around about this with little success, and attempted to decipher what the error messages mean; but at my current level of knowledge it just seems beyond me. Appreciate any insight anyone has to share on this!

Cant access mongodb shell and mongo errored

I installed mongo following this tutorial with the exception that I ran the service with pm2 because I can actually tell what I am doing with pm2.
I then have been trying to follow this tutorial however I cant even access the shell.
I have tried the following commands and none of them work:
./bin/mongo causes a file not found error whether it is in my project file or in the /var/lib/mongodb folder where the db is supposedly "installed"
Additionally
mongo localhost:27017 (or just mongo)
causes
MongoDB shell version: 3.2.19
connecting to: test
2018-02-12T20:15:59.009+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: errno:111 Connection refused
2018-02-12T20:15:59.009+0000 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect#src/mongo/shell/mongo.js:229:14
#(connect):1:6
exception: connect failed
My log file (from /var/log/mongodb/mongod.log) can be found here. I do have some confusion about it:
Why did it shut down
Why is the host=GraphicsApplications? That is an old folder that I have since deleted on my machine. It was my first attempt at getting this going but back then I was hosting my DB with mlab. The folder/name it lists no longer exists. For some reason though the start of every line in terminal says root#GraphicsApplications. Not sure where that name came from... perhaps I named the box that?
Ultimately I dont know exactly how that tutorial had me install mongodb. Sure I installed the packages and everything but I dont feel like I ever really created anything if that makes sense.
It is worth noting that pm2 does show the status of the mongod app as "errored" currently but I am not sure why or for how long it stayed up.
I am just trying to get my database running on my own Linux box rather than mlab. I had everything working with mlab but now want to be hosting my db on localhost.
Looking in the logs it says that your hostname is host=GraphicsApplications
But in your actual hosts file you have 127.0.1.1 GraphicsApplications GraphicsApplications
Edit this line in your hosts file to be just 127.0.1.1 GraphicsApplications
Then save the file and rerun mongod. Hopefully that should do it.
Regarding file not found:
Try running from the cmd line:
which mongo
If that doesn’t show any result then the mongo binariesarn’t in your PATH env variable, in which case try
find / -name “mongo*”
That should then show where your mongo binaries have been installed.
If you know where the binaries are installed then running:
./bin/mongo
Presumes you’re in the mongo home dir, so you would need to run;
/var/lib/mongodb/bin/mongo
Regarding connection refused
could be an iptables rule, try disabling it and starting mongo
sudo ufw disable
hostfile
Comment out this
127.0.1.1 GraphicsApplications
And change/add this
127.0.0.1 localhost localhost.localdomain
As per : https://jira.mongodb.org/plugins/servlet/mobile#issue/SERVER-20952

Can't start a win10 app remotely

I need to start a win10 app remotly.
What I already tried is:
for starters I used this path: shell:appsfolder\appname!app
using psexec to start the app doesn't work
same with powershell (over psexec as well as native ps remote)
also tried starting it indirectly from a .cmd file and .vbs file executing form psexec
all these command and files are working if executed directly on the client. But if I try to execute them remotly I get the error message path not found or it just nothing happening and really nothing I checked if the appropriate exe file is running via taskmanager. Apparently there must be some issue with the name translation of shell:appsfolder over a remote session.

Resources