Posts

Showing posts with the label docker

Connection refused during running app on docker - Spring Boot & mssql server

Image
Clash Royale CLAN TAG #URR8PPP Connection refused during running app on docker - Spring Boot & mssql server I'm start to play with Docker. I'm trying to run Spring Boot application on Docker which connects with mssql-server-linux on docker. I'm configure and run mssql server. My app has set database port and when I run this app in IntelliJ everything is ok. Also when I build app './mvnw install dockerfile:build' command everything is ok. Also adds entity to database during build. When I try run app 'docker run' command I get this exception: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.". What's the problem? My spring boot app prop...

“The headers or library files could not be found for jpeg” installing Pillow on Alpine Linux

Image
Clash Royale CLAN TAG #URR8PPP “The headers or library files could not be found for jpeg” installing Pillow on Alpine Linux I'm trying to run Python's Scrapy in a Docker container based on python:alpine. It was working before, but now I'd like to use Scrapy's Image Pipeline which requires me to install Pillow. As a simplified example, I tried the following Dockerfile : Dockerfile FROM python:alpine RUN apk --update add libxml2-dev libxslt-dev libffi-dev gcc musl-dev libgcc openssl-dev curl RUN apk add libjpeg zlib tiff freetype lcms libwebp tcl openjpeg RUN pip install Pillow However, when I try to build this I get an error which contains the following: Traceback (most recent call last): File "/tmp/pip-build-ft5yzzuv/Pillow/setup.py", line 744, in <module> zip_safe=not debug_build(), ) File "/usr/local/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/lib/python3.6/distutils/dist.py...

what is the difference if we run qt inside docker and outside docker( without using docker)?

Image
Clash Royale CLAN TAG #URR8PPP what is the difference if we run qt inside docker and outside docker( without using docker)? I would like to know what is the difference if we run OpenGl programs using qt creator which is running inside and outside docker. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Issue trying to launch sample project che-ide-server-extension

Image
Clash Royale CLAN TAG #URR8PPP Issue trying to launch sample project che-ide-server-extension With Eclipse Che, I've recently been able to deploy the docker container without any issue as provided in the instructions. I'm at the point where am trying to learn a bit more about extension development for Che, and I'm going through the small introduction on "developing your first plugin" located on the following page: https://www.eclipse.org/che/docs/che-in-che-quickstart.html I'm stuck at the point where I can successfully build and deploy the sample project by executing the Traefik Start , Tomcat8-IDE Start , Deploy IDE and Deploy Workspace Agent commands. But when it comes time to navigate to the newly created 2nd workspace by clicking on the link provided in the IDE to go to the newly created 2nd workplace instance...: ... I end up getting redirected to the following error page: I suspect that there may be some kind of configuration problem with the sample...

Jenkins Workspace not visible on docker slaves

Image
Clash Royale CLAN TAG #URR8PPP Jenkins Workspace not visible on docker slaves I am having a Master slave setup in jenkins, where all of my slave machines are docker slaves. I am using Yet another docker plugin to configure these slaves. All my jobs are passing successfully on the slave nodes, but I cannot view the workspace from the jenkins UI. Is this because the container gets destroyed after the build is getting executed successfully? If yes, then what is a work around to view the workspace. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

ffmpeg and docker result in averror_invaliddata

Image
Clash Royale CLAN TAG #URR8PPP ffmpeg and docker result in averror_invaliddata I am running ffmpeg within a docker container, and I am having a problem. I have a wittled-down debug program (listing below) that simply opens (and reads) a test.mp4 I open the file with fopen(), read and print the first 32 bytes. The values agree and are correct whether running in docker or locally. (ie. the file is accessible and readable in the docker container) However, when it gets to avformat_open_input(): Running locally: Works just fine. (and the real program fully decodes it) Running in docker container: The call to avformat_open_input() fails with AVERROR_INVALIDDATA. This is with test.mp4 in the docker directory. I'm a bit lost at this point. I appreciate any ideas. test program listing: ========================================= #include <stdio.h> extern "C" { #include <libavformat/avformat.h> } int main (int argc, char **argv) { int erc=0; AVFormatConte...

When modifying a Rails app on Docker, how get source code changes to load?

Image
Clash Royale CLAN TAG #URR8PPP When modifying a Rails app on Docker, how get source code changes to load? When running a Rails app on a development machine, using Docker, how does once force code changes to be used? I'm using Docker to test out / tweak a Rails app (Helpy), but when I modify the Rails source any changes just get ignored. Even changes to dockker/run.sh or tweaking text on a view. So docker is apparently caching everything, how to I tell docker to use the current source code that I have edited? I tried docker-compose down (then up) or docker-compose restart or docker-compose build The Dockerfile is FROM ruby:2.4 ENV HELPY_VERSION=master RAILS_ENV=production HELPY_HOME=/helpy HELPY_USER=helpyuser HELPY_SLACK_INTEGRATION_ENABLED=true RUN apt-get update && apt-get upgrade -y && apt-get install -y nodejs postgresql-client imagemagick --no-install-recommends && rm -rf /var/lib/apt/lists/* && useradd --no-create-home $...

Magento 2: Too many redirects behind traefik reverse-proxy

Image
Clash Royale CLAN TAG #URR8PPP Magento 2: Too many redirects behind traefik reverse-proxy In front of my web servers and Docker applications I'm running Traefik to handle load balancing and reverse-proxy. In this specific case Magento 2 is running on another host in the same private network as the Traefik host. Traffic is coming into the firewall on port 80/443 and forwarded to Traefik which forwards the request based on the domain name (in this case exampleshop.com). My Traefik configuration looks like this: [backends] [backends.backend-exampleshop] [backends.backend-exampleshop.servers.server1] url = "http://192.168.1.224:80 passHostHeader = true [frontends] [frontends.exampleshop] backend = "backend-exampleshop" [frontends.exampleshop.routes.hostname] rule = "Host:exampleshop.com" For regular websites above configuration always worked as expected (a working HTTPS connection with valid Let's Encrypt cert) but in this Magento ...

LEADER_NOT_AVAILABLE - docker container

Image
Clash Royale CLAN TAG #URR8PPP LEADER_NOT_AVAILABLE - docker container setting up docker containers (kafka, zookeeper) and trying to (publish and) consume from another, receive the following error: KafkaError{code=LEADER_NOT_AVAILABLE,val=5,str="Broker: Leader not available"} There is no additional error indication when publishing or consuming. When testing connectivity with telnet 172.18.0.3 9092 I receive the expected result. telnet 172.18.0.3 9092 In [2]: c.list_topics() Out[2]: ClusterMetadata(9ToJF8nPQC-rCTXGxuUalw) In [3]: l = c.list_topics() In [4]: l.brokers Out[4]: {1010: BrokerMetadata(1010, 172.18.0.3:9092)} In [7]: l.orig_broker_name Out[7]: u'172.18.0.3:9092/1010' In [8]: l.topics Out[8]: {'__consumer_offsets': TopicMetadata(__consumer_offsets, 50 partitions), 'item': TopicMetadata(item, 1 partitions), 'mytopic': TopicMetadata(mytopic, 1 partitions)} In [9]: i =l.topics['item'] In [10]: i.partitions Out[10]: {0: Partiti...

error in deploying a sentiment analysis code with docker and testing it locally

Image
Clash Royale CLAN TAG #URR8PPP error in deploying a sentiment analysis code with docker and testing it locally Please help. I am trying to deploy a sentiment analysis code with docker and testing it locally. I am using ubuntu 16.04 I am able to run main.py in one terminal and get the prediction using another terminal using the curl command "curl -H "Content-Type: application/json" -X POST -d '{"Sentences": ["i like programming"] }' http://localhost:8080" But when I build and test this locally using docker with the same curl command (with port 8081). I get this error. $ docker build -t sentiment-service . $ docker run -it --rm -p 8081:80 sentiment-service Please help to resolve this error, so that I can get predictions when deployed locally using docker with curl command as shown in first image The directory structure is main.py from flask import Flask, current_app, request, jsonify import io import tensorflow as tf import pickle import gc...

how to make Docker-compose run all services when debuging with Pycharm?

Image
Clash Royale CLAN TAG #URR8PPP how to make Docker-compose run all services when debuging with Pycharm? I have a simple dockerized Django gunicorn, nginx, and postgress project (each is a service). When I run it with docker-compose up, everything works: maximd@ubuntu ~/PycharmProjects/MyQ (master) $ docker-compose ps Name Command State Ports ------------------------------------------------------------------------------- myq_database1_1 docker-entrypoint.sh postgres Up 5432/tcp myq_djangoapp_1 /bin/sh -c gunicorn --bind ... Up 8000/tcp myq_nginx_1 nginx -g daemon off; Up 0.0.0.0:8000->80/tcp however when I lunch it though the debug of pycharm, it doesn't run nginx, I suspect that since in my docker-compose.yml file the djangoapp depends on the database service, it just creates them both, but it doesn't run nginx. Here is what I see after I run the debug: maximd...

peer node unable to create chaincode container - dial unix /host/var/run/docker.sock: connect: permission denied error

Image
Clash Royale CLAN TAG #URR8PPP peer node unable to create chaincode container - dial unix /host/var/run/docker.sock: connect: permission denied error I am trying to setup hyperledger network on centos Using 1.1.0 images from ibmblockchain docker hub. I am able to start up the network without any issues. that is 1 orderer, 3 kafkas, 3 zookeepers and 2 peers. But every time i try to instantiate chaincode, I see the below error in the peer docker containers. Can anyone help me with this issue. 2018-07-19 19:05:30.570 UTC [dockercontroller] Start -> ERRO 3ac start-could not recreate container , because of Post http://unix.sock/containers/create?name=dev-peer1.bns-250A-v1.0.2-b3: dial unix /host/var/run/docker.sock: connect: permission denied 2018-07-19 19:05:30.570 UTC [container] unlockContainer -> DEBU 3ad container lock deleted(dev-peer1.bns-250A-v1.0.2-b3) 2018-07-19 19:05:30.570 UTC [chaincode] launchAndWaitForRegister -> DEBU 3ae stopping due to error while launching: Post h...

Docker - cannot mount volume over existing file, file exists

Image
Clash Royale CLAN TAG #URR8PPP Docker - cannot mount volume over existing file, file exists I'm trying to build a data container for my application in Docker. I run this command to expose some volumes: docker run --name svenv.nl-data -v /etc/environment -v /etc/ssl/certs -v /var/lib/mysql -d svenv/svenv.nl-data The problem is that i get this error from this command: Error response from daemon: cannot mount volume over existing file, file exists /var/lib/docker/aufs/mnt/aefa66cf55357e2e1e4f84c2d4d2d03fa2375c8900fe3c0e1e6bc02f13e54d05/etc/environment If I understand the Docker documentation correctly. Creating volumes for single files is supported. So I don't understand why I get this error. Is there somebody who can explain this to me? I'm running Docker 1.9.1 on Ubuntu 14.04. have you solved it in some way ? – Robert Apr 13 '16 at 1:32 ...

Docker image custom nginx.conf

Image
Clash Royale CLAN TAG #URR8PPP Docker image custom nginx.conf I am fairly new to this, I don't know if I am heading in the right direction or not. I have a custom nginx.conf that works fine, I am now trying to build a docker image with it so that I can run it as a container in kuberentes. Here is my nginx.conf user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; # Load dynamic modules. See /usr/share/nginx/README.dynamic. include /usr/share/nginx/modules/*.conf; events { worker_connections 1024; } stream { #define the various upstreams upstream app_1 { server 192.168.122.206:5678; } upstream app_2 { server 192.168.122.206:9000; } #map source port to upstream map $remote_port $backend_svr { 1234 "app_1"; 1235 "app_2"; } #all udp traffic received on 8000, depending on source it will be redirected server { listen 8000 udp; proxy_pass $...

Microservices in Docker Container

Image
Clash Royale CLAN TAG #URR8PPP Microservices in Docker Container I am using Spring Cloud for Creating Microservice Architecture. I was using the below feature from the Spring Cloud Now Lets say if I have 100 microservices, then we need 100 servers to maintain each microservices. So I thought of using Kubernetes to solve this issue by deploying each microservices in a separate docker container, so now since Kubernetes takes care of microserivice health check, autoscaling, load-balancing so do I need to again use Ribbon, Eureka and Zuul. Can anyone please help me on this 2 Answers 2 Even when you use Spring Cloud, 100 services do NOT mean 100 servers. In Spring Cloud the packaging unit is Spring Boot application and a single server may host many such Spring Boot applications. If you want, you can containerize the Spring Boot applications and other Spring Cloud infrastructure support components. But t...