Integration 2.3 demo server storage proxy error

Hello community,

https://docs.mender.io/2.3/getting-started/on-premise-installation/create-a-test-environment
I passed the demo-server installation steps from this document but when I run the script below I get an error like this:

root@ubuntu:/home/robust2/mender-server/integration-2.3.0# ./demo up
Starting the Mender demo environment…
integration230_mender-mongo_1 is up-to-date
integration230_minio_1 is up-to-date
integration230_mender-gui_1 is up-to-date
integration230_mender-redis_1 is up-to-date
integration230_mender-elasticsearch_1 is up-to-date
integration230_mender-create-artifact-worker_1 is up-to-date
integration230_mender-inventory_1 is up-to-date
integration230_mender-useradm_1 is up-to-date
integration230_mender-workflows-server_1 is up-to-date
Starting integration230_storage-proxy_1 …
integration230_mender-conductor_1 is up-to-date
integration230_mender-device-auth_1 is up-to-date
Starting integration230_storage-proxy_1 … error

ERROR: for integration230_storage-proxy_1 Cannot start service storage-proxy: driver failed programming external connectivity on endpoint integration230_storage-proxy_1 (a8271e285e352a97c4ca0010ef8516a7ce394fcfd1e2780b961dfd5da508f15d): Bind for 0.0.0.0:9000 failed: port is already allocated

ERROR: for storage-proxy Cannot start service storage-proxy: driver failed programming external connectivity on endpoint integration230_storage-proxy_1 (a8271e285e352a97c4ca0010ef8516a7ce394fcfd1e2780b961dfd5da508f15d): Bind for 0.0.0.0:9000 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.
Failed to start docker compose

Bind for 0.0.0.0:9000 failed: port is already allocated. I listened to open ports to check this, but 9000 ports are not used. Do you have any solution suggestions about the error?
Thanks

And no containers are currently running?

btw, robust2 is an interesting home folder name. What happened to robust1?

Hi @oleorhagen

robust1 and robust2 are just a virtual machine username.

And yes, a container named Storage-proxy does not appear.

No containers whatsoever?

I did not fully understand what you mean. But when I run “docker-compose ps” command, I get an error message like this:

> robust2@ubuntu:~/mender-server/integration-2.3.0$ docker-compose up
> ERROR: Service 'mender-deployments' depends on service 'storage-proxy' which is undefined.

And than I run the “./run ps” command, I get an error like the one below:

>                  Name                                Command                  State              Ports
> --------------------------------------------------------------------------------------------------------------
> menderproduction_mender-api-gateway_1     /entrypoint.sh                   Up             0.0.0.0:443->443/tcp
> menderproduction_mender-conductor_1       /srv/start_conductor.sh          Up             8080/tcp, 8090/tcp
> menderproduction_mender-deployments_1     /entrypoint.sh --config /e ...   Up             8080/tcp
> menderproduction_mender-device-auth_1     /usr/bin/deviceauth --conf ...   Up             8080/tcp
> menderproduction_mender-elasticsearch_1   /docker-entrypoint.sh elas ...   Up             9200/tcp, 9300/tcp
> menderproduction_mender-gui_1             /entrypoint.sh nginx             Up             80/tcp
> menderproduction_mender-inventory_1       /usr/bin/inventory --confi ...   Up             8080/tcp
> menderproduction_mender-mongo_1           docker-entrypoint.sh mongod      Up             27017/tcp
> menderproduction_mender-redis_1           /redis/entrypoint.sh             Up             6379/tcp
> menderproduction_mender-useradm_1         /usr/bin/useradm --config  ...   Up             8080/tcp
> menderproduction_minio_1                  /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp
> menderproduction_storage-proxy_1          /usr/local/openresty/bin/o ...   Exit 128

What does the following report?

sudo fuser -v 9000/tcp

robust2@ubuntu:~/mender-server/production$ sudo fuser -v 9000/tcp
USER PID ACCESS COMMAND
9000/tcp: root 5418 F… docker-proxy

It looks like there is no problem but I get an error due to the storage-proxy.

That means that there is a docker container using that port. What does “docker ps” and “docker ps -a” show?

Drew

root@ubuntu:/home/robust2/mender-server/production# docker ps
CONTAINER ID        IMAGE                                      COMMAND                  CREATED             STATUS                  PORTS                                            NAMES
5ad4d8ccb170        cfssl/cfssl                                "cfssl serve -addres…"   6 weeks ago         Up 6 weeks              0.0.0.0:8888->8888/tcp                           cfssl
e20c16d59eb4        portainer/portainer                        "/portainer"             6 weeks ago         Up 6 weeks              0.0.0.0:8000->8000/tcp, 0.0.0.0:9000->9000/tcp   portainer
aee147ee873e        mysql/mysql-server:5.7                     "/entrypoint.sh mysq…"   3 months ago        Up 6 weeks (healthy)    0.0.0.0:3306->3306/tcp, 33060/tcp                dev-mysql
20c5609440a3        mendersoftware/api-gateway:2.0.0           "/entrypoint.sh"         4 months ago        Up 10 hours             0.0.0.0:443->443/tcp                             menderproduction_mender-api-gateway_1
0d454c9830c4        mendersoftware/deviceauth:2.0.0            "/usr/bin/deviceauth…"   4 months ago        Up 10 hours             8080/tcp                                         menderproduction_mender-device-auth_1
defdb3ce1da6        mendersoftware/mender-conductor:1.4.0      "/srv/start_conducto…"   4 months ago        Up 6 weeks              8080/tcp, 8090/tcp                               menderproduction_mender-conductor_1
a29049decc15        mendersoftware/deployments:1.7.1           "/entrypoint.sh --co…"   4 months ago        Up 58 seconds           8080/tcp                                         menderproduction_mender-deployments_1
dd88354b4894        mendersoftware/useradm:1.8.0               "/usr/bin/useradm --…"   4 months ago        Up 10 hours             8080/tcp                                         menderproduction_mender-useradm_1
c2cb9dfd016a        mendersoftware/inventory:1.6.0             "/usr/bin/inventory …"   4 months ago        Up 10 hours             8080/tcp                                         menderproduction_mender-inventory_1
18eda26f99e7        mongo:3.4                                  "docker-entrypoint.s…"   4 months ago        Up 10 hours             27017/tcp                                        menderproduction_mender-mongo_1
879d085bdb40        redis:5-alpine3.8                          "/redis/entrypoint.sh"   4 months ago        Up 6 weeks              6379/tcp                                         menderproduction_mender-redis_1
7bba28e51b1c        elasticsearch:5-alpine                     "/docker-entrypoint.…"   4 months ago        Up 6 weeks              9200/tcp, 9300/tcp                               menderproduction_mender-elasticsearch_1
ef4be774c382        minio/minio:RELEASE.2018-09-25T21-34-43Z   "/usr/bin/docker-ent…"   4 months ago        Up 10 hours (healthy)   9000/tcp                                         menderproduction_minio_1
e6a3f293d476        mendersoftware/gui:2.1.0                   "/entrypoint.sh nginx"   4 months ago        Up 10 hours             80/tcp                                           menderproduction_mender-gui_1
a78d62a4761d        0ba6fcaf3bcb                               "/usr/bin/deviceauth…"   7 months ago        Up 7 seconds            8080/tcp                                         integration210_mender-device-auth_1
b95a0515a1d8        mendersoftware/mender-conductor:1.4.0      "/srv/start_conducto…"   7 months ago        Up 6 weeks              0.0.0.0:8080->8080/tcp, 8090/tcp                 integration210_mender-conductor_1
a1b38621f92b        mendersoftware/useradm:1.8.0               "/usr/bin/useradm --…"   7 months ago        Up 1 second             8080/tcp                                         integration210_mender-useradm_1
a351bbc68490        aab29f265f54                               "/usr/bin/inventory …"   7 months ago        Up 9 seconds            8080/tcp                                         integration210_mender-inventory_1
8faf360d4490        mendersoftware/deployments:1.7.1           "/entrypoint.sh --co…"   7 months ago        Up 10 seconds           8080/tcp                                         integration210_mender-deployments_1
95b0b83d85a6        redis:5-alpine3.8                          "/redis/entrypoint.sh"   7 months ago        Up 6 weeks              6379/tcp                                         integration210_mender-redis_1
6163964a9867        elasticsearch:5-alpine                     "/docker-entrypoint.…"   7 months ago        Up 6 weeks              9200/tcp, 9300/tcp                               integration210_mender-elasticsearch_1
d5fdecacc3f4        aab29f265f54                               "/usr/bin/inventory …"   7 months ago        Up 1 second             8080/tcp                                         integration-201_mender-inventory_1
fa2e99cb934a        mendersoftware/gui:2.0.1                   "/entrypoint.sh"         7 months ago        Up 6 weeks              80/tcp                                           integration-201_mender-gui_1

It looks like you have two server instances running. I suspect it is the demo config and your production config. If you do the following, and then inspect the “docker ps” output, you should not have any Mender related ones left:

cd
./demo stop
cd <path to production server directory"
./run stop

I couldn’t solve the problem, I still get the error from storage-proxy. However, after doing what you said, I was able to run demo environment and add my virtual machines to the Devices section. The error does not currently prevent the Mender server from running. Thank you for your help. But I have one more question:

With the demo environment installed, I want to update any binary files running on end devices. For example, while a running executable (binaryXXX) is on 1.0.0 release, I want to upgrade it to 1.0.1 with Mender. Is it possible to do this in demo environment? Can you help me if possible??

Sure. That just requires a custom update module. See the following links for more details:

Drew

1 Like

Thanks. I will review :blush: