Closed moayedyagout closed 4 years ago
Hi,
Can you please post the output of docker version
and docker inspect ripe-atlas
?
Docker Version As below:
`Client: Docker Engine - Community
Version: 19.03.12
API version: 1.40
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:46:54 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.12
API version: 1.40 (minimum version 1.12)
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:45:28 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683`
and Here are the result of the second command :
`[root@Docker ~]# docker inspect ripe-atlas
[
{
"Id": "7046874f329ec13a2e5a516fcd3b002f8898b556a2ff967d1375c70ad8fab61c",
"Created": "2020-06-28T10:40:08.7184555Z",
"Path": "entrypoint.sh",
"Args": [
"atlas"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 2577,
"ExitCode": 0,
"Error": "",
"StartedAt": "2020-06-28T10:40:10.9029316Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:b89c7188af45d126ee15960639cf2ca2a40f2ee0e2686e3f3e4900f1b0356461",
"ResolvConfPath": "/var/lib/docker/containers/7046874f329ec13a2e5a516fcd3b002f8898b556a2ff967d1375c70ad8fab61c/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/7046874f329ec13a2e5a516fcd3b002f8898b556a2ff967d1375c70ad8fab61c/hostname",
"HostsPath": "/var/lib/docker/containers/7046874f329ec13a2e5a516fcd3b002f8898b556a2ff967d1375c70ad8fab61c/hosts",
"LogPath": "/var/lib/docker/containers/7046874f329ec13a2e5a516fcd3b002f8898b556a2ff967d1375c70ad8fab61c/7046874f329ec13a2e5a516fcd3b002f8898b556a2ff967d1375c70ad8fab61c-json.log",
"Name": "/ripe-atlas",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/var/atlas-probe/etc:/var/atlas-probe/etc",
"/var/atlas-probe/status:/var/atlas-probe/status"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {
"max-size": "10m"
}
},
"NetworkMode": "default",
"PortBindings": {},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": [
"SYS_ADMIN",
"CAP_NET_RAW",
"CAP_CHOWN"
],
"CapDrop": null,
"Capabilities": null,
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 67108864,
"NanoCpus": 1000000000,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 67108864,
"MemorySwap": 134217728,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"Mounts": [
{
"Type": "tmpfs",
"Target": "/var/atlasdata",
"TmpfsOptions": {
"SizeBytes": 67108864
}
}
],
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/13095bf15365af3581dff3ab3fc89f36ba914828815da7446466d13fd24fc96a-init/diff:/var/lib/docker/overlay2/a7db251ddc69bf3dae4a2232cdae0571c1ebffcabe5406f454c4b80bdfeeb06a/diff:/var/lib/docker/overlay2/70abaabb82273a8db63a33eaeb8c2d76114fb9efbc1929a6523019c83f6efb7a/diff:/var/lib/docker/overlay2/b5513011809b45e268633de75a0054576b59f510f723107f2b35df555422402b/diff:/var/lib/docker/overlay2/91ab1fe71b2ce90b9b8fe1c9882c641e440900162785bd630562f563e5143dfe/diff:/var/lib/docker/overlay2/22dbc0e79f802efa112f803bcf5ca98dfabbd60d5a45efaddf770df39d48cbd9/diff",
"MergedDir": "/var/lib/docker/overlay2/13095bf15365af3581dff3ab3fc89f36ba914828815da7446466d13fd24fc96a/merged",
"UpperDir": "/var/lib/docker/overlay2/13095bf15365af3581dff3ab3fc89f36ba914828815da7446466d13fd24fc96a/diff",
"WorkDir": "/var/lib/docker/overlay2/13095bf15365af3581dff3ab3fc89f36ba914828815da7446466d13fd24fc96a/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/var/atlas-probe/etc",
"Destination": "/var/atlas-probe/etc",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/var/atlas-probe/status",
"Destination": "/var/atlas-probe/status",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "tmpfs",
"Source": "",
"Destination": "/var/atlasdata",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "Docker",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"RXTXRPT=yes",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"atlas"
],
"Image": "jamesits/ripe-atlas:latest",
"Volumes": {
"/var/atlas-probe/etc": {},
"/var/atlas-probe/status": {}
},
"WorkingDir": "/var/atlas-probe",
"Entrypoint": [
"entrypoint.sh"
],
"OnBuild": null,
"Labels": {
"image": "ripe-atlas",
"maintainer": "dockerhub@public.swineson.me"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "4d2133b7cd29d34ac713537e6fa992a818511f106972e958d81f331498f1c987",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": "/var/run/docker/netns/4d2133b7cd29",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "d93a26a013e4e36d4af8e3f56a099c97c06b11deefb330d1f141dd624ca8eebc",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "074a92c7a612134d09868469af835ba3ef89743ea1409fe6e54a25ffca25d764",
"EndpointID": "d93a26a013e4e36d4af8e3f56a099c97c06b11deefb330d1f141dd624ca8eebc",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02",
"DriverOpts": null
}
}
}
}
]
`
That looks good to me. Do the following files exist on your system?
/var/atlas-probe/etc/probe_key
/var/atlas-probe/etc/probe_key.pub
If one of them is missing, try to remove both files and docker restart ripe-atlas
. If both files exist, I guess there is some permission issue preventing atlas from reading the private key file.
Dear James ,
[root@Docker etc]# docker container logs --details cd9163c66516
Option RXTXRPT=yes
/var/atlasdata is not mounted
/var/atlasdata is not mounted
[root@Docker etc]# ls /var/atlas-probe/etc/
probe_key probe_key.pub
[root@Docker etc]#
This is what I am getting from logs of the container
OK, /var/atlasdata is not mounted
is going to be a major issue since it will endlessly wait for a tmpfs to be mounted. A tmpfs not really necessary when running on a server and I'm still waiting for https://github.com/RIPE-NCC/ripe-atlas-software-probe/pull/37 to be accepted to the upstream code.
I'm not sure why it think /var/atlasdata
is not mounted, the same code runs fine on my machine (TM) :(
how about I try to mount it manully?
what should the directory /var/atlasdata be mounted to?
since I am running docker on root , I wouldn't think there would be any permission issue unless the mounting process or the caller process uses another user to mount the directory.
should I mount /var/atlasdata to tmpfs?
--mount type=tmpfs,destination=/var/atlasdata,tmpfs-size=64M
during docker run
should be sufficient to mount a tmpfs
to that directory and I think you have already done this.
Try docker exec -it ripe-atlas mount
while the container is running and /var/atlasdata
should have an entry in there...
I tried docker exec -it ripe-atlas mount
overlay on / type overlay (rw,relatime,seclabel,lowerdir=/var/lib/docker/overlay2/l/C6FVD24T2XCMBF3MHMERS2FDGS:/var/lib/docker/overlay2/l/NR6ONBK6ZAKIDBFMWS6ZJFD3UZ:/var/lib/docker/overlay2/l/2K32ATBLAX4NDRLNH4PCSOOBXC:/var/lib/docker/overlay2/l/JQ6TXZM2NW3RVKV4CHS2VPJ3FC:/var/lib/docker/overlay2/l/U2R5AHARTJMY5Q2TLC3NLYNNMC:/var/lib/docker/overlay2/l/XFKS27LEVIGGGVHLPR2LAAII5I,upperdir=/var/lib/docker/overlay2/1e30aa9208194d5d6b9d4778902d59943fb99f669f9a9db8859e4953234ec56e/diff,workdir=/var/lib/docker/overlay2/1e30aa9208194d5d6b9d4778902d59943fb99f669f9a9db8859e4953234ec56e/work)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,seclabel,size=65536k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=666)
sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime,seclabel)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (ro,nosuid,nodev,noexec,relatime,seclabel,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/freezer type cgroup (ro,nosuid,nodev,noexec,relatime,seclabel,freezer)
cgroup on /sys/fs/cgroup/cpuset type cgroup (ro,nosuid,nodev,noexec,relatime,seclabel,cpuset)
cgroup on /sys/fs/cgroup/memory type cgroup (ro,nosuid,nodev,noexec,relatime,seclabel,memory)
cgroup on /sys/fs/cgroup/perf_event type cgroup (ro,nosuid,nodev,noexec,relatime,seclabel,perf_event)
cgroup on /sys/fs/cgroup/pids type cgroup (ro,nosuid,nodev,noexec,relatime,seclabel,pids)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (ro,nosuid,nodev,noexec,relatime,seclabel,net_prio,net_cls)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (ro,nosuid,nodev,noexec,relatime,seclabel,cpuacct,cpu)
cgroup on /sys/fs/cgroup/blkio type cgroup (ro,nosuid,nodev,noexec,relatime,seclabel,blkio)
cgroup on /sys/fs/cgroup/devices type cgroup (ro,nosuid,nodev,noexec,relatime,seclabel,devices)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (ro,nosuid,nodev,noexec,relatime,seclabel,hugetlb)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime,seclabel)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel,size=65536k)
/dev/mapper/centos-var on /etc/resolv.conf type xfs (rw,relatime,seclabel,attr2,inode64,sunit=128,swidth=128,noquota)
/dev/mapper/centos-var on /etc/hostname type xfs (rw,relatime,seclabel,attr2,inode64,sunit=128,swidth=128,noquota)
/dev/mapper/centos-var on /etc/hosts type xfs (rw,relatime,seclabel,attr2,inode64,sunit=128,swidth=128,noquota)
tmpfs on /var/atlasdata type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel,size=65536k)
/dev/mapper/centos-var on /var/atlas-probe/etc type xfs (rw,relatime,seclabel,attr2,inode64,sunit=128,swidth=128,noquota)
/dev/mapper/centos-var on /var/atlas-probe/status type xfs (rw,relatime,seclabel,attr2,inode64,sunit=128,swidth=128,noquota)
proc on /proc/bus type proc (ro,relatime)
proc on /proc/fs type proc (ro,relatime)
proc on /proc/irq type proc (ro,relatime)
proc on /proc/sys type proc (ro,relatime)
proc on /proc/sysrq-trigger type proc (ro,relatime)
tmpfs on /proc/acpi type tmpfs (ro,relatime,seclabel)
tmpfs on /proc/kcore type tmpfs (rw,nosuid,seclabel,size=65536k,mode=755)
tmpfs on /proc/keys type tmpfs (rw,nosuid,seclabel,size=65536k,mode=755)
tmpfs on /proc/timer_list type tmpfs (rw,nosuid,seclabel,size=65536k,mode=755)
tmpfs on /proc/timer_stats type tmpfs (rw,nosuid,seclabel,size=65536k,mode=755)
tmpfs on /proc/sched_debug type tmpfs (rw,nosuid,seclabel,size=65536k,mode=755)
tmpfs on /proc/scsi type tmpfs (ro,relatime,seclabel)
tmpfs on /sys/firmware type tmpfs (ro,relatime,seclabel)
and there was no directory /var/atlasdata
I have deleted the container and created it again:
here is what i can see:
Option RXTXRPT=yes
RXTXRPT=yes
RESULT 9000 done 1593589917 0242ac110002 STARTING ATLAS system initialized (reboot count 0)
RESULT 9000 done 1593589917 0242ac110002 STARTING TELNETD LOCALLY
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.0.2 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:ac:11:00:02 txqueuelen 0 (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
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
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
RESULT 9006 done 1593589917 0242ac110002 no reginit.vol start registeration
/var/atlas-probe/status/reginit.vol does not exist try new reg
Ping failed
start reg
ATLAS registeration starting
REREG_TIMER 1593513804 expired now is 1593589917
REREG_TIMER_EXPIRED go re register REREG_TIMER 1 , now is 1593589917
REGHOSTS reg03.atlas.ripe.net 193.0.19.246 2001:67c:2e8:11::c100:13f6 reg04.atlas.ripe.net 193.0.19.247 2001:67c:2e8:11::c100:13f7
ssh -i /var/atlas-probe/etc/probe_key -p 443 atlas@2001:67c:2e8:11::c100:13f7 INIT
255 REGINIT exit with error
chmod: changing permissions of '/var/atlas-probe/data': Operation not permitted
perd: in my_exit (exit was called!)
Aborted
eperd: in my_exit (exit was called!)
Aborted
And we are done
rptaddrs: error writing to '����': Success
I can see the line
tmpfs on /var/atlasdata type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel,size=65536k)
so atlas should correctly detect that tmpfs being mounted.
The logs you posted looks good to me. It first tried IPv6 and failed, it would try again in some time using IPv4.
Closing due to aging. If you are still having this problem, feel free to re-open it!
Hi James,
I want to deploy the SW RIPE Probe so I created a new docker container using the script
docker run --detach --restart=always --log-opt max-size=10m \ --cpus=1 --memory=64m --memory-reservation=64m \ --cap-add=SYS_ADMIN --cap-add=CAP_NET_RAW --cap-add=CAP_CHOWN \ --mount type=tmpfs,destination=/var/atlasdata,tmpfs-size=64M \ -v /var/atlas-probe/etc:/var/atlas-probe/etc \ -v /var/atlas-probe/status:/var/atlas-probe/status \ -e RXTXRPT=yes \ --name ripe-atlas --hostname "$(hostname --fqdn)" \ jamesits/ripe-atlas:latest
then I checked the docker container logs as below:
my OS is CentOS7.
I can not see where the issue is.