# Problem connecting to 3700 via Windows-\>WSL-\>Docker

**URL:** <https://forum.payara.fish/t/problem-connecting-to-3700-via-windows-wsl-docker/606>\
**Category:** Technical Discussion\
**Created:** [April 24, 2023, 9:28am UTC](https://forum.payara.fish/t/problem-connecting-to-3700-via-windows-wsl-docker/606 "2023-04-24T09:28:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igor](https://avatars.discourse-cdn.com/v4/letter/i/dec6dc/32.png) [@Igor](https://forum.payara.fish/u/Igor)\
**Post date:** [April 24, 2023, 9:28am UTC](https://forum.payara.fish/t/problem-connecting-to-3700-via-windows-wsl-docker/606/1 "2023-04-24T09:28:49Z")

</div>

Hi there,

I have a problem with payara running on docker. I’m running the image payara/server-full:5.2022.5 on docker on ubuntu/wsl on windows 11. I’m unable to connect to the ejb-port 3700 from windows. Connection from ubuntu/wsl works well. I have tried a lot of things… May you can help me to connect to the payara and make jndi-lookups.

**Reproduction**

Start the payara-container:

docker run -p 3700:3700 -p 8080:8080 -p 4848:4848 payara/server-full:5.2022.5

I dont have deployed anything.

After that I can reach localhost:8080 and localhost:4848 from my windows-browser (4848 with certificat-issues).

I wrote a minimal java-ejb-client that lookups the default jdbc-datasource (“jdbc/\_\_default”). Lookup works fine from ubuntu/wsl, but dosnt work from windows.

Result of minimal-example-client startet from Ubuntu/WSL:

```auto
Start minimal example client
Apr 21, 2023 8:22:41 AM com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findH2Client
INFO: Cannot find h2db client jar file, h2 jdbc driver will not be available by default.
Apr 21, 2023 8:22:42 AM org.glassfish.enterprise.iiop.api.GlassFishORBHelper postConstruct
INFO: GlassFishORBFactory service initialized.
Apr 21, 2023 8:22:47 AM org.hibernate.validator.internal.util.Version <clinit>
INFO: HV000001: Hibernate Validator null
Got instance: com.sun.gjc.spi.jdbc40.DataSource40@1da4b3f9

```

minimal-example-client startet from windows:

```auto
Start minimal example client
Apr 21, 2023 8:23:54 AM com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findH2Client
INFORMATION: Cannot find h2db client jar file, h2 jdbc driver will not be available by default.
Apr 21, 2023 8:23:54 AM org.glassfish.enterprise.iiop.api.GlassFishORBHelper postConstruct
INFORMATION: GlassFishORBFactory service initialized.

```

Than the connection hangs for at least 30 minutes. The application will not terminate, no exception, nothing happens.

**Further investigations**

- If I remove the IIOP-Listener at port 3700 and change the admin-server to listen at 3700, I can reach the admin-webpage from windows-browser at localhost:3700. That means, there are no networking/firewall/portmapping-issues.

- If I do a tcpdump on the payara-docker-container, I see different communications from the ubuntu/wsl and windows. Both tcpdumps attached here. I see, that the communication from windows contains the external-windows-ip in cleartext. The communication from ubuntu/wsl dont transmit any IP at this location.

- I have created an own image based on openjdk and installed payara by hand in that container. Same issue…

**Restrictions**

For some special reasons, Im pinned to Java8. So I cant update to Payara6 at this moment.

I cant switch to the ejb via http invoker-servlet, because I need to lookup JMS-Resources. This is not (yet) supportet by the http-interface.

**Questions**

Is there an general restriction for using EJB-Lookups in this setup? Why is port 3700 not exposed by default in the docker-file?

What can I do to get this simple case working?

Thanks in advance for every kind of help!

Igor 🙂

---

<div class="post-metadata">

**Author:** ![Igor](https://avatars.discourse-cdn.com/v4/letter/i/dec6dc/32.png) [@Igor](https://forum.payara.fish/u/Igor)\
**Post date:** [April 24, 2023, 9:30am UTC](https://forum.payara.fish/t/problem-connecting-to-3700-via-windows-wsl-docker/606/2 "2023-04-24T09:30:01Z")

</div>

My Test-client:

```auto
import java.util.Hashtable;

import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.naming.Context;
public class Test {
	public static void main(String[] args) throws NamingException {
		System.out.println("Start minimal example client");
		Hashtable<String, Object> env = new Hashtable<String, Object>();		
		env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.enterprise.naming.SerialInitContextFactory");
		InitialContext context = new InitialContext(env);		
		Object o = context.lookup("jdbc/__default");
		System.out.println("Got instance: " + o);
	}
}

```
