You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Robert Munteanu <ro...@apache.org> on 2017/08/24 09:19:23 UTC

[RT] Drop port 8888?

Hi,

We are using two main ports when dealing with Sling:

- 8080 for 'regular' instances
- 8888 for 'testing' instances - mainly used in the integration tests

I usually notice this when I want to try running an IT from my IDE
against a running Sling instance and it times out looking for something
on port 8888 .

I am not familiar with the reasons for using port 8888, but would it be
worth dropping this port and using 8080 from now on? It would IMO make
development with Sling simpler.

The changes would be quite localised:

- code change in
bundles/commons/testing/src/main/java/org/apache/sling/commons/testing/
integration/HttpTestBase.java
- documentation changes in launchpad and contrib/launchpad

Thoughts?

Robert

Re: [RT] Drop port 8888?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Thu, Aug 24, 2017 at 11:19 AM, Robert Munteanu <ro...@apache.org> wrote:
> ...I am not familiar with the reasons for using port 8888, but would it be
> worth dropping this port and using 8080 from now on?...

+1 for using a single port throughout.

I see a few more occurences than you mention but nothing major, see below.

-Bertrand

./contrib/launchpad/testing/pom.xml:
<jetty.http.port>8888</jetty.http.port>
./contrib/launchpad/testing/README.txt:with mvn jetty:run, from
http://localhost:8888/system/console/vmstat. ***
./launchpad/builder/README.txt:        http://localhost:8888
./launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java:
     // We skip
http://localhost:8888/org.apache.sling.launchpad.testing-6-SNAPSHOT/
./launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java:
     // or http://localhost:8888/
./samples/installing-dependencies/pom.xml:
<slingUrl>http://localhost:8888/system/console</slingUrl>
./testing/tools/src/main/java/org/apache/sling/testing/tools/junit/RemoteLogDumper.java:
           baseUrl = "http://localhost:8888";

Re: [RT] Drop port 8888?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Thu, Aug 24, 2017 at 1:19 PM, Oliver Lietz <ap...@oliverlietz.de> wrote:
> ....Why not use dynamic ports when running tests?..

I agree that's best and as Robert says we're doing that in most places.

However we do have a default port for launchpad etc. and the problem
is that we currently have two default values - a single one would be
better.

-Bertrand

Re: [RT] Drop port 8888?

Posted by Robert Munteanu <ro...@apache.org>.
On Thu, 2017-08-24 at 15:15 +0200, Oliver Lietz wrote:
> On Thursday 24 August 2017 13:34:08 Robert Munteanu wrote:
> > On Thu, 2017-08-24 at 13:19 +0200, Oliver Lietz wrote:
> > > I guess 8888 was chosen to prevent clashes with other servers
> > > running
> > > on the
> > > same machine and bound to 8080, e.g. Jenkins or regular Sling.
> > > Why
> > > not use
> > > dynamic ports when running tests?
> > 
> > Integration tests are using dynamic ports as far as I know. So
> > there
> > would be no clashes there.
> 
> launchpad/integration-tests is using a fixed port but 8080.
> 
> To prevent accidents (writing test data to local Sling instances*) I
> would 
> omit any default port and force users to provide one (not running any
> tests 
> when port is missing).

I've created https://issues.apache.org/jira/browse/SLING-7092 to track
removal of port 8888. We can have separate Jira instances for other
improvements.

Robert

Re: [RT] Drop port 8888?

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Thursday 24 August 2017 13:34:08 Robert Munteanu wrote:
> On Thu, 2017-08-24 at 13:19 +0200, Oliver Lietz wrote:
> > I guess 8888 was chosen to prevent clashes with other servers running
> > on the
> > same machine and bound to 8080, e.g. Jenkins or regular Sling. Why
> > not use
> > dynamic ports when running tests?
> 
> Integration tests are using dynamic ports as far as I know. So there
> would be no clashes there.

launchpad/integration-tests is using a fixed port but 8080.

To prevent accidents (writing test data to local Sling instances*) I would 
omit any default port and force users to provide one (not running any tests 
when port is missing).

Regards,
O.

* I guess I could happen quite fast when developers build Sling modules 
locally

> Robert


Re: [RT] Drop port 8888?

Posted by Robert Munteanu <ro...@apache.org>.
On Thu, 2017-08-24 at 13:19 +0200, Oliver Lietz wrote:
> I guess 8888 was chosen to prevent clashes with other servers running
> on the 
> same machine and bound to 8080, e.g. Jenkins or regular Sling. Why
> not use 
> dynamic ports when running tests?

Integration tests are using dynamic ports as far as I know. So there
would be no clashes there.

Robert

Re: [RT] Drop port 8888?

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Thursday 24 August 2017 11:19:23 Robert Munteanu wrote:
> Hi,

Hi,

> We are using two main ports when dealing with Sling:
> 
> - 8080 for 'regular' instances
> - 8888 for 'testing' instances - mainly used in the integration tests
> 
> I usually notice this when I want to try running an IT from my IDE
> against a running Sling instance and it times out looking for something
> on port 8888 .
> 
> I am not familiar with the reasons for using port 8888, but would it be
> worth dropping this port and using 8080 from now on? It would IMO make
> development with Sling simpler.
> 
> The changes would be quite localised:
> 
> - code change in
> bundles/commons/testing/src/main/java/org/apache/sling/commons/testing/
> integration/HttpTestBase.java
> - documentation changes in launchpad and contrib/launchpad
> 
> Thoughts?

I guess 8888 was chosen to prevent clashes with other servers running on the 
same machine and bound to 8080, e.g. Jenkins or regular Sling. Why not use 
dynamic ports when running tests?

Regards,
O.

> Robert