rubymine docker remote sdk "A server is already running. Check /opt/project/tmp/pids/server.pid." even it stopped gracefully (not forced).

Answered

$ coker-compose build

then


then run debug.

At the first time, when I was running it, it is ok.
Then I stop it gracefully ( click the stop button once), then re-run it. this error happened.

Why pid file is remaining.
Without docker remote debug. It works properly.


With docker-compose.yml

version: '3'
services:
db:
image: postgres:latest
ports:
- "5432:5432"
memcached:
image: memcached:latest
web:
build: .
volumes:
- .:/app
ports:
- "3000:3000"
depends_on:
- db
- memcached
environment:
DATABASE_URL: postgresql://postgres:@db/makxas_development
DATABASE_DEVELOPMENT_URL: postgresql://postgres:@db/makxas_development
DATABASE_TEST_URL: postgresql://postgres:@db/makxas_test


Dockerfile

FROM ruby:2.5.0
ENV LANG C.UTF-8
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs unzip
RUN CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` && \
wget -N http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -P ~/ && \
unzip ~/chromedriver_linux64.zip -d ~/ && \
rm ~/chromedriver_linux64.zip && \
chown root:root ~/chromedriver && \
chmod 755 ~/chromedriver && \
mv ~/chromedriver /usr/bin/chromedriver && \
sh -c 'wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -' && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' && \
apt-get update && apt-get install -y google-chrome-stable
ENV APP /app
RUN mkdir $APP
WORKDIR $APP
RUN gem update bundler
ADD Gemfile $APP/Gemfile
ADD Gemfile.lock $APP/Gemfile.lock
RUN bundle install --clean
ADD . $APP



4 comments

Hello,

unfortunately that's a known problem so please add your vote and follow the corresponding issue on our tracker:

https://youtrack.jetbrains.com/issue/RUBY-19694

1

I have found a workaround for this:

Go to the `edit configuration` window and create an entry in the `Before launch: External tool` section: Add a `run an external tool` which deletes the server's pid. 

1

My configuration on Windows for the solution proposed above:

1

Configuration for Linux on 2019.1.1

1

Please sign in to leave a comment.