[PYTHON] A note on how to check the connection to the license server port

There are many cases where a CAE application fails to connect to the license server and cannot be started. I will leave how to check the connection to the license server.

Prerequisites

The host name and port number of the license server are assumed to be as follows. --Hostname: theserver --Port number: 8888

Check network connection

First, check if you can connect to the host with the ping command.

command prompt


ping theserver

Check port connection

After confirming the connection to the host, confirm the connection to the port.

PowerShell

PowerShell


$tcp = New-Object System.Net.Sockets.TcpClient
# $tcp = New-Type in Object tcp and press the Tab key to complete.
$tcp.Connect("theserver", 8888)
$tcp.Connected

If you can connect


True

If you cannot connect


False

Python

IPython


import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('theserver', 8888))

If you can connect


(No output)

If you cannot connect


ConnectionRefusedError: [WinError 10061]The connection could not be made because it was rejected by the target computer.

Recommended Posts

A note on how to check the connection to the license server port
How to run Django on IIS on a Windows server
How to use GitHub on a multi-person server without a password
SSH connection to a private server using a bastion server on EC2
A note on how to load a virtual environment in PyCharm
How easy is it to synthesize a drug on the market?
How to check the memory size of a variable in Python
How to check the memory size of a dictionary in Python
A command to easily check the speed of the network on the console
How to continue processing after returning a response on aiohttp Server
How to check the version of Django
How to set the server time to Japanese time
How to test on a Django-authenticated page
Verification of how to periodically execute a script on a Linux server on Windows
How to calculate the volatility of a brand
A note on customizing the dict list class
How to live a decent life on 2017 Windows
[Note] How to create a Ruby development environment
How to set up a local development server
[Note] How to create a Mac development environment
How to mention a user group in slack notification, how to check the id of the user group
How to publish a blog on Amazon S3 with the static Blog engine'Pelican'for Pythonista
How to access the contents of a Linux disk on a Mac (but read-only)
[Flask + Keras] How to infer multiple models at high speed on the server
Read the Python-Markdown source: How to create a parser
How to set a shared folder with the host OS in CentOS7 on VirtualBOX
How to know the port number of the xinetd service
Think about how to program Python on the iPad
[Ruby on Rails] From application creation to server startup & what is the port number?
How to write a GUI using the maya command
How to put Takoyaki Oishikunaru on the segment tree
A brief note on the anger caused by scraping
How to create a submenu with the [Blender] plugin
How to deploy a Django application on Alibaba Cloud
How to install Linux on a 32bit UEFI PC
A memorandum on how to use keras.preprocessing.image in Keras
How to build a Django (python) environment on docker
[Note] How to give sudo authority to user on CentOS
How to check the Java version used by Maven
How to check in Python if one of the elements of a list is in another list
A command to check when something goes wrong when the server is not doing anything
How to create a simple TCP server / client script
A memo on how to overcome the difficult problem of capturing FX with AI
How to post a ticket from the Shogun API
How to enjoy Python on Android !! Programming on the go !!
How to build a Python environment on amazon linux 2
Python Note: The mystery of assigning a variable to a variable
[Linux] How to install a package on a server that does not have a network environment (standalone)
Check "[Windows] How to tell if the exe is x64 or x86 Part2" on MacOS Go
While solving the introductory statistics exercise 12.10, check how to draw a scatter plot in pandas.
How to easily draw the structure of a neural network on Google Colaboratory using "convnet-drawer"
A Python script that allows you to check the status of the server from your browser
How to use Fujifilm X-T3 as a webcam on Ubuntu 20.04
[Ubuntu] How to delete the entire contents of a directory
A note on the default behavior of collate_fn in PyTorch
[python] How to check if the Key exists in the dictionary
How to run a trained transformer model locally on CloudTPU
How to build a new python virtual environment on Ubuntu
How to check when python-memcached server could not be connected
How to use the __call__ method in a Python class
[Hyperledger Iroha] Notes on how to use the Python SDK