Hi Jaracle,
In a docker file, each filesystem state is saved and there is no running
processes kept between commands.
That means that you should start and run the cli in the same command:
RUN sudo $jamesbin/james start && \
sudo sh $jamesbin/james-cli.sh -h 127.0.0.1 -p 9999 adddomain
test-domain.com
Give it a try.
cheers
On Tue, 5 Jun 2018 at 02:45 Jaracle Zhang <[email protected]> wrote:
> Hi,
>
> I got errors when I was executing james-cli.sh -h 127.0.0.1 -p 9999
> adddomain test-domain.com in Docker. Exceptions are below.
>
> Error connecting to remote JMX agent : Failed to retrieve RMIServer stub:
> javax.naming.ServiceUnavailableException[Root exception is
> java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested
> exception is:
> java.net.ConnectException: Connection refused(Connection refused)]
>
> OS:
> Win10 host
> VirtualBox4.3.12 with CentOS7
> Docker:
> 18.05.0-CE
> JAMES:
> 3.0.1-app
> Dockerfile:
> …
> RUN sudo $jamesbin/james start
> RUN sudo sh $jamesbin/james-cli.sh -h 127.0.0.1 -p 9999 adddomain
> test-domain.com //Exceptions are here
>
> Am I missing some configurations with JAMES or the environment problem?
>
> Thanks
>
> Jaracle Zhang
>
>
>