Skip to content

How to enable remote debugging of Stored Procs with Linux container? #410

Open
@benze

Description

@benze

I'm trying to use the Remote Debugger from within SSMS to debug a stored proc. However, I cannot connect to port 135 of the SQL container I spun up. I am launching my container in Linux with the following command:

 docker create --name mssql2 -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=P@$$12345'  -e -p 135:135  -p 1433:1433  -v /home/eric/docker/mssql:/var/opt/mssql -v /usr/share/zoneinfo:/usr/share/zoneinfo:ro -e TZ=America/Toronto microsoft\
/mssql-server-linux

docker start mssql2

When I try to telnet to port 135, however, the connection is immediately closed:

eric@localhost ~/docker $ telnet localhost 135
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

Logging into the mssql2 container and running netstat (after installing the net-tools package) I see:

root@2a378b0479d9:/etc# netstat -ano
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       Timer
tcp        0      0 0.0.0.0:1433            0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 127.0.0.1:1434          0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 172.17.0.3:57064        91.189.88.162:80        TIME_WAIT   timewait (7.52/0/0)
tcp        0      0 172.17.0.3:36154        91.189.88.149:80        TIME_WAIT   timewait (54.62/0/0)
tcp        0      0 127.0.0.1:37135         127.0.0.1:1433          ESTABLISHED off (0.00/0/0)
tcp        0      0 127.0.0.1:40978         127.0.0.1:1433          TIME_WAIT   timewait (18.04/0/0)
tcp        0      0 127.0.0.1:1433          127.0.0.1:45665         ESTABLISHED keepalive (7051.49/0/0)
tcp        0      0 127.0.0.1:1433          127.0.0.1:37135         ESTABLISHED keepalive (7051.46/0/0)
tcp        0      0 127.0.0.1:45665         127.0.0.1:1433          ESTABLISHED off (0.00/0/0)
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node   Path

So clearly MSSQL isn't even listening on port 135 within the container. What do I need to do to enable the remote debug port on the docker container? I do not even see any reference to port 135 in the logfile either.

Thanks,

Eric

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions