Hi Simon, It seems not working.My code like this:
RUN sudo $jamesbin/james start && \ echo "$(<$jameshome/log/wrapper.log)" && \ sudo sh $jamesbin/james-cli.sh AddDomain test-domain.com Before this command,I configured conf/wrapper.conf: wrapper.java.additional.15=-Djava.rmi.server.hostname=127.0.0.1 But still the same error.As you can see,I print the wrapper.log: --> Wrapper Started as Daemon Launching a JVM... And then nothing shows.Maybe the wrapper didn't start? Because as I know,the wrapper.log will print "Apache James :: Server :: App started." if the wrapper starts successfully. Thanks for any help, Jaracle Zhang 2018-06-05 18:27 GMT+08:00 Simon Levesque <si...@simonlevesque.com>: > 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 <jaracle.zh...@gmail.com> 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 > > > > > > >