ytti / oxidized

Oxidized is a network device configuration backup tool. It's a RANCID replacement!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't access web via docker

dandunckelman opened this issue · comments

I followed all the steps, but I can't seem to find a way to access the UI.

Environment Details

  • VM: Ubuntu 14.04.4
  • Docker: Docker version 1.11.1, build 5604cbe
  • Config file:

---
debug: true
groups: {}
input:
  default: ssh, telnet
  debug: true
  ssh:
    secure: false
interval: 3600
model: junos
model_map:
  cisco: ios
  juniper: junos
output:
  default: file
  file:
    directory: /root/.config/oxidized/configs
password: password
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 127.0.0.1:8888
retries: 3
source:
  default: csv
  csv:
    file: /root/.config/oxidized/router.db
    delimiter: !ruby/regexp /:/
    map:
      name: 0
      model: 1
      username: 2
      password: 3
threads: 30
timeout: 20
use_syslog: false
username: username
vars:
  enable: ENABLE_PASS
  • Router.db
HOST_IP:ftos:USER_NAME:PASSWORD
  • When I try curl -v http://127.0.0.1:8888, it returns Empty reply from server Connection #0 to host 127.0.0.1 left intact

Thanks for Oxidized and any help. Please let me know if you need more info.

in config

from
rest: 127.0.0.1:8888

to
rest: 0.0.0.0:8888

if bind to 127.0.0.1 it will only accessible in container itself , in my case I bind to all interface then expose port out. check below script.

dev-oxidized.sh

docker build -t broxio/oxidized:dev oxidized-dev/
docker stop dev-ox
docker rm dev-ox
docker run --hostname=dev-ox \
           --name dev-ox \
           -v /opt/dev/oxidized:/root/.config/oxidized \
           -v /opt/dev/oxidized/hosts:/etc/hosts \
           -p 10200:8888/tcp \
           -e CONFIG_RELOAD_INTERVAL=300 \
           -t broxio/oxidized:dev oxidised

now you will able to access UI via http://docker_host_ip:10200

Thanks! That was it!

Thanks for opening this ticket (and getting the answer from @broxio ) ! IMHO, I would suggest to put in the documentation in the docker file section a reference to this problem as it took a couple of hours to find the reason.

Thank you !!!!! binding to 0.0.0.0 fixed the issue

Hello,
i'm facing the same issue even with binding to 0.0.0.0
my config:
sername: username
password: password
model: junos
resolve_dns: true
interval: 3600
use_syslog: false
debug: false
threads: 30
use_max_threads: false
timeout: 20
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 0.0.0.0:8888
next_adds_job: false
vars: {}
groups: {}
group_map: {}
models: {}
pid: "/root/.config/oxidized/pid"
crash:
directory: "/root/.config/oxidized/crashes"
hostnames: false
stats:
history_size: 10
input:
default: ssh, telnet
debug: false
ssh:
secure: false
ftp:
passive: true
utf8_encoded: true
output:
default: file
source:
default: csv
csv:
file: "/root/.config/oxidized/router.db"
delimiter: !ruby/regexp /:/
map:
name: 0
model: 1
ip: 2
gpg: false
model_map:
juniper: junos
cisco: ios

VM: Ubuntu 22.04
Docker: Docker version 24.04
docker compose version 2.19.1

Trying 127.0.0.1:8888...

  • Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)

GET / HTTP/1.1
Host: 127.0.0.1:8888
User-Agent: curl/7.81.0
Accept: /

  • Recv failure: Connection reset by peer
  • Closing connection 0
    curl: (56) Recv failure: Connection reset by peer