Reputation: 37
I launch a VM on GCE, create a static external IP address, assigned to my VM, create a firewall rule to allow incoming traffic on port TCP 9004(default port for TabPy) with that IP.
Then I downloaded & installed Miniconda, create a working env on cd ~ on my user, activate it and inside it upgraded pip and pip install tabpy.
This is my config file:
[TabPy]
# TABPY_QUERY_OBJECT_PATH = /tmp/query_objects
# TABPY_PORT = 9004
# TABPY_STATE_PATH = ./tabpy/tabpy_server
# Where static pages live
# TABPY_STATIC_PATH = ./tabpy/tabpy_server/static
# For how to configure TabPy authentication read
# Authentication section in docs/server-config.md.
TABPY_PWD_FILE = /home/cremerf/dataspeaks/credentials/tabpypwd.txt
# To set up secure TabPy uncomment and modify the following lines.
# Note only PEM-encoded x509 certificates are supported.
# TABPY_TRANSFER_PROTOCOL = https
# TABPY_CERTIFICATE_FILE = /path/to/certificate/file.crt
# TABPY_KEY_FILE = /path/to/key/file.key
# Log additional request details including caller IP, full URL, client
# end user info if provided.
TABPY_LOG_DETAILS = true
# Limit request size (in Mb) - any request which size exceeds
# specified amount will be rejected by TabPy.
# Default value is 100 Mb.
# TABPY_MAX_REQUEST_SIZE_MB = 100
# Enable evaluate api to execute ad-hoc Python scripts
# Enabled by default. Disabling it will result in 404 error.
# TABPY_EVALUATE_ENABLE = true
# Configure how long a custom script provided to the /evaluate method
# will run before throwing a TimeoutError.
# The value should be a float representing the timeout time in seconds.
# TABPY_EVALUATE_TIMEOUT = 30
# Enable Gzip compression for requests and responses.
# TABPY_GZIP_ENABLE = true
[loggers]
keys=root
[handlers]
keys=rootHandler,rotatingFileHandler
[formatters]
keys=rootFormatter
[logger_root]
level=DEBUG
handlers=rootHandler,rotatingFileHandler
qualname=root
propagete=0
[handler_rootHandler]
class=StreamHandler
level=INFO
formatter=rootFormatter
args=(sys.stdout,)
[handler_rotatingFileHandler]
class=handlers.RotatingFileHandler
level=DEBUG
formatter=rootFormatter
args=('tabpy_log.log', 'a', 1000000, 5)
[formatter_rootFormatter]
format=%(asctime)s [%(levelname)s] (%(filename)s:%(module)s:%(lineno)d): %(message)s
datefmt=%Y-%m-%d,%H:%M:%S
This is what my firewall rules look like:
I allowed HTTP on the VM and also HTTPS but I did not SSL certificate yet.
Now, my issue is the following:
I start my tabpy server on my console with
tabpy --config /home/cremerf/dataspeaks/configs/configs_ds_mmm.conf
The server starts OK.
Then I run these commands from my VM's console ("inside the VM") to check if the server has internet access and is listening etc etc, and everything works fine:
telnet 34.94.193.185 9004
curl http://34.94.193.185:9004
Everything seems fine here. The problem is, when I want to access this address http://34.94.193.185:9004 OUTSIDE THE VM, let's say.. Google Chrome on my windows laptop, I can't! Returns run time error.
Does anyone know what am I doing wrong? The VM is supposed to allow external access from outside the VM on the hostname and port, I set up the firewalls and the port is listening also (see lsof -i 9004 on the image).
After achieving this endeavor, I need to enable analytics extensions on Tableau Cloud, but I'm aware that regarding Tableau Cloud I need to certificate with SSL my tabpy server... that's another story but for now, I don't know why I can't access to my hostname and port from outside the VM.
I'm really stuck with this and I've already read all the documentation you could imagine. Any help will be greatly appreciated.
Upvotes: 0
Views: 95