3ofcoins / jetpack

**PROTOTYPE** FreeBSD Jail/ZFS based implementation of the Application Container Specification
Other
529 stars 38 forks source link

Please help: dial tcp 172.23.0.1:1104: getsockopt: connection refused #18

Open oberstet opened 8 years ago

oberstet commented 8 years ago

I'm aware this is an issue tracker, but I failed to find a mailing list or such, and am stuck following the Getting Started guide =(

Please help .. would be greatly appreciated!

I have closely followed the INSTALL.md and the Getting Started, but I am stuck at:

[oberstet@bvr-file1 ~]$ sudo jetpack run -t 3ofcoins.net/freebsd-base
+ /sbin/zfs get -H -p -oproperty,value type,mounted,mountpoint,origin zroot/jetpack | "type\tfilesystem\nmounted\tyes\nmountpoint\t/var/jetpack\norigin\t-\n"
2016-04-11T13:47:21+02:00 pod:0787097f-b195-4992-bfa7-18bcea17f3ba DEBUG: Initializing dataset [lib/jetpack/pod.go:84]
+ /sbin/zfs create zroot/jetpack/pods/0787097f-b195-4992-bfa7-18bcea17f3ba
+ /sbin/zfs get -H -p -oproperty,value type,mounted,mountpoint,origin zroot/jetpack/pods/0787097f-b195-4992-bfa7-18bcea17f3ba | "type\tfilesystem\nmounted\tyes\nmountpoint\t/var/jetpack/pods/0787097f-b195-4992-bfa7-18bcea17f3ba\norigin\t-\n"
2016-04-11T13:47:21+02:00 pod:0787097f-b195-4992-bfa7-18bcea17f3ba DEBUG: Cloning rootfs.0 for app freebsd-base [lib/jetpack/pod.go:144]
2016-04-11T13:47:21+02:00 image:c5241ef8-727f-4dbc-b0fd-b27d6adf2a86 DEBUG: Cloning rootfs as zroot/jetpack/pods/0787097f-b195-4992-bfa7-18bcea17f3ba/rootfs.0 at /var/jetpack/pods/0787097f-b195-4992-bfa7-18bcea17f3ba/rootfs/0 [lib/jetpack/image.go:184]
+ /sbin/zfs get -H -p -oproperty,value type,mounted,mountpoint,origin zroot/jetpack/images/c5241ef8-727f-4dbc-b0fd-b27d6adf2a86 | "type\tfilesystem\nmounted\tyes\nmountpoint\t/var/jetpack/images/c5241ef8-727f-4dbc-b0fd-b27d6adf2a86/rootfs\norigin\t-\n"
+ /sbin/zfs get -H -p -oproperty,value type,mounted,mountpoint,origin zroot/jetpack/images/c5241ef8-727f-4dbc-b0fd-b27d6adf2a86@seal | "type\tsnapshot\nmounted\t-\nmountpoint\t-\norigin\t-\n"
+ /sbin/zfs clone -o mountpoint=/var/jetpack/pods/0787097f-b195-4992-bfa7-18bcea17f3ba/rootfs/0 zroot/jetpack/images/c5241ef8-727f-4dbc-b0fd-b27d6adf2a86@seal zroot/jetpack/pods/0787097f-b195-4992-bfa7-18bcea17f3ba/rootfs.0
+ /sbin/zfs get -H -p -oproperty,value type,mounted,mountpoint,origin zroot/jetpack/pods/0787097f-b195-4992-bfa7-18bcea17f3ba/rootfs.0 | "type\tfilesystem\nmounted\tyes\nmountpoint\t/var/jetpack/pods/0787097f-b195-4992-bfa7-18bcea17f3ba/rootfs/0\norigin\tzroot/jetpack/images/c5241ef8-727f-4dbc-b0fd-b27d6adf2a86@seal\n"
+ /sbin/zfs set jetpack:name=freebsd-base zroot/jetpack/pods/0787097f-b195-4992-bfa7-18bcea17f3ba/rootfs.0
+ /sbin/zfs snapshot zroot/jetpack/pods/0787097f-b195-4992-bfa7-18bcea17f3ba/rootfs.0@parent
+ /sbin/zfs get -H -p -oproperty,value type,mounted,mountpoint,origin zroot/jetpack/pods/0787097f-b195-4992-bfa7-18bcea17f3ba/rootfs.0@parent | "type\tsnapshot\nmounted\t-\nmountpoint\t-\norigin\t-\n"
2016-04-11T13:47:21+02:00 pod:0ca389d6-49a9-4796-8aa0-4eeb18f983a2 DEBUG: Loading manifest [lib/jetpack/pod.go:301]
2016-04-11T13:47:21+02:00 pod:36736fad-80bb-43d6-b3f7-2fb403a8271c DEBUG: Loading manifest [lib/jetpack/pod.go:301]
2016-04-11T13:47:21+02:00 pod:be1c64e0-6a3d-4083-8f48-f2b3d51fc11a DEBUG: Loading manifest [lib/jetpack/pod.go:301]
2016-04-11T13:47:21+02:00 pod:0787097f-b195-4992-bfa7-18bcea17f3ba DEBUG: Using IP 172.23.0.5 [lib/jetpack/pod.go:248]
2016-04-11T13:47:21+02:00 pod:0787097f-b195-4992-bfa7-18bcea17f3ba DEBUG: Saving manifest [lib/jetpack/pod.go:256]
Get http://172.23.0.1:1104/~59dad476f1ff657bfe09c4641a296b1c3521ec9630cf46661e0cc42011d28d767265786000d9837fc4afd0148db2379b8bae6c0e25a5fb86af8762777310c082/_info: dial tcp 172.23.0.1:1104: getsockopt: connection refused
/usr/home/oberstet/scm/3rdparty/jetpack/gopath/src/github.com/3ofcoins/jetpack/lib/jetpack/mds.go:137:
/usr/home/oberstet/scm/3rdparty/jetpack/gopath/src/github.com/3ofcoins/jetpack/lib/jetpack/mds.go:192:
/usr/home/oberstet/scm/3rdparty/jetpack/gopath/src/github.com/3ofcoins/jetpack/lib/jetpack/app.go:68:
/usr/home/oberstet/scm/3rdparty/jetpack/gopath/src/github.com/3ofcoins/jetpack/cmd/jetpack/pod.go:102:
[oberstet@bvr-file1 ~]$

This is my configuration:

[oberstet@bvr-file1 ~]$ cat /usr/local/etc/jetpack.conf
debug = on
mds.signing-key = <SNIP>
mds.token-key = <SNIP>

and this is my env

[oberstet@bvr-file1 ~]$ cat /etc/pf.conf
ext_if="igb0"

set skip on lo1
nat pass on $ext_if from lo1:network to any -> $ext_if

[oberstet@bvr-file1 ~]$ ifconfig lo1
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet 172.23.0.1 netmask 0xffff0000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
[oberstet@bvr-file1 ~]$ ifconfig igb0
igb0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=403bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,VLAN_HWTSO>
        ether 0c:c4:7a:69:be:96
        inet 10.200.1.75 netmask 0xffffff00 broadcast 10.200.1.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
[oberstet@bvr-file1 ~]$ sudo service pf status
No ALTQ support in kernel
ALTQ related functions disabled
Status: Enabled for 0 days 00:22:44           Debug: Urgent

State Table                          Total             Rate
  current entries                        0
  searches                         4108228         3011.9/s
  inserts                                0            0.0/s
  removals                               0            0.0/s
Counters
  match                            4108228         3011.9/s
  bad-offset                             0            0.0/s
  fragment                               0            0.0/s
  short                                  0            0.0/s
  normalize                              0            0.0/s
  memory                                 0            0.0/s
  bad-timestamp                          0            0.0/s
  congestion                             0            0.0/s
  ip-option                              0            0.0/s
  proto-cksum                            0            0.0/s
  state-mismatch                         0            0.0/s
  state-insert                           0            0.0/s
  state-limit                            0            0.0/s
  src-limit                              0            0.0/s
  synproxy                               0            0.0/s
[oberstet@bvr-file1 ~]$ env | grep -i proxy
http_proxy=http://10.200.1.21:8080
npm_config_https_proxy=http://10.200.1.21:8080
https_proxy=http://10.200.1.21:8080
npm_config_proxy=http://10.200.1.21:8080

and

[oberstet@bvr-file1 ~]$ cat /etc/rc.conf
hostname="bvr-file1"
keymap="german.iso.kbd"

# ifb uplink
ifconfig_igb0="inet 10.200.1.75 netmask 255.255.255.0"
defaultrouter="10.200.1.1"

#3 ports on rack switch
ifconfig_igb1="inet 10.1.1.13 netmask 255.255.255.0"
ifconfig_ix0="inet 10.1.1.14 netmask 255.255.255.0"
ifconfig_ix1="inet 10.1.1.15 netmask 255.255.255.0"

# Jetpack networking
cloned_interfaces="lo1"
ipv4_addrs_lo1="172.23.0.1/16"

# Services
pf_enable="YES"
pflog_enable="YES"
sshd_enable="YES"
ntpd_enable="YES"
dumpdev="NO"
zfs_enable="YES"
ctld_enable="YES"
smartd_enable="YES"
linux_enable="YES"
samba_enable="YES"
rpcbind_enable="YES"
nfs_server_enable="YES"
#nfsv4_server_enable="YES"
#nfsuserd_enable="YES"
mountd_enable="YES"
mountd_flags="-r"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
svscan_enable="YES"
[oberstet@bvr-file1 ~]$

The external interface (igb0) is the default gateway to the internet, but there is a firewall (on another system) that will block anything but ports 80/443.

[oberstet@bvr-file1 ~]$ telnet google.de 80
Trying 172.217.21.3...
Connected to google.de.
Escape character is '^]'.
GET / HTTP/1.1
Host: google.de

HTTP/1.1 301 Moved Permanently
Location: http://www.google.de/
Content-Type: text/html; charset=UTF-8
Date: Mon, 11 Apr 2016 12:09:43 GMT
Expires: Wed, 11 May 2016 12:09:43 GMT
Cache-Control: public, max-age=2592000
Server: gws
Content-Length: 218
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.de/">here</A>.
</BODY></HTML>

What could I try/do?

Thanks again for any help!

raviqqe commented 8 years ago

I have the same problem on FreeBSD 11-RELEASE.

raviqqe commented 8 years ago

I maybe found out the solution. You need to run the mds first. It runs on 172.23.0.1:1104.

sudo $(jetpack config path.libexec)/mds

Then, try to run a pod again. It's running!

me@hostside % sudo jetpack run -t 3c240940-8613-4d69-be46-08eb6927d979
FreeBSD ?.?.?  (UNKNOWN)

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/
FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
FreeBSD FAQ:           https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums:        https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with:  pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed:  freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages:  man man
FreeBSD directory layout:      man hier

Edit /etc/motd to change this login announcement.
root@3c240940-8613-4d69-be46-08eb6927d979:~ # 

The problem is that running mds is documented right above the section of Building Images in README.md. I think it should be moved into a proper place (in the Getting Started section?).

oberstet commented 8 years ago

@raviqqe Ah, makes sense. Yeah, moving this crucial bit of info into the Getting Started section: +1