docker: vimagick/stunnel ==> /entrypoint.sh: line 21: openssl: not found - docker

I am working on a ubuntu 18.04.4 LTS VM, where I have docker and docker-compose installed.
I am using a vimagick / stunnel image to build a tunnel against a client for quickFix services.
Problem: In a new installation, when I raise the docker-compose file, throw the following error:
tunnel_primary_1 | chmod: stunnel.pem: No such file or directory
tunnel_primary_1 | [ ] Clients allowed=512000
tunnel_primary_1 | [.] stunnel 5.56 on x86_64-alpine-linux-musl platform
tunnel_primary_1 | [.] Compiled/running with OpenSSL 1.1.1d 10 Sep 2019
tunnel_primary_1 | [.] Threading:PTHREAD Sockets:POLL,IPv6 TLS:ENGINE,OCSP,PSK,SNI
tunnel_primary_1 | [ ] errno: (*__errno_location())
tunnel_primary_1 | [.] Reading configuration from file /etc/stunnel/stunnel.conf
tunnel_primary_1 | [.] UTF-8 byte order mark not detected
tunnel_primary_1 | [ ] No PRNG seeding was required
tunnel_primary_1 | [ ] Initializing service [quickfix]
tunnel_primary_1 | [ ] Ciphers: HIGH:!aNULL:!SSLv2:!DH:!kDHEPSK
tunnel_primary_1 | [ ] TLSv1.3 ciphersuites: TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256
tunnel_primary_1 | [ ] TLS options: 0x02100004 (+0x00000000, -0x00000000)
tunnel_primary_1 | [ ] Loading certificate from file: /etc/stunnel/stunnel.pem
tunnel_primary_1 | [!] error queue: ssl/ssl_rsa.c:615: error:140DC002:SSL routines:use_certificate_chain_file:system lib
tunnel_primary_1 | [!] error queue: crypto/bio/bss_file.c:290: error:20074002:BIO routines:file_ctrl:system lib
tunnel_primary_1 | [!] SSL_CTX_use_certificate_chain_file: crypto/bio/bss_file.c:288: error:02001002:system library:fopen:No such file or directory
tunnel_primary_1 | [!] Service [quickfix]: Failed to initialize TLS context
tunnel_primary_1 | [ ] Deallocating section defaults
prueba1_tunnel_primary_1 exited with code 1
This is mi docker-compose.yml:
version: '3'
services:
tunnel_primary:
image: vimagick/stunnel
ports:
- "6789:6789"
environment:
- CLIENT=yes
- SERVICE=quickfix
- ACCEPT=0.0.0.0:6789
- CONNECT=11.11.11.11:1234
logging:
driver: "json-file"
options:
max-size: "1024k"
max-file: "10"
In the VM that is in production it works and there is no installation dif. Yes, the image of docker vimagick / stunnel that I use in production is 7 months ago
Thank!!!!!

This docker image is broken since they switched to libressl (without updating their launch script that still uses openssl).
There is a pull request fixing this issue that will (hopefully) be merged.
In the meantime you can fork the repo containing the docker file and modify dockerfiles/stunnel/docker-entrypoint.sh by replacing openssl to libressl.
I ended up recreating a new image on docker hub, use prokofyevdmitry/stunnel instead of vimagik/stunnel inside your docker-compose.yml file

Related

Could not successfully bind to port 2181

I'm following https://github.com/PacktPublishing/Apache-Kafka-Series---Kafka-Connect-Hands-on-Learning and I've below docker-compose file and using Mac.
version: '2'
services:
# this is our kafka cluster.
kafka-cluster:
image: landoop/fast-data-dev:cp3.3.0
environment:
ADV_HOST: localhost # Change to 192.168.99.100 if using Docker Toolbox
RUNTESTS: 0 # Disable Running tests so the cluster starts faster
ports:
- 2181:2181 # Zookeeper
- 3030:3030 # Landoop UI
- 8081-8083:8081-8083 # REST Proxy, Schema Registry, Kafka Connect ports
- 9581-9585:9581-9585 # JMX Ports
- 9092:9092 # Kafka Broker
and when I run
docker-compose up kafka-cluster
[+] Running 1/0
⠿ Container code-kafka-cluster-1 Created 0.0s
Attaching to code-kafka-cluster-1
code-kafka-cluster-1 | Setting advertised host to 127.0.0.1.
code-kafka-cluster-1 | runtime: failed to create new OS thread (have 2 already; errno=22)
code-kafka-cluster-1 | fatal error: newosproc
code-kafka-cluster-1 |
code-kafka-cluster-1 | runtime stack:
code-kafka-cluster-1 | runtime.throw(0x512269, 0x9)
code-kafka-cluster-1 | /usr/lib/go/src/runtime/panic.go:566 +0x95
code-kafka-cluster-1 | runtime.newosproc(0xc420026000, 0xc420035fc0)
code-kafka-cluster-1 | /usr/lib/go/src/runtime/os_linux.go:160 +0x194
code-kafka-cluster-1 | runtime.newm(0x5203a0, 0x0)
code-kafka-cluster-1 | /usr/lib/go/src/runtime/proc.go:1572 +0x132
code-kafka-cluster-1 | runtime.main.func1()
code-kafka-cluster-1 | /usr/lib/go/src/runtime/proc.go:126 +0x36
code-kafka-cluster-1 | runtime.systemstack(0x593600)
code-kafka-cluster-1 | /usr/lib/go/src/runtime/asm_amd64.s:298 +0x79
code-kafka-cluster-1 | runtime.mstart()
code-kafka-cluster-1 | /usr/lib/go/src/runtime/proc.go:1079
code-kafka-cluster-1 |
code-kafka-cluster-1 | goroutine 1 [running]:
code-kafka-cluster-1 | runtime.systemstack_switch()
code-kafka-cluster-1 | /usr/lib/go/src/runtime/asm_amd64.s:252 fp=0xc420020768 sp=0xc420020760
code-kafka-cluster-1 | runtime.main()
code-kafka-cluster-1 | /usr/lib/go/src/runtime/proc.go:127 +0x6c fp=0xc4200207c0 sp=0xc420020768
code-kafka-cluster-1 | runtime.goexit()
code-kafka-cluster-1 | /usr/lib/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200207c8 sp=0xc4200207c0
code-kafka-cluster-1 | Could not successfully bind to port 2181. Maybe some other service
code-kafka-cluster-1 | in your system is using it? Please free the port and try again.
code-kafka-cluster-1 | Exiting.
code-kafka-cluster-1 exited with code 1
Note: % sudo lsof -i :2181 - this command shows no output.
the landoop/fast-data-dev library is not working on arm64 Apple M1 chip.
Here you can fix the problem by updating the Dockerfile.
https://github.com/lensesio/fast-data-dev/issues/175#issuecomment-947001807
Change the zookeeper port mapping as below
ports:
- 2182:2181 # Zookeeper
You can build new docker image and run it with the following commands -
git clone https://github.com/faberchri/fast-data-dev.git
cd fast-data-dev
docker build -t faberchri/fast-data-dev .
docker run --rm -p 3030:3030 faberchri/fast-data-dev
After looking into Namig Aliyev answer, here is what worked for me.
Let's say your working directory is kafka and inside it, you have your file docker-compose.yml
Please follow these steps to reproduce same results :
git clone https://github.com/faberchri/fast-data-dev.git
update docker-compose.yml file :
In kafka-cluster service replace image parameter line with this "build: ./fast-data-dev/"
docker-compose run kafka-cluster
Wait a couple of minutes and it should work and be accessible via :
http://localhost:3030/
This what worked for me.
Error suggests you're running something else on port 2181 already. So either stop that, or remove the port mapping since you shouldn't be connecting to Zookeeper anyway for using Kafka. As of latest Kafka versions (which I doubt the linked course will be using), --zookeeper flags are removed from Kafka CLI tools
Other solution would be to not use the Landoop container. Plenty of other Docker Compose files exist on the web for Kafka
Overall, I'd suggest not using Docker at all for developing a Kafka Connector.

How to get Shellhub.io working on old CPU

After installing shellhub and starting the the containers using docker-compse i got the error message on the console
c./bin/docker-compose up
shellhub_mongo_1 is up-to-date
shellhub_ssh_1 is up-to-date
shellhub_api_1 is up-to-date
shellhub_ui_1 is up-to-date
Starting shellhub_gateway_1 ... done
Attaching to shellhub_mongo_1, shellhub_ssh_1, shellhub_api_1, shellhub_ui_1, shellhub_gateway_1
api_1 |
api_1 | ____ __
api_1 | / __/___/ / ___
api_1 | / _// __/ _ \/ _ \
api_1 | /___/\__/_//_/\___/ v3.3.10-dev
api_1 | High performance, minimalist Go web framework
api_1 | https://echo.labstack.com
api_1 | ____________________________________O/_______
api_1 | O\
api_1 | ⇨ http server started on [::]:8080
mongo_1 | 2021-02-24T14:48:50.370+0000 I COMMAND [conn3] CMD: dropIndexes main.users: "tenant_id"
mongo_1 | 2021-02-24T14:48:50.403+0000 I COMMAND [conn3] CMD: dropIndexes main.users: "session_record"
mongo_1 | 2021-02-24T14:53:32.846+0000 I SHARDING [LogicalSessionCacheReap] Marking collection config.transactions as collection version: <unsharded>
shellhub_gateway_1 exited with code 132
shellhub_gateway_1 exited with code 132
shellhub_gateway_1 exited with code 132
It seems that shellhub_gateway use AVX(Advanced Vector Extensions) which is not supported on my old intel atom CPU.
Any idea how to get shellhub work on old CPUs ?
This issue was solved by Shellhub core team bellow quoted their response:
Looks good, no errors.
It seems it's fixed in 8a14707.
You can create a docker-compose.override.yml with following config to workaround the issue until we release next version with a fix:
version: '3.7'
services:
gateway:
ports:
- "${SHELLHUB_HTTP_PORT}:80"

Unable to access CKAN portal using DOCKER

I'm trying to run ckan in docker container following the steps in: http://docs.ckan.org/en/ckan-2.4.7/maintaining/installing/install-using-docker.html
Links for the images available from : https://hub.docker.com/u/ckan/ seems to be updated at the time of post this questions (2 days ago).
Well, I have followed the steps:
$ docker run -d --name db ckan/postgresql
$ docker run -d --name solr ckan/solr
$ docker run -d -p 80:80 --link db:db --link solr:solr ckan/ckan
And everythings ok, but the question is, How can I access to ckan portal???
Using docker inspect <ckan_image> I get something like this:
"NetworkSettings": {
"Bridge": "",
"SandboxID": "c66a4d1bb1a27c160f1655a9c660d24337e85053e8a8ad1e1a2c570ed217223e",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"5000/tcp": null,
"80/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "80"
}
]
},
"SandboxKey": "/var/run/docker/netns/c66a4d1bb1a2",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "7985fc49cc7795b668ca4dfc5812f0ffa40f305f29a7726b15947890051f2014",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.4",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:04",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "88de6de00bdbc9974e48021ff783378835fc99d09582b8f7ccaab363a605a499",
"EndpointID": "7985fc49cc7795b668ca4dfc5812f0ffa40f305f29a7726b15947890051f2014",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.4",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:04",
"DriverOpts": null
}
}
}
Port exposed are 5000 and 80 so, using this ip address and this port it should be accessible.
Am I missing something?
Accessing solr is correct in: http://localhost:8983/solr/#/
UPDATE 1
Following help of Tarun Lalwani and using docker-compose, I think there is a problem with ckan and solr. This is the output error:
See the second line:
Invalid URL u'http://:/solr/ckan/select/?q=%2A%3A%2A&rows=1&wt=json': No host supplied
ckan_1 | 2017-07-31 11:23:37,622 INFO [ckan.config.environment] Loading static files from public
****ckan_1 | 2017-07-31 11:23:37,916 ERROR [ckan.lib.search.common] Invalid URL u'http://:/solr/ckan/select/?q=%2A%3A%2A&rows=1&wt=json': No host supplied****
ckan_1 | Traceback (most recent call last):
ckan_1 | File "/usr/lib/ckan/default/src/ckan/ckan/lib/search/common.py", line 57, in is_available
ckan_1 | conn.search(q="*:*", rows=1)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 720, in search
ckan_1 | response = self._select(params, handler=search_handler)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 418, in _select
ckan_1 | return self._send_request('get', path)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 366, in _send_request
ckan_1 | timeout=self.timeout)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/requests/sessions.py", line 515, in get
ckan_1 | return self.request('GET', url, **kwargs)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/requests/sessions.py", line 488, in request
ckan_1 | prep = self.prepare_request(req)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/requests/sessions.py", line 431, in prepare_request
ckan_1 | hooks=merge_hooks(request.hooks, self.hooks),
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/requests/models.py", line 305, in prepare
ckan_1 | self.prepare_url(url, params)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/requests/models.py", line 382, in prepare_url
ckan_1 | raise InvalidURL("Invalid URL %r: No host supplied" % url)
ckan_1 | InvalidURL: Invalid URL u'http://:/solr/ckan/select/?q=%2A%3A%2A&rows=1&wt=json': No host supplied
ckan_1 | 2017-07-31 11:23:38,106 WARNI [ckan.lib.search] Problems were found while connecting to the SOLR server
ckan_1 | 2017-07-31 11:23:38,183 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
ckan_1 | Traceback (most recent call last):
ckan_1 | File "/usr/local/bin/ckan-paster", line 11, in <module>
ckan_1 | sys.exit(run())
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
ckan_1 | invoke(command, command_name, options, args[1:])
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
ckan_1 | exit_code = runner.run(args)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
ckan_1 | result = self.command()
ckan_1 | File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 337, in command
ckan_1 | self._load_config(cmd!='upgrade')
ckan_1 | File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 310, in _load_config
ckan_1 | self.site_user = load_config(self.options.config, load_site_user)
ckan_1 | File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 225, in load_config
ckan_1 | load_environment(conf.global_conf, conf.local_conf)
ckan_1 | File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 111, in load_environment
ckan_1 | p.load_all()
ckan_1 | File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 129, in load_all
ckan_1 | unload_all()
ckan_1 | File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 182, in unload_all
ckan_1 | unload(*reversed(_PLUGINS))
ckan_1 | File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 210, in unload
ckan_1 | plugins_update()
ckan_1 | File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 121, in plugins_update
ckan_1 | environment.update_config()
ckan_1 | File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 289, in update_config
ckan_1 | engine = sqlalchemy.engine_from_config(config, client_encoding='utf8')
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 428, in engine_from_config
ckan_1 | return create_engine(url, **options)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 387, in create_engine
ckan_1 | return strategy.create(*args, **kwargs)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 50, in create
ckan_1 | u = url.make_url(name_or_url)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/url.py", line 194, in make_url
ckan_1 | return _parse_rfc1738_args(name_or_url)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/url.py", line 240, in _parse_rfc1738_args
ckan_1 | return URL(name, **components)
ckan_1 | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/url.py", line 60, in __init__
ckan_1 | self.port = int(port)
ckan_1 | ValueError: invalid literal for int() with base 10: ''
After this I get:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d44df7bad12f ckan/solr "docker-entrypoint..." 2 hours ago Up 19 minutes 8983/tcp dockercompose_solr_1
8f0c6c815746 ckan/postgresql "docker-entrypoint..." 2 hours ago Up 19 minutes 5432/tcp dockercompose_db_1
The rest seems to be ok.
UPDATE 2
Updated my docker-compose file. I have been made several test. Finally this combination seems to work. Solr works ok (just change the public port with kitematic), postgresql has the database and table and I can access correctly but I get Internal Server Error, so I think I'm close.
My docker-compose file:
version: '3'
services:
solr:
container_name: solr
#Possible options solr
#image: milafrerichs/ckan_solr
#image: miguelbgouveia/solr-docker
image: ckan/solr:dev-v2.6
ports:
- "8983:8983/tcp"
db:
container_name: db
image: ckan/postgresql
ports:
- "5432:5432/tcp"
ckan:
container_name: ckan
image: ckan/ckan:dev-v2.6
depends_on:
- solr
- db
links:
- db:db
ports:
- "5000:5000"
- "80:80"
environment:
DATABASE_URL: "postgresql://ckan:ckan#db:5432/ckan"
SOLR_URL: "http://solr:8983/solr/ckan"
Looking at the apache2 logs, I have no see anything interesting.
This is the complete output:
$ docker-compose -f docker-compose-ckan.yml up
Attaching to db, solr, ckan
solr | Starting Solr on port 8983 from /opt/solr/server
solr |
solr | 0 INFO (main) [ ] o.e.j.u.log Logging initialized #2757ms
solr | 1711 INFO (main) [ ] o.e.j.s.Server jetty-9.3.8.v20160314
db | running bootstrap script ... ok
db | performing post-bootstrap initialization ... ok
db | syncing data to disk ... ok
db |
ckan | Distribution already installed:
ckan | ckan 2.6.3 from /usr/lib/ckan/default/src/ckan
ckan | Creating /etc/ckan/default/ckan.ini
ckan | Now you should edit the config files
ckan | /etc/ckan/default/ckan.ini
ckan | Edited option sqlalchemy.url = "postgresql://ckan_default:pass#localhost/ckan_default"->"postgresql://ckan:ckan#db:5432/ckan" (section "app:main")
ckan | Edited option ckan.site_url = ""->"http://192.168.0.6" (section "app:main")
ckan | Option uncommented and set solr_url = "http://solr:8983/solr/ckan" (section "app:main")
ckan | Option uncommented and set ckan.storage_path = "/var/lib/ckan" (section "app:main")
ckan | Option uncommented and set email_to = "disabled#example.com" (section "app:main")
ckan | Option uncommented and set error_email_from = "ckan#95e87010bd4d" (section "app:main")
solr | 1803 INFO (main) [ ] o.e.j.d.p.ScanningAppProvider Deployment monitor [file:///opt/solr/server/contexts/] at interval 0
solr | 4046 INFO (main) [ ] o.e.j.w.StandardDescriptorProcessor NO JSP Support for /solr, did not find org.apache.jasper.servlet.JspServlet
solr | 4080 WARN (main) [ ] o.e.j.s.SecurityHandler ServletContext#o.e.j.w.WebAppContext#13a5fe33{/solr,file:///opt/solr/server/solr-webapp/webapp/,STARTING}{/opt/solr/server/solr-webapp/webapp} has uncovered http methods for path: /
solr | 4118 INFO (main) [ ] o.a.s.s.SolrDispatchFilter SolrDispatchFilter.init(): WebAppClassLoader=1740189450#67b92f0a
solr | 4163 INFO (main) [ ] o.a.s.c.SolrResourceLoader JNDI not configured for solr (NoInitialContextEx)
solr | 4169 INFO (main) [ ] o.a.s.c.SolrResourceLoader using system property solr.solr.home: /opt/solr/server/solr
solr | 4174 INFO (main) [ ] o.a.s.c.SolrResourceLoader new SolrResourceLoader for directory: '/opt/solr/server/solr'
solr | 4179 INFO (main) [ ] o.a.s.c.SolrResourceLoader JNDI not configured for solr (NoInitialContextEx)
solr | 4179 INFO (main) [ ] o.a.s.c.SolrResourceLoader using system property solr.solr.home: /opt/solr/server/solr
db | LOG: autovacuum launcher started
solr | 4186 INFO (main) [ ] o.a.s.c.SolrXmlConfig Loading container configuration from /opt/solr/server/solr/solr.xml
solr | 4455 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Config-defined core root directory: /opt/solr/server/solr
db | done
db | server started
db | done
db | server stopped
db |
db | PostgreSQL init process complete; ready for start up.
db |
db | LOG: database system was shut down at 2017-08-01 22:58:52 UTC
db | LOG: MultiXact member wraparound protections are now enabled
db | LOG: database system is ready to accept connections
solr | 5404 INFO (main) [ ] o.a.s.h.c.HttpShardHandlerFactory created with socketTimeout : 600000,connTimeout : 60000,maxConnectionsPerHost : 20,maxConnections : 10000,corePoolSize : 0,maximumPoolSize : 2147483647,maxThreadIdleTime : 5,sizeOfQueue : -1,fairnessPolicy : false,useRetries : false,
solr | 6145 INFO (main) [ ] o.a.s.u.UpdateShardHandler Creating UpdateShardHandler HTTP client with params: socketTimeout=600000&connTimeout=60000&retry=true
solr | 6153 INFO (main) [ ] o.a.s.l.LogWatcher SLF4J impl is org.slf4j.impl.Log4jLoggerFactory
solr | 6160 INFO (main) [ ] o.a.s.l.LogWatcher Registering Log Listener [Log4j (org.slf4j.impl.Log4jLoggerFactory)]
solr | 6163 INFO (main) [ ] o.a.s.c.CoreContainer Security conf doesn't exist. Skipping setup for authorization module.
solr | 6165 INFO (main) [ ] o.a.s.c.CoreContainer No authentication plugin used.
solr | 6341 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Looking for core definitions underneath /opt/solr/server/solr
solr | 6353 INFO (main) [ ] o.a.s.c.CoreDescriptor Created CoreDescriptor: {name=ckan, config=solrconfig.xml, loadOnStartup=true, schema=schema.xml, configSetProperties=configsetprops.json, transient=false, dataDir=data/}
solr | 6356 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Found core ckan in /opt/solr/server/solr/ckan
ckan | *** Running /etc/my_init.d/70_initdb...
**ckan | 2017-08-01 22:58:54,440 ERROR [pysolr] Failed to connect to server at 'http://solr:8983/solr/ckan/select/?q=%2A%3A%2A&rows=1&wt=json', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host='solr', port=8983): Max retries exceeded with url: /solr/ckan/select/?q=%2A%3A%2A&rows=1&wt=json (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fb54cbe9050>: Failed to establish a new connection: [Errno 111] Connection refused',))**
ckan | Traceback (most recent call last):
ckan | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 361, in _send_request
ckan | timeout=self.timeout)
ckan | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/requests/sessions.py", line 487, in get
ckan | return self.request('GET', url, **kwargs)
ckan | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
ckan | resp = self.send(prep, **send_kwargs)
ckan | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/requests/sessions.py", line 585, in send
ckan | r = adapter.send(request, **kwargs)
ckan | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/requests/adapters.py", line 467, in send
ckan | raise ConnectionError(e, request=request)
**ckan | ConnectionError: HTTPConnectionPool(host='solr', port=8983): Max retries exceeded with url: /solr/ckan/select/?q=%2A%3A%2A&rows=1&wt=json (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fb54cbe9050>: Failed to establish a new connection: [Errno 111] Connection refused',))**
solr | 6399 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Found 1 core definitions
solr | 6665 INFO (main) [ ] o.a.s.s.SolrDispatchFilter user.dir=/opt/solr/server
ckan | 2017-08-01 22:58:54,444 ERROR [ckan.lib.search.common] Failed to connect to server at 'http://solr:8983/solr/ckan/select/?q=%2A%3A%2A&rows=1&wt=json', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host='solr', port=8983): Max retries exceeded with url: /solr/ckan/select/?q=%2A%3A%2A&rows=1&wt=json (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fb54cbe9050>: Failed to establish a new connection: [Errno 111] Connection refused',))
ckan | Traceback (most recent call last):
ckan | File "/usr/lib/ckan/default/src/ckan/ckan/lib/search/common.py", line 56, in is_available
ckan | conn.search(q="*:*", rows=1)
ckan | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 710, in search
ckan | response = self._select(params, handler=search_handler)
ckan | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 411, in _select
ckan | return self._send_request('get', path)
ckan | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 370, in _send_request
ckan | raise SolrError(error_message % params)
ckan | SolrError: Failed to connect to server at 'http://solr:8983/solr/ckan/select/?q=%2A%3A%2A&rows=1&wt=json', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host='solr', port=8983): Max retries exceeded with url: /solr/ckan/select/?q=%2A%3A%2A&rows=1&wt=json (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fb54cbe9050>: Failed to establish a new connection: [Errno 111] Connection refused',))
ckan | 2017-08-01 22:58:54,444 WARNI [ckan.lib.search] Problems were found while connecting to the SOLR server
ckan | 2017-08-01 22:58:55,458 ERROR [pysolr] Solr responded with an error (HTTP 503): [Reason: Error 503 {metadata={error-class=org.apache.solr.common.SolrException,root-error-class=org.apache.solr.common.SolrException},msg=SolrCore is loading,code=503}]
ckan | 2017-08-01 22:58:55,458 ERROR [ckan.lib.search.common] Solr responded with an error (HTTP 503): [Reason: Error 503 {metadata={error-class=org.apache.solr.common.SolrException,root-error-class=org.apache.solr.common.SolrException},msg=SolrCore is loading,code=503}]
ckan | Traceback (most recent call last):
ckan | File "/usr/lib/ckan/default/src/ckan/ckan/lib/search/common.py", line 56, in is_available
ckan | conn.search(q="*:*", rows=1)
ckan | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 710, in search
ckan | response = self._select(params, handler=search_handler)
ckan | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 411, in _select
ckan | return self._send_request('get', path)
ckan | File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 386, in _send_request
ckan | raise SolrError(error_message % (resp.status_code, solr_message))
ckan | SolrError: Solr responded with an error (HTTP 503): [Reason: Error 503 {metadata={error-class=org.apache.solr.common.SolrException,root-error-class=org.apache.solr.common.SolrException},msg=SolrCore is loading,code=503}]
db | ERROR: relation "user" does not exist at character 465
db | STATEMENT: SELECT "user".password AS user_password, "user".id AS user_id, "user".name AS user_name, "user".openid AS user_openid, "user".fullname AS user_fullname, "user".email AS user_email, "user".apikey AS user_apikey, "user".created AS user_created, "user".reset_key AS user_reset_key, "user".about AS user_about, "user".activity_streams_email_notifications AS user_activity_streams_email_notifications, "user".sysadmin AS user_sysadmin, "user".state AS user_state
db | FROM "user"
db | WHERE "user".name = 'default' OR "user".id = 'default' ORDER BY "user".name
db | LIMIT 1
solr | 13480 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.r.RestManager Initializing 0 registered ManagedResources
db | ERROR: relation "user" does not exist at character 465
db | STATEMENT: SELECT "user".password AS user_password, "user".id AS user_id, "user".name AS user_name, "user".openid AS user_openid, "user".fullname AS user_fullname, "user".email AS user_email, "user".apikey AS user_apikey, "user".created AS user_created, "user".reset_key AS user_reset_key, "user".about AS user_about, "user".activity_streams_email_notifications AS user_activity_streams_email_notifications, "user".sysadmin AS user_sysadmin, "user".state AS user_state
db | FROM "user"
db | WHERE "user".name = 'default' OR "user".id = 'default' ORDER BY "user".name
db | LIMIT 1
solr | 13577 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.h.c.SpellCheckComponent Initializing spell checkers
solr | 13640 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.s.DirectSolrSpellChecker init: {name=default,field=_text_,classname=solr.DirectSolrSpellChecker,distanceMeasure=internal,accuracy=0.5,maxEdits=2,minPrefix=1,maxInspections=5,minQueryLength=4,maxQueryFrequency=0.01}
solr | 13653 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.h.c.SpellCheckComponent No queryConverter defined, using default converter
solr | 13700 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.h.c.QueryElevationComponent Loading QueryElevation from: /opt/solr/server/solr/ckan/conf/elevate.xml
solr | 13914 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.h.ReplicationHandler Commits will be reserved for 10000
solr | 14015 INFO (searcherExecutor-7-thread-1-processing-x:ckan) [ x:ckan] o.a.s.c.QuerySenderListener QuerySenderListener sending requests to Searcher#2cd58256[ckan] main{ExitableDirectoryReader(UninvertingDirectoryReader())}
solr | 14018 INFO (searcherExecutor-7-thread-1-processing-x:ckan) [ x:ckan] o.a.s.c.QuerySenderListener QuerySenderListener done.
solr | 14021 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.u.UpdateLog Looking up max value of version field to seed version buckets
solr | 14023 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.u.VersionInfo Refreshing highest value of _version_ for 65536 version buckets from index
solr | 14026 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.u.VersionInfo No terms found for _version_, cannot seed version bucket highest value from index
solr | 14035 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.u.UpdateLog Could not find max version in index or recent updates, using new clock 1574571440349380608
solr | 14020 INFO (searcherExecutor-7-thread-1-processing-x:ckan) [ x:ckan] o.a.s.h.c.SpellCheckComponent Loading spell index for spellchecker: default
solr | 14075 INFO (searcherExecutor-7-thread-1-processing-x:ckan) [ x:ckan] o.a.s.c.SolrCore [ckan] Registered new searcher Searcher#2cd58256[ckan] main{ExitableDirectoryReader(UninvertingDirectoryReader())}
solr | 14088 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.u.UpdateLog Took 65.0ms to seed version buckets with highest version 1574571440349380608
db | WARNING: there is already a transaction in progress
ckan | 2017-08-01 22:58:55,460 WARNI [ckan.lib.search] Problems were found while connecting to the SOLR server
ckan | Initialising DB: SUCCESS
ckan | *** Running /etc/rc.local...
ckan | *** Booting runit daemon...
ckan | *** Runit started as PID 25
ckan | * Starting Postfix Mail Transport Agent postfix
ckan | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message
ckan | ...done.
solr | 14092 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.c.CoreContainer registering core: ckan
solr exited with code 137
db | WARNING: there is no transaction in progress
db exited with code 137
Any suggestions?
Thanks
Use docker-compose which makes it easier to do these things. Below file would help you
version: '2'
services:
db:
image: ckan/postgresql
solr:
image: ckan/solr
ckan:
image: ckan
ports:
- "80:80"
- "5000:5000"
Do a docker-compose up to get this running. Then you can access the ckan at http://<HOSTIPofDocker>:80. If you are not able to access it then make sure to run docker-compose ps to check everything is running and check logs using docker-compose logs -f ckan
The docker installation docs are out of date. I'm currently working on an update to add install docs for Docker Compose in this pull request. Hope this helps!

Docker two tier application issue: failed to connect to mongo container

I have a simple nodeJS application consisting of the frontend and a mongo database. I want to deploy it via Docker.
In my docker-compose file I have the following:
version: '2'
services:
express-container:
build: .
ports:
- "3000:3000"
depends_on:
- mongo-container
mongo-container:
image: mongo:3.0
When I run docker-compose up, I have the following error:
Creating todoangularv2_mongo-container_1 ...
Creating todoangularv2_mongo-container_1 ... done
Creating todoangularv2_express-container_1 ...
Creating todoangularv2_express-container_1 ... done
Attaching to todoangularv2_mongo-container_1, todoangularv2_express-container_1
mongo-container_1 | 2017-07-25T15:26:09.863+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=25f03f51322b
mongo-container_1 | 2017-07-25T15:26:09.864+0000 I CONTROL [initandlisten] db version v3.0.15
mongo-container_1 | 2017-07-25T15:26:09.864+0000 I CONTROL [initandlisten] git version: b8ff507269c382bc100fc52f75f48d54cd42ec3b
mongo-container_1 | 2017-07-25T15:26:09.864+0000 I CONTROL [initandlisten] build info: Linux ip-10-166-66-3 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 BOOST_LIB_VERSION=1_49
mongo-container_1 | 2017-07-25T15:26:09.864+0000 I CONTROL [initandlisten] allocator: tcmalloc
mongo-container_1 | 2017-07-25T15:26:09.864+0000 I CONTROL [initandlisten] options: {}
mongo-container_1 | 2017-07-25T15:26:09.923+0000 I JOURNAL [initandlisten] journal dir=/data/db/journal
mongo-container_1 | 2017-07-25T15:26:09.924+0000 I JOURNAL [initandlisten] recover : no journal files present, no recovery needed
express-container_1 | Listening on port 3000
express-container_1 |
express-container_1 | events.js:72
express-container_1 | throw er; // Unhandled 'error' event
express-container_1 | ^
express-container_1 | Error: failed to connect to [mongo-container:27017]
So my frontend cannot reach the mongo container called 'mongo-container' in the docker-compose file. In the application itself I'm giving the URL for the mongo database as follows:
module.exports = {
url : 'mongodb://mongo-container:27017/todo'
}
Any idea how I can change my application so that when it is run on Docker, I don't have this connectivity issue?
EDIT: the mongo container gives the following output:
WAUTERW-M-T3ZT:vagrant wim$ docker logs f63
2017-07-26T09:15:02.824+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=f637f963c87f
2017-07-26T09:15:02.825+0000 I CONTROL [initandlisten] db version v3.0.15
2017-07-26T09:15:02.825+0000 I CONTROL [initandlisten] git version: b8ff507269c382bc100fc52f75f48d54cd42ec3b
...
2017-07-26T09:15:21.461+0000 I STORAGE [FileAllocator] done allocating datafile /data/db/local.0, size: 64MB, took 0.024 secs
2017-07-26T09:15:21.476+0000 I NETWORK [initandlisten] waiting for connections on port 27017
The express container gives the following output:
WAUTERW-M-T3ZT:vagrant wim$ docker logs 25a
Listening on port 3000
events.js:72
throw er; // Unhandled 'error' event
^
Error: failed to connect to [mongo-container:27017]
at null.<anonymous> (/usr/src/app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:555:74)
at EventEmitter.emit (events.js:106:17)
at null.<anonymous> (/usr/src/app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:156:15)
at EventEmitter.emit (events.js:98:17)
at Socket.<anonymous> (/usr/src/app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:534:10)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:441:14
at process._tickCallback (node.js:415:13)
EDIT: the issue appeared in the Dockerfile. Here is a corrected one (simplified a bit as I started from a node image rather than an Ubuntu image):
FROM node:0.10.40
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN npm install
CMD ["node", "/usr/src/app/bin/www"]
You could substitute depends_on by links session, that express dependency between services like depends_on and, according to the documentation, containers for the linked service will be reachable at a hostname identical to the alias, or the service name if no alias was specified.
version: '2'
services:
express-container:
build: .
ports:
- "3000:3000"
links:
- "mongo-container"
mongo-container:
image: mongo:3.0
The issue appeared in the Dockerfile. Here is a corrected one (simplified a bit as I started from a node image rather than an Ubuntu image):
FROM node:0.10.40
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN npm install
CMD ["node", "/usr/src/app/bin/www"]

docker-compose persisting folder empty

I would like use bitnami-docker-redmine with docker-compose persisting on Windows.
If i run the first exemple docker-compose.yml, without persisting application, redmine start and run perfectly.
But, i would like use this with persisting application exemple :
version: '2'
services:
mariadb:
image: 'bitnami/mariadb:latest'
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- './mariadb:/bitnami/mariadb'
redmine:
image: bitnami/redmine:latest
ports:
- 80:3000
volumes:
- './redmine:/bitnami/redmine'
And only MariaDB run, with error message :
$ docker-compose up
Creating bitnamidockerredmine_redmine_1
Creating bitnamidockerredmine_mariadb_1
Attaching to bitnamidockerredmine_mariadb_1, bitnamidockerredmine_redmine_1
mariadb_1 |
mariadb_1 | Welcome to the Bitnami mariadb container
mariadb_1 | Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-mariadb
mariadb_1 | Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-mariadb/issues
mariadb_1 | Send us your feedback at containers#bitnami.com
mariadb_1 |
mariadb_1 | WARN ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes. For safety reasons, do not use this flag in a production environment.
mariadb_1 | nami INFO Initializing mariadb
mariadb_1 | mariadb INFO ==> Configuring permissions...
mariadb_1 | mariadb INFO ==> Validating inputs...
mariadb_1 | mariadb WARN Allowing the "rootPassword" input to be empty
redmine_1 |
redmine_1 | Welcome to the Bitnami redmine container
redmine_1 | Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-redmine
redmine_1 | Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-redmine/issues
redmine_1 | Send us your feedback at containers#bitnami.com
redmine_1 |
redmine_1 | nami INFO Initializing redmine
redmine_1 | redmine INFO Configuring Redmine database...
mariadb_1 | mariadb INFO ==> Initializing database...
mariadb_1 | mariadb INFO ==> Creating 'root' user with unrestricted access...
mariadb_1 | mariadb INFO ==> Enabling remote connections...
mariadb_1 | mariadb INFO
mariadb_1 | mariadb INFO ########################################################################
mariadb_1 | mariadb INFO Installation parameters for mariadb:
mariadb_1 | mariadb INFO Root User: root
mariadb_1 | mariadb INFO Root Password: Not set during installation
mariadb_1 | mariadb INFO (Passwords are not shown for security reasons)
mariadb_1 | mariadb INFO ########################################################################
mariadb_1 | mariadb INFO
mariadb_1 | nami INFO mariadb successfully initialized
mariadb_1 | INFO ==> Starting mariadb...
mariadb_1 | nami ERROR Unable to start com.bitnami.mariadb: Warning: World-writable config file '/opt/bitnami/mariadb/conf/my.cnf' is ignored
mariadb_1 | Warning: World-writable config file '/opt/bitnami/mariadb/conf/my.cnf' is ignored
mariadb_1 |
bitnamidockerredmine_mariadb_1 exited with code 1
redmine_1 | mysqlCo INFO Trying to connect to MySQL server
redmine_1 | Error executing 'postInstallation': Failed to connect to mariadb:3306 after 36 tries
bitnamidockerredmine_redmine_1 exited with code 1
My ./mariadb folder is good, but ./redmine is empty.
Do you have any idea why my persisting does not start completely ? Without the persisting, it works :(
docker-version : 1.13.0 (client/server)
plateform : Windows 10 (sorry, not test on Linux)
Thank you !

Resources