# Connecting hivemq instance from google cloud VM

**URL:** <https://community.hivemq.com/t/connecting-hivemq-instance-from-google-cloud-vm/2089>\
**Category:** HiveMQ Community Edition\
**Created:** [May 19, 2023, 2:11pm UTC](https://community.hivemq.com/t/connecting-hivemq-instance-from-google-cloud-vm/2089 "2023-05-19T14:11:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![paragdrring](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@paragdrring](https://community.hivemq.com/u/paragdrring)\
**Post date:** [May 19, 2023, 2:11pm UTC](https://community.hivemq.com/t/connecting-hivemq-instance-from-google-cloud-vm/2089/1 "2023-05-19T14:11:32Z")

</div>

Hello all, we are unable to connect hivemq instance from one of our dedicated VM (Ubuntu) on google cloud.

Followed steps from **Install HiveMQ from a Download Package** [Getting Started with the HiveMQ Platform :: HiveMQ Documentation](https://docs.hivemq.com/hivemq/4.15/user-guide/getting-started.html#download).

Running the .sh file produces below result:

* * *

```
              _ _ _ ____  ____
             | | | |(_) | \/ | / __ \ 
             | | __| | ___  _____ | \ / || | | |
             | __ || |\ \ / // _ \| |\/| || | | |
             | | | || | \ V /| __/| | | || |__ | |
             |_| |_||_| \_/ \ ___||_| |_| \___ \_\

```

* * *

HiveMQ Start Script for Linux/Unix v1.13

* * *

HIVEMQ\_HOME: /var/www/html/hivemq-4.15.0

JAVA\_OPTS: -Djava.net.preferIPv4Stack=true -noverify --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED -Djava.security.egd=file:/dev/./urandom -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Duser.language=en -Duser.region=US -XX:+CrashOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError

JAVA\_VERSION: 11

* * *

2023-05-19 14:00:28,810 INFO - Starting HiveMQ Enterprise Server  
2023-05-19 14:00:28,822 INFO - HiveMQ version: 4.15.0  
2023-05-19 14:00:28,822 INFO - HiveMQ home directory: /var/www/html/hivemq-4.15.0  
2023-05-19 14:00:28,825 INFO - Log Configuration was overridden by /var/www/html/hivemq-4.15.0/conf/logback.xml  
2023-05-19 14:00:29,550 INFO - Successfully loaded configuration from ‘/var/www/html/hivemq-4.15.0/conf/config.xml’.  
2023-05-19 14:00:29,690 INFO - This node’s ID is IuRRL  
2023-05-19 14:00:29,690 INFO - Clustering is disabled  
2023-05-19 14:00:34,448 INFO - No valid license file found. Using trial license, restricted to 25 connections.  
2023-05-19 14:00:35,202 INFO - This node uses ‘2’ CPU cores.  
2023-05-19 14:00:35,208 INFO - Starting HiveMQ extension system.  
2023-05-19 14:00:35,265 INFO - Starting extension with id “hivemq-allow-all-extension” at /var/www/html/hivemq-4.15.0/extensions/hivemq-allow-all-extension  
2023-05-19 14:00:35,275 WARN -  
################################################################################################################

# This HiveMQ deployment is not secure! You are lacking Authentication and Authorization.

# Right now any MQTT client can connect to the broker with a full set of permissions.

# For production usage, add an appropriate security extension and remove the hivemq-allow-all extension.

# You can download security extensions from the HiveMQ Marketplace ([HiveMQ Extensions Marketplace: MQTT Integration Made Easy](https://www.hivemq.com/extensions/)).

################################################################################################################  
2023-05-19 14:00:35,276 INFO - Extension “Allow All Extension” version 1.0.0 started successfully.  
2023-05-19 14:00:37,475 INFO - IuRRL: no members discovered after 2001 ms: creating cluster as first member  
2023-05-19 14:00:37,510 INFO - No user for HiveMQ Control Center configured. Starting with default user  
2023-05-19 14:00:37,511 INFO - Starting HiveMQ Control Center on address 127.0.0.1 and port 8080  
2023-05-19 14:00:37,908 INFO - Control Center Audit Logging started.  
2023-05-19 14:00:37,914 INFO - Started HiveMQ Control Center in 403ms  
2023-05-19 14:00:37,933 INFO - Starting TCP listener on address 0.0.0.0 and port 1883  
2023-05-19 14:00:37,957 INFO - Started TCP Listener on address 0.0.0.0 and on port 1883.  
2023-05-19 14:00:37,957 INFO - Started HiveMQ in 9158ms

But when we try connecting control center or tcp port 1883 using our ip address:

http://:8080 - it doesn’t return control center, connection is refused.

Added network firewall policy for TCP ports - 1883 and 8080 on google cloud as well.

If I change the config.xml and change bindAddress, it doesn’t work either.

Is there anything else we are missing.

Any help would be highly appreciated.

---

<div class="post-metadata">

**Author:** ![AaronTLFranz](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/aarontlfranz/32/638_2.png) [@AaronTLFranz](https://community.hivemq.com/u/AaronTLFranz)\
**Post date:** [May 19, 2023, 2:38pm UTC](https://community.hivemq.com/t/connecting-hivemq-instance-from-google-cloud-vm/2089/2 "2023-05-19T14:38:27Z")

</div>

Hello @paragdrring ,

To confirm, does this Ubuntu VM also utilize a local firewall? Typically, Ubuntu installations include “ufw” or “Uncomplicated Firewall” which can prevent these ports from being accessed from the Ubuntu VM itself, rather than a network configuration within the Google Cloud / GCP environment.

Best,  
Aaron from the HiveMQ Team

---

<div class="post-metadata">

**Author:** ![paragdrring](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@paragdrring](https://community.hivemq.com/u/paragdrring)\
**Post date:** [May 19, 2023, 3:20pm UTC](https://community.hivemq.com/t/connecting-hivemq-instance-from-google-cloud-vm/2089/3 "2023-05-19T15:20:57Z")

</div>

Tried changing this but no success. Just want to ask one question, in config.xml do we need to change binding address from local to the actual IP?

 1883 0.0.0.0 

And same for control center webUI?

---

<div class="post-metadata">

**Author:** ![AaronTLFranz](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/aarontlfranz/32/638_2.png) [@AaronTLFranz](https://community.hivemq.com/u/AaronTLFranz)\
**Post date:** [May 19, 2023, 3:41pm UTC](https://community.hivemq.com/t/connecting-hivemq-instance-from-google-cloud-vm/2089/4 "2023-05-19T15:41:09Z")

</div>

Hello @paragdrring ,

0.0.0.0 specifies ‘any’ for the available IP address, meaning that it will take the address available for the network adapter being utilized.

If we are looking to use a specific address, it is recommended to update these bind addresses to the accurate network addresses intended to be utilized. More information regarding configuration is available [here](https://docs.hivemq.com/hivemq/3.4/user-guide/configuration.html#configuration-files).

Best,  
Aaron from HiveMQ Team

---

<div class="post-metadata">

**Author:** ![paragdrring](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@paragdrring](https://community.hivemq.com/u/paragdrring)\
**Post date:** [May 19, 2023, 4:56pm UTC](https://community.hivemq.com/t/connecting-hivemq-instance-from-google-cloud-vm/2089/5 "2023-05-19T16:56:56Z")

</div>

This is SOLVED. I re-added the firewall rules for 8080 and 1883 and for control center UI changed from localhost to 0.0.0.0 in config.

Thanks for all the help!

---

<div class="post-metadata">

**Author:** ![AaronTLFranz](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/aarontlfranz/32/638_2.png) [@AaronTLFranz](https://community.hivemq.com/u/AaronTLFranz)\
**Post date:** [May 19, 2023, 5:08pm UTC](https://community.hivemq.com/t/connecting-hivemq-instance-from-google-cloud-vm/2089/6 "2023-05-19T17:08:56Z")

</div>

Hello @paragdrring ,

Glad to hear it, and thanks again for using the community forum!

Best,  
Aaron from HiveMQ Team
