Working with debian linux inside docker contaier. I have sqlcmd working properly and neseccary drivers are installed and localizable. I know the server exists:
root@0feafecac36f:/home/shiny
But, for the life of me, I cannot figure out how to connect using sqlcmd, and I'm not sure what tricks I have at my disposal to help. This command produces an error:
sqlcmd -S nile-h.tmthk.org,31010 -U "*********" -P "********" Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired. Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749. Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
I have verified the username and password. So what is going on here? Any ideas? I tried many iterations of sqlcmd to try and fix this, but so far nothing is working.
EDIT: Telnet
root@0feafecac36f:/home/shiny
EDIT: tcptraceroute
root@0feafecac36f:/home/shiny
EDIT: ip route get
root@0feafecac36f:/home/shiny
EDIT: Dockerfile
FROM r-base:3.4.0 RUN apt-get update && apt-get install -y \ apt-utils \ curl \ libcurl4-openssl-dev \ libssl-dev \ r-cran-rjava \ gnupg2 \ r-cran-rodbc \ unixodbc \ unixodbc-dev \ apt-transport-https \ debconf-utils \ gcc \ libct4 \ libsybdb5 \ tdsodbc \ sqsh \ mlocate \ sudo \ gfortran ENV PATH="/opt/mssql-tools/bin:${PATH}" RUN useradd -u 5555 -m -d /home/shiny -c "shiny user" shiny ADD . /home/shiny/ RUN chown -R shiny:shiny /home/shiny RUN chmod 755 /home/shiny/install_sql.sh WORKDIR /home/shiny RUN Rscript installRpackages.R RUN chmod 755 /home/shiny/install_sql.sh && /home/shiny/install_sql.sh RUN R -e "install.packages('devtools')" RUN R -e "devtools::install_github('rstudio/DT')" RUN R -e "devtools::install_github('timelyportfolio/parcoords')" RUN R -e "devtools::install_github('ropensci/plotly') ; library(plotly)" RUN R -e "devtools::install_github('rstudio/crosstalk',force=TRUE) ; library(crosstalk)" RUN R -e "install.packages(c('plotly'), dependencies = TRUE, repos='https://cran.rstudio.com/')" RUN wget "http:
And finally, install_sql.sh, called by the Docker file:
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - curl https://packages.microsoft.com/config/ubuntu/16.10/prod.list > /etc/apt/sources.list.d/mssql-release.list apt-get update ACCEPT_EULA=Y apt-get install msodbcsql
bash sql-server docker sqlcmd
Stu
source share