I am trying to install Jupyter inside CentOS 7 VM (that I already had) so I can access it via port 8888 at my host Mac laptop. However, I cannot figure out the networking piece.
I am changing the IP address to 200.100.x.x for convenience
From Host Machine
I have 2 adapters for that CentOS VM
$ ifconfig gives me this (I believe those are the same):
vmnet1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:50:56:c0:00:01
inet 200.100.42.1 netmask 0xffffff00 broadcast 200.100.42.255
vmnet8: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:50:56:c0:00:08
inet 200.100.40.1 netmask 0xffffff00 broadcast 200.100.40.255
From within CentOS
[root#localhost ~]# ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 200.100.40.145 netmask 255.255.255.0 broadcast 200.100.40.255
inet6 fe80::20c:29ff:febf:4878 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:bf:48:78 txqueuelen 1000 (Ethernet)
RX packets 645 bytes 97963 (95.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 215 bytes 24854 (24.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eno33554984: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 200.100.42.128 netmask 255.255.255.0 broadcast 200.100.42.255
inet6 fe80::250:56ff:fe3d:7210 prefixlen 64 scopeid 0x20<link>
ether 00:50:56:3d:72:10 txqueuelen 1000 (Ethernet)
RX packets 18 bytes 1884 (1.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 45 bytes 6130 (5.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 220 bytes 50398 (49.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 220 bytes 50398 (49.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
My tests
I pinged the following IP addresses from my host machine and they all worked:
200.100.42.128
200.100.40.145
200.100.42.1
200.100.40.1
That means there is networking connectivity into the VM. Correct?
When I do jupyter notebook, I could access http://localhost:8888/tree inside the VM but I cannot go there using any IP address from my host OS on the Macbook.
I have restarted my VM many times.
Questions
Is it because of port blocking / not forwarding (8888) or something and if so, how to fix it?
Did I setup the networking incorrectly? Is there something else I need to do inside CentOS? I read this blog here http://twiki.org/cgi-bin/view/Blog/BlogEntry201310x2 and I don't see eth0 at all.
The problem is Jupyter picked 127.0.0.0 or localhost by default. If you have the adapter with other IP addresses, it won't work.
You need to change the IP of Jupyter inside the VM
http://jupyter-notebook.readthedocs.org/en/latest/config.html
$ jupyter notebook --generate-config
Edit it:
vi /root/.jupyter/jupyter_notebook_config.py
Then change:
c.Notebookapp.ip = '0.0.0.0'
Restart jupyter notebook and should be good to go.
Make sure firewall is off or open for port 8888 as well.
Related
Please help with this
I have a windows laptop --> On this installed VM ware Tool --> On this I've Installed Linux OS
Installed docker and stopped firewalld service (then only docker service start)
If I run the docker run command as:
docker run **--network=host** -p 8080:8080 -d tomcat
Then only can access the URL: http://:8080 i.e http://192.168.0.108:8080 (It was IP of Linux VM) from the browser on windows system
If I run the docker command without using the --network=host option I'm not able to access the container application. for example, if running docker run -p 8080:8080 -d tomcat
how can I access all running containers from the windows system browser?
Do I need to add a route in the Linux OS (the one Installed in a VM ware Tool) or in the Windows one or change the network settings in VMWare configuration?
Docker container Ip start with 172.17.xx.xx series and my windows/LINUX OS was on 192.168.xx.xx series. do need to add any route?
MY network details:
[root#Docker_test ~]# ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
inet6 fe80::42:e8ff:fef2:7ed7 prefixlen 64 scopeid 0x20<link>
ether 02:42:e8:f2:7e:d7 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 500 bytes 23738 (23.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.108 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::20c:29ff:fee6:b685 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:e6:b6:85 txqueuelen 1000 (Ethernet)
RX packets 2310526 bytes 3211791978 (2.9 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 457745 bytes 45884268 (43.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root#Docker_test]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 ens33
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 ens33
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
Regards
Ram
I am having trouble setting up an internet to be shared on Beaglebone (BB) through the host (Mac running Big Sur OS).
When I do ifconfig on BB, I see two USB interfaces showing up (usb0, usb1) with designated IP addresses but I can't seem to ping to my host machine for instance to verify the internet connection. It says From 192.168.7.2 icmp_seq=1 Destination Host Unreachable
According to this link:
With the latest images, it should no longer be necessary to install drivers for your operating system to give you network-over-USB access to your Beagle. In case you are running an older image, an older operating system or need additional drivers for serial access to older boards, links to the old drivers are below.
usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.7.2 netmask 255.255.255.252 broadcast 192.168.7.3
inet6 fe80::e1c:57ff:fe00:c2c0 prefixlen 64 scopeid 0x20<link>
ether 0c:1c:57:00:c2:c0 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
usb1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.6.2 netmask 255.255.255.0 broadcast 192.168.6.255
ether 0c:1c:57:00:c2:c4 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I did download the latest image but for further verification, how do you verify the image being run i.e version or something that tells whether this matches the image version 10.3 as stated on the website?
On the host, following is the relevant interface for the USB. For the pings to go through, the netmask needs to be matched with that of the usb0?
en7: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=404<VLAN_MTU,CHANNEL_IO>
ether 0c:1c:57:00:c2:c3
inet6 fe80::d1:b3cb:50eb:72e1%en7 prefixlen 64 secured scopeid 0x14
inet 192.168.7.1 netmask 0xffffff00 broadcast 192.168.6.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (none)
status: inactive
In the Network Settings of the host, I see it says Either the cable for BeagleBoneBlack is not plugged in or the device at the other end is not responding. That's weird because in the ifconfig output on the host, I do see en7 showing up which is referring to the USB connection to the BeagleBone
uname -a
This shows your kernel
cat /etc/dogtag
This shows your image
Are you using an Ethernet cable or are you trying to use a USB dongle for Wifi? If you are using Ethernet, it should be plug and play but you will need to use Chrome or Firefox.
I am not sure about the Big Sur OS but you can try beaglebone.local or 192.168.6.2 instead. This may prove useful when using ssh.
also...try this:
use a COM port or if there is no COM ports on Big Sur OS, get a
USB to TTL converter cable and get onto the board via serial...
This way, you can find your IP Address by ip addr.
Look for eth0 on the BBB and not usb(x).
I've got a Fedora 26 QEMU guest VM with a LAMP application running on a Fedora 25 host. I can access the guest web server from both the guest and the host, but I can't access it from the other systems on my local LAN - and I'd like to be able to do that.
I've put a host static route entry in my router (LEDE) to route the F26 guest's static IPv4 address (192.168.122.186) to the F25 host. The F25 host already has a network route entry for the virbr0 v-interface (192.168.122.0/24).
It seems that the F25 host firewall is what's blocking the access because when I disable firewalld on the F25 host, it works as required.
I'd appreciate a pointer to how to wrangle firewalld in this type of configuration.
Edit 2017/12/11:
I started off with only one firewalld zone (public), but now I'm trying 2 (public and internal). The "services" (ports) shown below have always been open. http and https, in particular, are what I need to work.
I need to route the traffic from devices on my local LAN, 10.3.2.0/24, (except the F25 host, of course) through the F25 host to the F26 guest VM. As I wrote before, the routing appears to be working, except when firewalld is running on the F25 host - in which case this traffic is blocked.
I've spent a lot of time searching, and there are two recurring topics, forwarding and masquerading. None of the things suggested has done what I require, however.
How can I do this? Tx
========== running: firewall-cmd --get-zones ===========
FedoraServer FedoraWorkstation block dmz drop external home internal public trusted work
========== running: firewall-cmd --get-active-zones ===========
internal
interfaces: virbr0
public
interfaces: enp0s31f6
========== running: firewall-cmd --get-default-zone ===========
public
========== running: firewall-cmd --zone=public --list-all ===========
public (active)
target: default
icmp-block-inversion: no
interfaces: enp0s31f6
sources:
services: mdns ssh dhcpv6-client http https
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
========== running: firewall-cmd --zone=internal --list-all ===========
internal (active)
target: ACCEPT
icmp-block-inversion: no
interfaces: virbr0
sources:
services: ssh http https dhcpv6-client mdns
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
$ ifconfig -a # on the F25 host
enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.3.2.10 netmask 255.255.255.0 broadcast 10.3.2.255
inet6 xxxxxxxxxxxxxxxxxxxxxxxxx prefixlen 64 scopeid 0x20<link>
inet6 xxxxxxxxxxxxxxxxxxx prefixlen 128 scopeid 0x0<global>
inet6 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx prefixlen 64 scopeid 0x0<global>
ether xxxxxxxxxxxxxxxxx txqueuelen 1000 (Ethernet)
RX packets 145 bytes 16680 (16.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 217 bytes 27947 (27.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xf7000000-f7020000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 24 bytes 2056 (2.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 24 bytes 2056 (2.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:93:ae:d3 txqueuelen 1000 (Ethernet)
RX packets 99 bytes 11189 (10.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 73 bytes 9612 (9.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 52:54:00:93:ae:d3 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::fc54:ff:fe7c:437c prefixlen 64 scopeid 0x20<link>
ether fe:54:00:7c:43:7c txqueuelen 1000 (Ethernet)
RX packets 99 bytes 12575 (12.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 195 bytes 17988 (17.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
$ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.3.2.1 0.0.0.0 UG 0 0 0 enp0s31f6
10.3.2.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s31f6
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
I bought a Raspberry Pi yesterday and I am facing quite a large problem. I can't sudo apt-get update. I think this error comes from my dns because I am connected via ethernet (Physically). so the message it prints when I execute the command is that:
pi#raspberrypi:~ $ sudo apt-get update
Err:1 http://goddess-gate.com/archive.raspbian.org/raspbian jessie InRelease
Temporary failure resolving 'goddess-gate.com'
Err:2 http://archive.raspberrypi.org/debian stretch InRelease
Temporary failure resolving 'archive.raspberrypi.org'
Reading package lists... Done
W: Failed to fetch http://goddess-gate.com/archive.raspbian.org/raspbian/dists/jessie/InRelease Temporary failure resolving 'goddess-gate.com'
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/InRelease Temporary failure resolving 'archive.raspberrypi.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
So to resolve this problem I have tried a few things:
- Changing the etc/apt/sources.list to a valid mirror of my country (france)
- Reinstalling Raspbian (1st try was with NOOBS) and now I installed Raspbian with the .img file
- Changing my /ect/resolv.conf and /etc/network/interfaces nameservers to these ip 8.8.8.8 8.8.4.4
Nothing worked... I am really stucked, there is something elese, I can't browse any website with Chromium but I have internet connexion because I can pip install python modules... here is the Chromium message:
'This site can't be reached' ERR_NAME_RESOLUTION_FAILED
Other things, my inet ip is not valid, usally it should start with 192.168 but here it is 168.254.241.6 ... here is my if config:
pi#raspberrypi:~ $ ifconfig
enxb827ebaf69fc: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.241.6 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::5d8b:1a8c:c520:c339 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:af:69:fc txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 995 bytes 61042 (59.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 806 bytes 77318 (75.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 806 bytes 77318 (75.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:fa:3c:a9 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Type following at the command line in order to edit resolv.conf which is the linux configuration file where domain-name to IP mapping is stored for the purpose of DNS resolution.
sudo nano /etc/resolv.conf
then add these 2 lines:
nameserver 8.8.8.8
nameserver 8.8.4.4
hope it will help ...
The ip-adress range 169.254.0.0 to 169.254.255.255 is used by zeroconf.
Probably there is no active DHCP server in the LAN. Mostly the router is also a DHCP server.
You also have no public IPv6 address. But this could also come from a IPv4 only internet connection.
Try to configure the interface completly manual with corrected ip-address. When there should be an active DHCP server, try to fix it. Sometimes a reboot helps.
You can show your gateway with "ip r". It should be the address of the router.
Important is that the ip-address of the Pi is in the same subnet as the gateway.
sudo nano /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
I connected Raspberry Pi Directly with an Ethernet Cable.
it work.
I want to submit Spark jobs with my Java client and Spark Master running on different hosts.
I've tried setting SPARK_MASTER_IP and SPARK_LOCAL_IP in spark-env.sh to the public IP but the sparkMaster is always bound to 127.0.0.1.
How can I bind the Spark Master to my public IP?
Update 14/1/15:
You can view my spark-env.sh file in pastebin
ifconfig (on spark master) output:
ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.76.28.117 netmask 255.255.254.0 broadcast 10.76.29.255
inet6 fe80::250:56ff:fe87:d94 prefixlen 64 scopeid 0x20<link>
ether 00:50:56:87:0d:94 txqueuelen 1000 (Ethernet)
RX packets 4392194 bytes 1030005387 (982.2 MiB)
RX errors 0 dropped 2828 overruns 0 frame 0
TX packets 556316 bytes 114056485 (108.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 810654 bytes 602987986 (575.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 810654 bytes 602987986 (575.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I had my rpc_address in cassandra.yaml set to "0.0.0.0". After changing it to the real IP address of the node it worked.