Failed to execute command: env DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt-get --assume-yes -q update - ceph

I'm new to Ceph, and I'm trying to install and config a ceph-cluster.
After successfully installing the ceph-cluster I've run into some issues regarding storage and decided to re-install after purging everything and following this guide
https://www.howtoforge.com/tutorial/how-to-install-a-ceph-cluster-on-ubuntu-16-04/
which went well the first time I've installed this.
But in my second attempt I get this error after running the install command:
ceph-deploy install ceph-admin ceph-osd1 ceph-osd2 ceph-osd3 mon1
And this is my output:
[ceph_deploy.conf][DEBUG ] found configuration file at: /home/cep/.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (2.0.1): /usr/local/bin/ceph-deploy install ceph-admin ceph-osd1 ceph-osd2 ceph-osd3 mon1
[ceph_deploy.cli][INFO ] ceph-deploy options:
[ceph_deploy.cli][INFO ] verbose : False
[ceph_deploy.cli][INFO ] testing : None
[ceph_deploy.cli][INFO ] cd_conf : <ceph_deploy.conf.cephdeploy.Conf instance at 0x7f11585e0b90>
[ceph_deploy.cli][INFO ] cluster : ceph
[ceph_deploy.cli][INFO ] dev_commit : None
[ceph_deploy.cli][INFO ] install_mds : False
[ceph_deploy.cli][INFO ] stable : None
[ceph_deploy.cli][INFO ] default_release : False
[ceph_deploy.cli][INFO ] username : None
[ceph_deploy.cli][INFO ] adjust_repos : True
[ceph_deploy.cli][INFO ] func : <function install at 0x7f115851d9d0>
[ceph_deploy.cli][INFO ] install_mgr : False
[ceph_deploy.cli][INFO ] install_all : False
[ceph_deploy.cli][INFO ] repo : False
[ceph_deploy.cli][INFO ] host : ['ceph-admin', 'ceph-osd1', 'ceph-osd2', 'ceph-osd3', 'mon1']
[ceph_deploy.cli][INFO ] install_rgw : False
[ceph_deploy.cli][INFO ] install_tests : False
[ceph_deploy.cli][INFO ] repo_url : None
[ceph_deploy.cli][INFO ] ceph_conf : None
[ceph_deploy.cli][INFO ] install_osd : False
[ceph_deploy.cli][INFO ] version_kind : stable
[ceph_deploy.cli][INFO ] install_common : False
[ceph_deploy.cli][INFO ] overwrite_conf : False
[ceph_deploy.cli][INFO ] quiet : False
[ceph_deploy.cli][INFO ] dev : master
[ceph_deploy.cli][INFO ] nogpgcheck : False
[ceph_deploy.cli][INFO ] local_mirror : None
[ceph_deploy.cli][INFO ] release : None
[ceph_deploy.cli][INFO ] install_mon : False
[ceph_deploy.cli][INFO ] gpg_url : None
[ceph_deploy.install][DEBUG ] Installing stable version mimic on cluster ceph hosts ceph-admin ceph-osd1 ceph-osd2 ceph-osd3 mon1
[ceph_deploy.install][DEBUG ] Detecting platform for host ceph-admin ...
cep#ceph-admin's password:
[ceph-admin][DEBUG ] connection detected need for sudo
cep#ceph-admin's password:
[ceph-admin][DEBUG ] connected to host: ceph-admin
[ceph-admin][DEBUG ] detect platform information from remote host
[ceph-admin][DEBUG ] detect machine type
[ceph_deploy.install][INFO ] Distro info: Ubuntu 18.04 bionic
[ceph-admin][INFO ] installing Ceph on ceph-admin
[ceph-admin][INFO ] Running command: sudo env DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt-get --assume-yes -q update
[ceph-admin][DEBUG ] Hit:1 http://mirrors.service.networklayer.com/ubuntu bionic InRelease
[ceph-admin][DEBUG ] Hit:2 http://mirrors.service.networklayer.com/ubuntu bionic-updates InRelease
[ceph-admin][DEBUG ] Hit:3 http://mirrors.service.networklayer.com/ubuntu bionic-backports InRelease
[ceph-admin][DEBUG ] Hit:4 http://mirrors.service.networklayer.com/ubuntu bionic-security InRelease
[ceph-admin][DEBUG ] Hit:5 https://download.docker.com/linux/ubuntu bionic InRelease
[ceph-admin][DEBUG ] Ign:6 https://artifactory.haifa.ibm.com/artifactory/hrl-site-layer-ubuntu bionic InRelease
[ceph-admin][DEBUG ] Hit:7 https://artifactory.haifa.ibm.com/artifactory/hrl-site-layer-ubuntu bionic Release
[ceph-admin][DEBUG ] Hit:8 http://apt.puppetlabs.com bionic InRelease
[ceph-admin][DEBUG ] Ign:9 https://download.ceph.com/rpm-nautilus/el7 bionic InRelease
[ceph-admin][DEBUG ] Err:10 https://download.ceph.com/rpm-nautilus/el7 bionic Release
[ceph-admin][DEBUG ] 404 Not Found [IP: 158.69.68.124 443]
[ceph-admin][DEBUG ] Ign:12 https://pkg.duosecurity.com/Ubuntu bionic InRelease
[ceph-admin][DEBUG ] Hit:13 https://pkg.duosecurity.com/Ubuntu bionic Release
[ceph-admin][DEBUG ] Hit:15 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease
[ceph-admin][DEBUG ] Reading package lists...
[ceph-admin][WARNIN] E: The repository 'https://download.ceph.com/rpm-nautilus/el7 bionic Release' does not have a Release file.
[ceph-admin][ERROR ] RuntimeError: command returned non-zero exit status: 100
[ceph_deploy][ERROR ] RuntimeError: Failed to execute command: env DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt-get --assume-yes -q update
Already tried to use a different machine as the admin-node and re-install but nothing seems to work, I hope someone here could help :)
Thanks!

Managed to sort it out by changing the repository it is downloading from to debian-15.2.4 by installing Ceph like this:
ceph-deploy install ceph-admin ceph-osd1 ceph-osd2 ceph-osd3 mon1 --repo-url=https://download.ceph.com/debian-15.2.4/

Related

Heteki no space error

I'm trying to setup a glusterfs cluster with kubernetes.
I managed to start the glusterd pods on all the nodes (3 nodes)
I also managed to load the topology successfully, however when I run
heketi-cli setup-openshift-heketi-storage
I get the following error:
Error: No space
This is the output of
heketi-cli topology load --json=gluster-kubernetes/deploy/topology.json
Found node vps01 on cluster 1a36667e4275773fc353f2caaaaaaa
Adding device /dev/loop0 ... OK
Found node vps02 on cluster 1a36667e4275773fc353faaaaaaaa
Found device /dev/loop0
Found node vps04 on cluster 1a36667e4275773fc353faaaaaaa
Adding device /dev/loop0 ... OK
Output of
heketi-cli topology info
Cluster Id: 1a36667e4275773fc353f2caaaaaa
File: true
Block: true
Volumes:
Nodes:
Node Id: 1752dcf447c8eb6eaad45aaaa
State: online
Cluster Id: 1a36667e4275773fc353f2caaa
Zone: 1
Management Hostnames: vps01
Storage Hostnames: XX.XX.XX.219
Devices:
Id:50396d72293c4723504810108bd75d41 Name:/dev/loop0 State:online Size (GiB):12 Used (GiB):0 Free (GiB):12
Bricks:
Node Id: 56b8c1942b347a863ee73a005758cc27
State: online
Cluster Id: 1a36667e4275773fc353f2c8eb2dd2a3
Zone: 1
Management Hostnames: vps04
Storage Hostnames: XX.XX.XX.227
Devices:
Id:dc75ad8154234ebcf9174b018d0bc30a Name:/dev/loop0 State:online Size (GiB):9 Used (GiB):4 Free (GiB):5
Bricks:
Node Id: f82cb81a026884764d3d953c7c9b6a9f
State: online
Cluster Id: 1a36667e4275773fc353f2c8eb2dd2a3
Zone: 1
Management Hostnames: vps02
Storage Hostnames: XX.XX.XX.157
Devices:
Id:1914102b7ae395f12797981a0e3cf5a4 Name:/dev/loop0 State:online Size (GiB):4 Used (GiB):4 Free (GiB):0
Bricks:
There is no more space on device 1914102b7ae395f12797981a0e3cf5a4, however I didn't not store anything yet on the device.
For info here is the topology.json file:
{
"clusters": [
{
"nodes": [
{
"node": {
"hostnames": {
"manage": [
"vps01"
],
"storage": [
"XX.XX.XX.219"
]
},
"zone": 1
},
"devices": [
"/dev/loop0"
]
},
{
"node": {
"hostnames": {
"manage": [
"vps02"
],
"storage": [
"XX.XX.XX.157"
]
},
"zone": 1
},
"devices": [
"/dev/loop0"
]
},
{
"node": {
"hostnames": {
"manage": [
"vps04"
],
"storage": [
"XX.XX.XX.227"
]
},
"zone": 1
},
"devices": [
"/dev/loop0"
]
}
]
}
]
}
You can try this:
# ./gk-deploy -g --abort
# dmsetup remove_all # In each server.
# dmsetup ls
# rm -fr /var/lib/glusterd/vols/* # In each server.
# rm -fr /var/lib/heketi/* # In each server.
# wipefs -a /dev/<device> # In each server.
source: https://github.com/gluster/gluster-kubernetes/issues/369#issuecomment-383247722

Using ceph-deploy when APT repos are down

Using ceph-deploy install ... fails when the download.ceph.com website/repo is down. Is there a way to install from a mirror? In the docs you can see --repo-url option, but it seems to still download from download.ceph.com. See hereafter:
ceph-deploy install --repo-url http://eu.ceph.com/debian-jewel/ ogw01
[ceph_deploy.conf][DEBUG ] found configuration file at: /home/bstor/.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (1.5.35): /usr/bin/ceph-deploy install --repo-url http://eu.ceph.com/debian-jewel/ ogw01
[ceph_deploy.cli][INFO ] ceph-deploy options:
[ceph_deploy.cli][INFO ] verbose : False
[ceph_deploy.cli][INFO ] testing : None
[ceph_deploy.cli][INFO ] cd_conf : <ceph_deploy.conf.cephdeploy.Conf instance at 0x7faec06d8638>
[ceph_deploy.cli][INFO ] cluster : ceph
[ceph_deploy.cli][INFO ] dev_commit : None
[ceph_deploy.cli][INFO ] install_mds : False
[ceph_deploy.cli][INFO ] stable : None
[ceph_deploy.cli][INFO ] default_release : False
[ceph_deploy.cli][INFO ] username : None
[ceph_deploy.cli][INFO ] adjust_repos : True
[ceph_deploy.cli][INFO ] func : <function install at 0x7faec0b1b230>
[ceph_deploy.cli][INFO ] install_all : False
[ceph_deploy.cli][INFO ] repo : False
[ceph_deploy.cli][INFO ] host : ['ogw01']
[ceph_deploy.cli][INFO ] install_rgw : False
[ceph_deploy.cli][INFO ] install_tests : False
[ceph_deploy.cli][INFO ] repo_url : http://eu.ceph.com/debian-jewel/
[ceph_deploy.cli][INFO ] ceph_conf : None
[ceph_deploy.cli][INFO ] install_osd : False
[ceph_deploy.cli][INFO ] version_kind : stable
[ceph_deploy.cli][INFO ] install_common : False
[ceph_deploy.cli][INFO ] overwrite_conf : False
[ceph_deploy.cli][INFO ] quiet : False
[ceph_deploy.cli][INFO ] dev : master
[ceph_deploy.cli][INFO ] nogpgcheck : False
[ceph_deploy.cli][INFO ] local_mirror : None
[ceph_deploy.cli][INFO ] release : None
[ceph_deploy.cli][INFO ] install_mon : False
[ceph_deploy.cli][INFO ] gpg_url : None
[ceph_deploy.install][DEBUG ] Installing stable version jewel on cluster ceph hosts ogw01
[ceph_deploy.install][DEBUG ] Detecting platform for host ogw01 ...
[ogw01][DEBUG ] connection detected need for sudo
[ogw01][DEBUG ] connected to host: ogw01
[ogw01][DEBUG ] detect platform information from remote host
[ogw01][DEBUG ] detect machine type
[ceph_deploy.install][INFO ] Distro info: Ubuntu 16.04 xenial
[ogw01][INFO ] installing Ceph on ogw01
[ceph_deploy.install][WARNIN] --gpg-url was not used, will fallback
[ceph_deploy.install][WARNIN] using GPG fallback: https://download.ceph.com/keys/release.asc
[ogw01][INFO ] using custom repository location: http://eu.ceph.com/debian-jewel/
[ogw01][INFO ] Running command: sudo wget -O release.asc https://download.ceph.com/keys/release.asc
[ogw01][WARNIN] --2016-10-11 14:06:38-- https://download.ceph.com/keys/release.asc
[ogw01][WARNIN] Resolving download.ceph.com (download.ceph.com)... 173.236.253.173, 2607:f298:6050:51f3:f816:3eff:fe71:9135
The following lines:
[ceph_deploy.install][WARNIN] --gpg-url was not used, will fallback
[ceph_deploy.install][WARNIN] using GPG fallback: https://download.ceph.com/keys/release.asc
indicate that download.ceph.com is only used for the gpg part. You can also give --gpg-url option. The following command should work, as it also uses the mirror's key for deploying:
ceph-deploy install --repo-url http://eu.ceph.com --gpg-url http://eu.ceph.com/keys/release.asc ogw01

Gitlab-CI can't make build loading a package from a VCS repository

I'm using gitlab-ci for a repository hosted in gitlab.com and I can't make a build loading a package from a VCS repository.
I use default gitlab-ci-multi-runner 1.1.3.
My .gitlab-ci.yml:
image: php:5.6
services:
- mysql:latest
variables:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: test
before_script:
- mkdir ~/.ssh
- ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
- bash gitlab-ci.sh > /dev/null
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
- cp database/database.sqlite.example database/database.sqlite
- cp .env.test .env
- php artisan key:generate
- php artisan migrate:refresh --seed
test:
script:
- vendor/bin/phpunit
My composer.json:
{
"name": "foo",
"description": "Foo",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"repositories": [
{
"type": "vcs",
"url": "git#gitlab.com:maneko/maravel-pages.git"
}
],
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"barryvdh/laravel-debugbar": "^2.1",
"squizlabs/php_codesniffer": "*",
"proengsoft/laravel-jsvalidation": "1.3.1",
"yajra/laravel-datatables-oracle": "~6.0",
"dimsav/laravel-translatable": "^5.5",
"laravelcollective/html": "5.2.*",
"maravel/pages": "dev-master"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
},
"files": [
"app/helpers.php"
]
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize",
"php artisan vendor:publish --provider=\"Proengsoft\\JsValidation\\JsValidationServiceProvider\" --tag=public --force"
]
},
"config": {
"preferred-install": "dist"
}
}
I'm getting this error related with access rights and I don't know what else to do. I read to add this in .gitlab-ci.yml file but it didn't work:
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts`
Any help please??
Thanks!!!
the gitlab-ci script is running as a different user. If you've created a key locally and want to use it inside your gitlab-ci you must make the key available for the gitlab-ci.
One way is to copy the file - cp ~/.ssh/gitlab.com ~/.ssh/id_rsa
This should copy your local key into the gitlab runner.
Be aware that the HostKeyChecking by SSH could be a problem sometimes:
Solution
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
will prevent that.

Plugin 0 specified in babel-preset-es2015 provided an invalid property of _c

Getting above error with below configuration, commenting passPerPreset removes the error however. Is there any configuration missing ?
.babelrc :
{
"passPerPreset": true,
"presets": [{
"plugins": [
"./build/babelRelayPlugin",
"transform-runtime",
"transform-es2015-classes"
]
}, "es2015", "stage-0", "react"],
"env": {
"development": {
"presets": ["react-hmre"]
}
}
}
package.json :
"babel-cli": "^6.5.1",
"babel-core": "^6.5.2",
"babel-eslint": "^4.1.8",
"babel-loader": "^6.2.2",
"babel-plugin-react-transform": "^2.0.0",
"babel-plugin-transform-es2015-classes": "^6.5.2",
"babel-plugin-transform-runtime": "^6.5.2",
"babel-polyfill": "^6.5.0",
"babel-preset-es2015": "^6.5.0",
"babel-preset-react": "^6.5.0",
"babel-preset-react-hmre": "^1.1.0",
"babel-preset-stage-0": "^6.5.0",
"babel-relay-plugin": "^0.7.0",
"babel-runtime": "^6.5.0",
Webpack :
module: {
loaders: [
{
loader: "babel-loader",
include: [
path.resolve(__dirname, "app"),
],
test: /\.jsx?$/,
query: {
plugins: ['transform-runtime'],
presets: ['react', 'es2015', 'stage-0'],
}
},
]
},
Error : babel-node start
Module build failed: Error: Plugin 0 specified in "/Users/my/demo/node_modules/babel-preset-es2015/index.js" provided an invalid property of "_c"
What worked for me was:
rm -rf node_modules
npm prune
npm cache clear
npm cache clean
npm i
Upgrading babel-core and babel-loader fixed this for me.
npm install --save babel-core#latest babel-loader#latest
I think that there might be contention between what you've specified in .babelrc and what you've configured in babel-loader.
Can you try to remove the query from your Webpack config?
I had the same problem, but removing and rebuilding node_modules as Alex suggested didn't help in my case.
It turned out that there was some version mismatch with may packages. When I deleted all the dependencies and devDependencies from package.json and added them again by npm i -S or npm i -D respectively, everything started to work again.
Clearing my node_modules etc didn't work. However, commenting-out passPerPreset did the trick. TBH I'm not really sure what that option does, but most of the google hits on it are bug reports, so I'm fine so long as it works.
// babelrc
{
//"passPerPreset": true,
"presets": [
"stage-0",
"react-app"
],
"plugins": [
"transform-runtime",
"syntax-async-functions",
"transform-decorators-legacy",
"transform-class-properties",
"react-relay"
]
}
Updating my npm version solved this problem.

Jboss 5.1 in Dockerfile - how to reach the server in a browser

I have a dockerfile which looks like this:
FROM ubuntu:trusty
RUN DEBIAN_FRONTEND=noninteractive apt-get -yq upgrade
# Update to latest
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" > /etc/apt/sources.list
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" > /etc/apt/sources.list.d/webupd8team-java.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C2518248EEA14886
RUN apt-get update
RUN apt-get upgrade -y
# Install basics
# RUN apt-get install -y python-software-properties software-properties-common unzip
RUN apt-get install -y unzip
# Install Java, auto-accepting the license
# RUN add-apt-repository -y ppa:webupd8team/java
# RUN apt-get update
# RUN echo oracle-java6-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
# RUN apt-get install -y oracle-java6-installer
RUN echo oracle-java6-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
# Install different Java versions
RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq oracle-java6-installer
# Set environment variables pointing to different Java installations
ENV JAVA_HOME /usr/lib/jvm/java-6-oracle
ENV JAVA6_HOME /usr/lib/jvm/java-6-oracle
# Ensure Java 6 is the default version
RUN update-java-alternatives -s java-6-oracle
# Install JBoss 5.1.0.GA
RUN wget -O jboss.zip http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA-jdk6.zip/download
RUN unzip jboss.zip && mv jboss-5.1.0.GA /opt
RUN cd /opt/jboss-5.1.0.GA/bin && chmod +x *.sh
CMD /opt/jboss-5.1.0.GA/bin/run.sh
# Clean-up to reduce the image size
RUN apt-get clean
EXPOSE 8080
i build it than with:
sudo docker build -t dockerfile .
everything builds fine. so I start the server with:
sudo docker run -it --publish 127.0.0.1:8080:8080 dockerfile:latest
I can see that the server starts correctly
If I enter the URL 127.0.0.1:8080 i got an error site:
the connection was reset - the connection to the server was reset
while the page was loading
How do I get a connection to the server in my browser?
The inspect of my container looks like this:
[{
"Args": [
"-c",
"/opt/jboss-5.1.0.GA/bin/run.sh"
],
"Config": {
"AttachStderr": false,
"AttachStdin": false,
"AttachStdout": false,
"Cmd": [
"/bin/sh",
"-c",
"/opt/jboss-5.1.0.GA/bin/run.sh"
],
"CpuShares": 0,
"Cpuset": "",
"Domainname": "",
"Entrypoint": null,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"JAVA_HOME=/usr/lib/jvm/java-6-oracle",
"JAVA6_HOME=/usr/lib/jvm/java-6-oracle"
],
"ExposedPorts": {
"8080/tcp": {}
},
"Hostname": "054aaccfd754",
"Image": "dockerfile:latest",
"Memory": 0,
"MemorySwap": 0,
"NetworkDisabled": false,
"OnBuild": null,
"OpenStdin": false,
"PortSpecs": null,
"SecurityOpt": null,
"StdinOnce": false,
"Tty": false,
"User": "",
"Volumes": null,
"WorkingDir": ""
},
"Created": "2014-11-27T11:35:34.538502513Z",
"Driver": "aufs",
"ExecDriver": "native-0.2",
"HostConfig": {
"Binds": null,
"CapAdd": null,
"CapDrop": null,
"ContainerIDFile": "",
"Devices": [],
"Dns": null,
"DnsSearch": null,
"ExtraHosts": null,
"Links": null,
"LxcConf": [],
"NetworkMode": "bridge",
"PortBindings": {
"8080/tcp": [
{
"HostIp": "172.17.42.1",
"HostPort": "8080"
}
]
},
"Privileged": false,
"PublishAllPorts": false,
"RestartPolicy": {
"MaximumRetryCount": 0,
"Name": ""
},
"VolumesFrom": null
},
"HostnamePath": "/var/lib/docker/containers/054aaccfd7544a0c14a9f53f94ea2be0c2d6d58437c5311f6507ce2e4466bfa7/hostname",
"HostsPath": "/var/lib/docker/containers/054aaccfd7544a0c14a9f53f94ea2be0c2d6d58437c5311f6507ce2e4466bfa7/hosts",
"Id": "054aaccfd7544a0c14a9f53f94ea2be0c2d6d58437c5311f6507ce2e4466bfa7",
"Image": "f820f5fe9d26c8e896b9d902492ba66f8ed679792047c9c3147b7045df0ed98f",
"MountLabel": "",
"Name": "/sleepy_franklin",
"NetworkSettings": {
"Bridge": "docker0",
"Gateway": "172.17.42.1",
"IPAddress": "172.17.0.5",
"IPPrefixLen": 16,
"MacAddress": "02:42:ac:11:00:05",
"PortMapping": null,
"Ports": {
"8080/tcp": [
{
"HostIp": "172.17.42.1",
"HostPort": "8080"
}
]
}
},
"Path": "/bin/sh",
"ProcessLabel": "",
"ResolvConfPath": "/var/lib/docker/containers/054aaccfd7544a0c14a9f53f94ea2be0c2d6d58437c5311f6507ce2e4466bfa7/resolv.conf",
"State": {
"ExitCode": 0,
"FinishedAt": "0001-01-01T00:00:00Z",
"Paused": false,
"Pid": 4236,
"Restarting": false,
"Running": true,
"StartedAt": "2014-11-27T11:35:35.120814905Z"
},
"Volumes": {},
"VolumesRW": {}
}
EDIT after jottrs answers:
the logs says:
....
11:36:32,963 INFO [TomcatDeployment] deploy, ctxPath=/admin-console
11:36:33,067 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/admin-console'
11:36:38,001 INFO [TomcatDeployment] deploy, ctxPath=/
11:36:38,068 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console
11:36:38,232 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
11:36:38,314 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
11:36:38,341 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 1m:1s:805ms
nothing more....
because of Jottrs IP mention:
As far as i understood, I bind my server to 127.0.0.1:8080 with the start command:
sudo docker run -it --publish 127.0.0.1:8080:8080 dockerfile:latest
If I look with ifconfig i have the docker file running on:
$ ifconfig
docker0 Link encap:Ethernet Hardware Adresse 56:84:7a:fe:97:99
inet Adresse:172.17.42.1 Bcast:0.0.0.0 Maske:255.255.0.0
inet6-Adresse: fe80::5484:7aff:fefe:9799/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX-Pakete:86 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
TX-Pakete:101 Fehler:0 Verloren:0 Überläufe:0 Träger:0
Kollisionen:0 Sendewarteschlangenlänge:0
RX-Bytes:4983 (4.9 KB) TX-Bytes:12056 (12.0 KB)
But with $ sudo docker inspect --format "{{ .NetworkSettings.IPAddress }}" 054
i get 172.17.0.5
But I also get no connection in my browser with the URL 172.17.0.5:8080 or URL 172.17.42.1:8080
also if I start with $ sudo docker run -d --publish 172.17.42.1:8080:8080 dockerfile:latest (the ifconfig IP) I will not get a connection (and still no reaction on the logs)
$ sudo docker exec -it 228 bash
root#22870ce4265e:/# cat /etc/hosts
172.17.0.6 22870ce4265e
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
The problem is JBoss not Docker. JBoss listen per default only to localhost:8080 Jboss only works on localhost:8080 ,but doesnt reply when called by ip (I'm not a JBoss guy so you have to try "-b 0.0.0.0" or to provide a server.xml via ADD in your Dockerfile).
When you run (in my case I called the container jboss)
sudo docker exec jboss apt-get install curl -y
sudo docker exec jboss curl localhost:8080
you notice that JBoss runs and is accessable.