Re: remote debugging for docker solr

2020-01-15 Thread Martijn Koster
a process running on this port.
>>> gnandre@gnandre-deb9-64:/sandbox/gnandre/mw-ruby-development-server$
>> sudo
>>> lsof -i tcp:5005
>>> COMMAND  PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
>>> docker-pr 181928 root4u  IPv6 91702195  0t0  TCP *:5005 (LISTEN)
>>> 
>>> but if I try to connect it with telnet command directly from the Debian
>>> machine then it fails
>>> gnandre@gnandre-deb9-64:/sandbox/gnandre/mw-ruby-development-server$
>> telnet
>>> localhost 5005
>>> Trying 127.0.0.1...
>>> Connected to localhost.
>>> Escape character is '^]'.
>>> Connection closed by foreign host.
>>> 
>>> if I use the Debian machine name on which this docker instance is
>> running,
>>> it still fails but with different error:
>>> gnandre@gnandre-deb9-64:/sandbox/gnandre/mw-ruby-development-server$
>> sudo
>>> lsof -i tcp:5005
>>> (failed reverse-i-search)`telent ': ^Clnet localhost 5005
>>> gnandre@gnandre-deb9-64:/sandbox/gnandre/mw-ruby-development-server$
>> telnet
>>> gnandre-deb9-64 5005
>>> Trying 172.28.155.62...
>>> telnet: Unable to connect to remote host: Connection refused
>>> 
>>> I used telnet command to test the debug port. I also tried to connect the
>>> debugging session from IntelliJ and it fails with the same issue. i.e.
>>> Connection refused. This is was the same error that I was getting in the
>>> first place.
>>> 
>>> Any more suggestions?
>>> 
>>> 
>>> 
>>> On Sat, Jan 11, 2020 at 10:15 AM Martijn Koster <
>> mak-luc...@greenhills.co.uk>
>>> wrote:
>>> 
>>>> I think you may have a quoting issue there: remove those inner ones.
>> Not
>>>> that it should matter in this instance.
>>>> I’m not sure why you’re using “start”, which will run solr in the
>>>> background, or what you expect to happen after the wait-for-solr.sh —
>> if it
>>>> all worked as you expected that would wait for solr, then exit,
>> destroying
>>>> the container.
>>>> 
>>>> This seems to work:
>>>> 
>>>>version: '3.3'
>>>>services:
>>>>  solr1:
>>>>container_name: solr1
>>>>image: solr:8.4
>>>>ports:
>>>> - "8981:8983”
>>>> - "5005:5005”
>>>>command: bash -c "solr-fg -a
>>>> -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005”
>>>> 
>>>> Or even just:
>>>> 
>>>>version: ‘3.3'
>>>>services:
>>>>  solr1:
>>>>container_name: solr1
>>>>image: solr:8.4
>>>>ports:
>>>> - "8981:8983”
>>>> - "5005:5005”
>>>>environment:
>>>> -
>>>> 
>> 
>> "SOLR_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005”
>>>> 
>>>> The thing to look for in the logs is:   solr1| Listening for
>> transport
>>>> dt_socket at address: 5005
>>>> 
>>>> BTW, when looking at these sort of subtleties, it’s always useful to
>> exec
>>>> into the container, and run `tr '\000' '\n' > 10 is
>>>> the pid of java in your container, doublecheck with `ps -eflwww`), to
>> make
>>>> sure it’s running with the arguments you expect it to.
>>>> 
>>>> — Martijn
>>>> 
>>>>> On 10 Jan 2020, at 23:42, Arnold Bronley 
>>>> wrote:
>>>>> 
>>>>>bash -c "solr start -a
>>>>> "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
>>>> -cloud
>>>>> -s /var/lib/solr -t /var/data/solr; set -x; export;
>> wait-for-solr.sh;"
>>>> 
>>>> 
>> 



Re: remote debugging for docker solr

2020-01-11 Thread Martijn Koster
I think you may have a quoting issue there: remove those inner ones. Not that 
it should matter in this instance.
I’m not sure why you’re using “start”, which will run solr in the background, 
or what you expect to happen after the wait-for-solr.sh — if it all worked as 
you expected that would wait for solr, then exit, destroying the container.

This seems to work:

version: '3.3'
services:
  solr1:
container_name: solr1
image: solr:8.4
ports:
 - "8981:8983”
 - "5005:5005”
command: bash -c "solr-fg -a 
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005”

Or even just:

version: ‘3.3'
services:
  solr1:
container_name: solr1
image: solr:8.4
ports:
 - "8981:8983”
 - "5005:5005”
environment:
 - 
"SOLR_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005”

The thing to look for in the logs is:   solr1| Listening for transport 
dt_socket at address: 5005

BTW, when looking at these sort of subtleties, it’s always useful to exec into 
the container, and run `tr '\000' '\n'  On 10 Jan 2020, at 23:42, Arnold Bronley  wrote:
> 
> bash -c "solr start -a
> "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" -cloud
> -s /var/lib/solr -t /var/data/solr; set -x; export; wait-for-solr.sh;"



Re: Solr 8.2 docker image in cloud mode not connecting to Zookeeper on startup

2019-10-18 Thread Martijn Koster


> On 18 Oct 2019, at 00:25, Drew Kidder  wrote:

> * I'm using the following command line to start a basic solr cloud instance
> as per the documentation: `bin/solr start -c -z zk1:2181,zk2:2181,zk3:2181`

I assume you’re just looking to run a single Solr node in a single container, 
right?

Just set the ZK_HOST environment variable, and remove the command-line 
arguments.
And you don’t need to specify the port number unless you deviate from the 
default.
Have a look at this example 
https://github.com/docker-solr/docker-solr-examples/blob/master/swarm/docker-compose.yml
 


The “start” command starts Solr in the background, which is typically not what 
you want
when running Solr under docker.


Why your command isn’t working as is, is not clear. When you say you’re using 
that
command-line, how do you actually do that? In a full docker command line,
or a compose file, or from a “docker exec”, or from some orchestrator.
Share the exact thing you’re doing; perhaps there is mistake there.
Also, run `ps -eflww` in the container to see what command-line arguments the 
JVM actually got started with.
And share the full startup log somewhere (in a GitHub gist perhaps), there 
might be something of interest earlier on.

>> (running `echo ruok | nc zk1 2181` returns the expected "imok" response
>> from ZK within the docker container where Solr is located)
>> * The netcat command mentioned above shows up in the ZK logs, but the Solr
>> attempts to connect do not (it's like the request isn't even getting to ZK)

Then it doesn’t sound like a environmental firewall/security-group/routing 
issue.
Next step to debug then could be to check if you actually see Solr make tcp 
connections
to port 2181, in the Solr container, using tcpdump/sysdig/netstat or some such.
If that gives a negative result, then you know it’s an issue in your Solr 
invocation config, or name resolution.
If that gives a positive result, then it’s environmental after all; and you can 
dig further.


But try the ZK_HOST thing first; it may just fix it.

— Martijn

Re: 8.2.0 getting warning - unable to load jetty,​ not starting JettyAdminServer

2019-08-21 Thread Martijn Koster
Hi Arnold,

It’s hard to say without seeing exactly what you’re doing and exactly what 
you’re seeing.
Simplify it first, ie remove your custom plugins and related config and see if 
the problem reproduces still, then try without cloud mode and see it it 
reproduces still. Then create an issue on 
https://github.com/docker-solr/docker-solr/issues 
, labelled as a question, 
with the exact command you run and its full output, and attach your zipped-up 
project directory (Dockerfile, config files and plugins, and full docker log 
output).

— Martijn

> On 20 Aug 2019, at 19:26, Arnold Bronley  wrote:
> 
> Hi,
> 
> I am using 8.2.0-slim version. I wrap it in my own image by specifying some
> additional settings in Dockerfile (all it does is specify a custom Solr
> home, copy my config files and custom Solr plugins to container and boot in
> SolrCloud mode).
> All things same, if I just change version from 8.2.0-slim to 8.1.1-slim
> then I do not get any such warning.
> 
> On Tue, Aug 20, 2019 at 5:01 AM Furkan KAMACI 
> wrote:
> 
>> Hi Arnold,
>> 
>> Such errors may arise due to file permission issues. I can run latest
>> version without of Solr via docker image without any errors. Could you
>> write which steps do you follow to run Solr docker?
>> 
>> Kind Regards,
>> Furkan KAMACI
>> 
>> On Tue, Aug 20, 2019 at 1:25 AM Arnold Bronley 
>> wrote:
>> 
>>> Hi,
>>> 
>>> I am getting following warning in Solr admin UI logs. I did not get this
>>> warning in Solr 8.1.1
>>> Please note that I am using Solr docker slim image from here -
>>> https://hub.docker.com/_/solr/
>>> 
>>> Unable to load jetty,​ not starting JettyAdminServer
>>> 
>> 



Re: Taking Solr to production with docker

2015-09-24 Thread Martijn Koster

> On 23 Sep 2015, at 15:13, Upayavira  wrote:
> 
> I'm wondering if there's anything specific that is needed to run Solr
> inside Docker? Is there something you have in mind?

There isn't really. See https://hub.docker.com/r/makuk66/docker-solr/ 
 for an example.

I'm working on turning that into an official Docker Hub image 
(https://github.com/docker-solr/docker-solr 
), so that you will be able to just 
"docker run solr" and have Solr up and running. That is currently under review 
by Docker Inc on https://github.com/docker-library/official-images/pull/107 
. If you add a +1 
there it might speed the process up.

-- Martijn