After installation of debian package of memgraph on windows subsystem for Linux. memgraph is not started automatically.
Install debian package for memgraph. Some errors will be shown for chattr like
chattr: Inappropriate ioctl for device while reading flags on /usr/share/memgraph/examples/Europe/snapshots.
After that memgraph is not started. Running systemctl start memgraph
gives the
error Failed to connect to bus: No such file or directory.
which is expected as systemd is not supported by WSL.
So, how can memgraph be started in a WSL shell.
By default, there is no systemd on WSL, which means that Memgraph doesn't run automatically.
Try to run Memgraph manually by executing the following shell command:
/usr/lib/memgraph/memgraph
The concrete path depends on which Linux do you use.
locate memgraph
Might help you to figure out the right path.
Related
My setup is Windows 11 with WSL2 and Ubuntu 22.04.1 LTS (GNU/Linux 5.15.79.1-microsoft-standard-WSL2 x86_64). I'm following the instructions for installing Memgraph on Ubuntu
but I keep getting the error:
mike#wks1:~$ wget https://download.memgraph.com/memgraph/v2.5.1/ubuntu-22.04/memgraph_2.5.1-1_amd64.deb
--2023-01-27 09:26:51-- https://download.memgraph.com/memgraph/v2.5.1/ubuntu-22.04/memgraph_2.5.1-1_amd64.deb
Resolving download.memgraph.com (download.memgraph.com)... 172.67.130.22, 104.21.7.96, 2606:4700:3034::6815:760, ...
Connecting to download.memgraph.com (download.memgraph.com)|172.67.130.22|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17578738 (17M) [application/x-www-form-urlencoded]
Saving to: ‘memgraph_2.5.1-1_amd64.deb’
memgraph_2.5.1-1_amd64.deb 100%[=================================================>] 16.76M 18.3MB/s in 0.9s
2023-01-27 09:26:52 (18.3 MB/s) - ‘memgraph_2.5.1-1_amd64.deb’ saved [17578738/17578738]
mike#wks1:~$ sudo dpkg -i memgraph_2.5.1-1_amd64.deb
[sudo] password for mike:
Selecting previously unselected package memgraph.
(Reading database ... 24112 files and directories currently installed.)
Preparing to unpack memgraph_2.5.1-1_amd64.deb ...
Unpacking memgraph (2.5.1-1) ...
Setting up memgraph (2.5.1-1) ...
Don't forget to switch to the 'memgraph' user to use Memgraph
......+.....+.+........+......+...+...+.......+......+......+.........+.........+...+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*......+...+...+...+............+...+.......+...+...........+...+.+.........+...+...+...........+...+.......+...............+...+.....+......+.+...+......+..+...............+.............+..+....+...+.....+.+.....+.......+..............+.+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+.+........+......+.+........+............+.............+.............................+......+..........+......+......+........+......+...............+..........+...........+.........+...+.......+.....+...+................+.....+..........+......+....................+.+............+................................+...+.+..............+.+.....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
..............+..+......+....+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+....+.....+.......+............+...+........+.......+........+.........+...+...+.+.....+.............+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.+..+..........+...+......+...........+....+...............+.....+...+.......+.....+...+..........+...+............+........+.......+.....+.+.........+..+...+.+.....+..........+..+.........+............................+..+.+.....+........................+.+................................+...+...+.+........+.......+.........+.....+.+...+...........+............+.......+..+.+..+................+.........+......+...........+.+..+.............+..+.+..+........................+....+..+.......+........+....+........+.......+......+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
Created symlink /etc/systemd/system/multi-user.target.wants/memgraph.service → /lib/systemd/system/memgraph.service.
mike#wks1:~$ sudo journalctl --unit memgraph
No journal files were found.
-- No entries --
mike#wks1:~$ sudo systemctl start memgraph
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
I've tried all of the tips that I got by Googling, but non of them didn't work. When I dual boot into Ubuntu, I have no problems. What am I going wrong?
The procedure for installing Memgrap using WSL and Ubuntu is different than installing Memgraph directly onto Ubuntu. There is a notice in your output that says Don't forget to switch to the 'memgraph' user to use Memgraph.
The command for running Memgraph under WSL is:
sudo runuser -l memgraph -c '/usr/lib/memgraph/memgraph'
Take a look at the documentation on how to install MemgraphDB on Windows with WSL.
When I start Docker instance of Memgraph Platform I can see the following in CLI:
Status: Downloaded newer image for memgraph/memgraph-platform:latest
Memgraph Lab is running at localhost:3000
mgconsole 1.1
Connected to 'memgraph://127.0.0.1:7687'
Type :help for shell usage
Quit the shell by typing Ctrl-D(eof) or :quit
memgraph>
When I connect with Memgraph Lab to that same instance I can see the version of Memgraph Lab.
So I can see that mgconsole is 1.1, Memgraph Lab is 2.0.1, but what about MemgraphDB? How can I see the version of MemgraphDB?
You can see the MemgraphDB version by running the SHOW VERSION; command. The command is the same whether you are using mgconsole or Memgraph Lab
I know that there are two ways to run Memgraph on Ubuntu:
sudo systemctl start memgraph
sudo service memgraph start
Is there a preferred way to run Memgraph?
I've seen that if Ubuntu is run as WSL that the command for running it is sudo runuser -l memgraph -c '/usr/lib/memgraph/memgraph'. Can I use this command also on standalone Ubuntu installation, or is this one only for WSL?
systemctl interacts with systemd which is an init(and manager) system. When the Linux kernel is booted, there are some services that must start, etc. These are managed by systemd which is controlled by systemctl. service is the same as systemctl but for older systems which do not use systemd as their init system.
This command is simply running the executable placed in /usr/lib/memgraph/memgraph with the user memgraph.
The difference between these two is that the latter one won't start on the startup while the first one will.
Hello there guys i have been trying to use hcitool on mac os terminal but whenever i type hcitool scan the following error is appeared -bash: hcitool: command not found i have tried pip install hci and pip install hcitool but the following error is shown
ERROR: Could not find a version that satisfies the requirement gatttool (from versions: none)
ERROR: No matching distribution found for gatttool
please help me with this
Commands such as hcitool, gatttool, hciconfig, etc. are part of the BlueZ package which works on Linux only. MacOS on the other hand is UNIX-core and therefore the commands will not run on a MacOS operating system. There have been hacks before to get some sort of functionality on MacOS OSs but the solution is always incomplete.
Your next best bet will be to use a Virtual Machine running a Linux guest (e.g. Ubuntu) and then use the BlueZ commands from within that VM OS.
I hope this helps.
Get yourself a Docker container up and running. You can write scripts that you keep in a shared volume between the host and the container (meaning you don't have to log into the container). You can then execute those scripts from your OSX terminal, to run in the container.
HTH
Has anyone succeeded in running fabric-composer on windows 10 linux sub-system running ubuntu 16.04 ?
You can run composer on windows 10 WSL (windows Subsystem for linux) but you will not be able to run docker containers in it. Linux Docker containers require a linux kernel and WSL doesn't have a linux kernel. It is a clever piece of technology that converts user space Linux API calls dynamically to windows API calls.
Therefore you will have to run hyperledger fabric either by using docker for windows (which runs it for you in hyper-v) or you run your own hypervisor.
It is possible to have the docker commands run in WSL but it will need to configure it to interact with the docker daemon running inside a hypervisor.
Yes, you can use Hyperledger-fabric-composer on windows 10, but as david said in above answer you will not be able to run docker containers directly from Ubuntu sub-system.
To do that you have to do following things:
METHOD:- 1
You will need to install docker CE Client & docker-compose in Ubuntu Subsystem and install Docker(version v17.09) on Windows as well. But those dockers won’t connect together out of the box.
So you need to expose the daemon to port 2375 first by right-clicking the docker icon on task-bar then click setting then check the Expose daemon box.
Now the docker server will be able to connect via Windows network including Ubuntu subsystem. We need to set environment variables in Ubuntu by running below command:
echo "export DOCKER_HOST='tcp://0.0.0.0:2375'" >> ~/.bashrc
source ~/.bashrc
These commands will add DOCKER_HOST to the variables every time we start a new Bash.
METHOD:- 2
If you don't want to use ubuntu sub-system, then you can simply install Git Bash and Docker(version v17.09).
Then install Hyperledger-Fabric by using Git Bash.