# Cannot connect to Digital Ocean web server

**URL:** <https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143>\
**Category:** Uncategorized\
**Created:** [March 15, 2022, 12:31pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143 "2022-03-15T12:31:29Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![afvwyk8109](https://talk.openmrs.org/letter_avatar/afvwyk8109/32/5_5575768a8748004e209b776fc1b2916d.png) [@afvwyk8109](https://talk.openmrs.org/u/afvwyk8109)\
**Post date:** [March 15, 2022, 12:31pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/1 "2022-03-15T12:31:29Z")

</div>

Hello,I opened a Digital Ocean Ubuntu server with Docker and the followed the instructions to install OpenMRS on the server. Installen Maven and JAVA. Installation process completed with success. However, I struggle to connect to the webserver through the IP address. The IP address is 174.138.8.224 And the port should be 8080.

Can anyone here help me to fix this?

---

<div class="post-metadata">

**Author:** ![herbert24](https://talk.openmrs.org/user_avatar/talk.openmrs.org/herbert24/32/8178_2.png) [@herbert24](https://talk.openmrs.org/u/herbert24)\
**Post date:** [March 15, 2022, 12:41pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/2 "2022-03-15T12:41:48Z")

</div>

whats the full link you are using to connect ie the link you are trying to put in the browser,could it be some thing like [http://174.138.8.224:8080/](http://174.138.8.224:8080/)

---

<div class="post-metadata">

**Author:** ![tendomart](https://talk.openmrs.org/user_avatar/talk.openmrs.org/tendomart/32/6753_2.png) [@tendomart](https://talk.openmrs.org/u/tendomart)\
**Post date:** [March 15, 2022, 1:12pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/3 "2022-03-15T13:12:51Z")

</div>

> [@afvwyk8109](#):
>
> 174.138.8.224 And the port should be 8080.

Is this your external IP address for your docker instance ? doesn’t look responsive and port doesn’t look open

---

<div class="post-metadata">

**Author:** ![afvwyk8109](https://talk.openmrs.org/letter_avatar/afvwyk8109/32/5_5575768a8748004e209b776fc1b2916d.png) [@afvwyk8109](https://talk.openmrs.org/u/afvwyk8109)\
**Post date:** [March 15, 2022, 1:20pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/4 "2022-03-15T13:20:12Z")

</div>

I use [http://174.138.8.224:8080/openmrs](http://174.138.8.224:8080/openmrs)

 ![16473503615932142461844889498821](https://talk.openmrs.org/uploads/default/original/3X/5/e/5eedf5f2206b1511785390a8b6358741f3d7022c.jpeg)

---

<div class="post-metadata">

**Author:** ![tendomart](https://talk.openmrs.org/user_avatar/talk.openmrs.org/tendomart/32/6753_2.png) [@tendomart](https://talk.openmrs.org/u/tendomart)\
**Post date:** [March 15, 2022, 1:23pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/5 "2022-03-15T13:23:27Z")

</div>

This is what i get trying to access the same.

 ![Screenshot from 2022-03-15 16-22-55](https://talk.openmrs.org/uploads/default/original/3X/f/1/f1ef0fec9a768676e98b687489b96237640a02a3.png)

---

<div class="post-metadata">

**Author:** ![afvwyk8109](https://talk.openmrs.org/letter_avatar/afvwyk8109/32/5_5575768a8748004e209b776fc1b2916d.png) [@afvwyk8109](https://talk.openmrs.org/u/afvwyk8109)\
**Post date:** [March 15, 2022, 2:25pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/6 "2022-03-15T14:25:47Z")

</div>

Okay. I added port 8080 to the ports.conf file in apache2. How do I now make it open openmrs? It now goes to the apache2 landing page.

---

<div class="post-metadata">

**Author:** ![afvwyk8109](https://talk.openmrs.org/letter_avatar/afvwyk8109/32/5_5575768a8748004e209b776fc1b2916d.png) [@afvwyk8109](https://talk.openmrs.org/u/afvwyk8109)\
**Post date:** [March 15, 2022, 2:27pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/7 "2022-03-15T14:27:44Z")

</div>

[http://174.138.8.224:8080/](http://174.138.8.224:8080/)

It does not open when I add /openmrs

Gives message: The requested URL was not found on this server.

Apache/2.4.41 (Ubuntu) Server at 174.138.8.224 Port 8080

---

<div class="post-metadata">

**Author:** ![herbert24](https://talk.openmrs.org/user_avatar/talk.openmrs.org/herbert24/32/8178_2.png) [@herbert24](https://talk.openmrs.org/u/herbert24)\
**Post date:** [March 15, 2022, 2:31pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/8 "2022-03-15T14:31:14Z")

</div>

when i go here [http://174.138.8.224:8080/](http://174.138.8.224:8080/) i access your server,well it looks like there is an issue with the openmrs installation

---

<div class="post-metadata">

**Author:** ![herbert24](https://talk.openmrs.org/user_avatar/talk.openmrs.org/herbert24/32/8178_2.png) [@herbert24](https://talk.openmrs.org/u/herbert24)\
**Post date:** [March 15, 2022, 2:32pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/9 "2022-03-15T14:32:00Z")

</div>

are you able to access the full server logs

---

<div class="post-metadata">

**Author:** ![afvwyk8109](https://talk.openmrs.org/letter_avatar/afvwyk8109/32/5_5575768a8748004e209b776fc1b2916d.png) [@afvwyk8109](https://talk.openmrs.org/u/afvwyk8109)\
**Post date:** [March 15, 2022, 3:45pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/10 "2022-03-15T15:45:42Z")

</div>

How do I pull the server logs on ubuntu

---

<div class="post-metadata">

**Author:** ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)\
**Post date:** [March 15, 2022, 4:09pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/11 "2022-03-15T16:09:52Z")

</div>

> [@afvwyk8109](#):
>
> followed the instructions to install OpenMRS on the server

Which instructions have you followed? You shouldn’t need to add port 8080 to Apache. OpenMRS is served through a servlet container such as Tomcat. You could use Apache as a reverse proxy for the Tomcat container, e.g., using instructions like those [here](https://cwiki.apache.org/confluence/display/HTTPD/TomcatReverseProxy), e.g.,

```auto
# mod_proxy setup.
ProxyRequests Off
ProxyPass /openmrs http://localhost:8080
ProxyPassReverse /openmrs http://localhost:8080

<Location "/openmrs">
  # Configurations specific to this location. Add what you need.
  # For instance, you can add mod_proxy_html directives to fix
  # links in the HTML code. See link at end of this page about using
  # mod_proxy_html.

  # Allow access to this proxied URL location for everyone.
  Order allow,deny
  Allow from all
</Location>

```

But that assumes that OpenMRS is installed an running on port 8080, which doesn’t seem to be the case for you.

---

<div class="post-metadata">

**Author:** ![afvwyk8109](https://talk.openmrs.org/letter_avatar/afvwyk8109/32/5_5575768a8748004e209b776fc1b2916d.png) [@afvwyk8109](https://talk.openmrs.org/u/afvwyk8109)\
**Post date:** [March 16, 2022, 9:07am UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/12 "2022-03-16T09:07:14Z")

</div>

Thank you, but it is very strange. I follow the instructions as it is given and it just does not connect. Which installation instructions should I follow if I want to install it on a cloud server like digital ocean. In other words, which virtual machine do I setup, etc.? Cause somewhere I must be doing something wrong. I prefer the docker container. I started over and just started the docker container with the following command on a new system: docker run -d --name openmrs -p 80:8080 openmrs/openmrs-reference-application-distro

ip address: [http://167.99.43.224:8080/openmrs](http://167.99.43.224:8080/openmrs)

Still no refusing to connect. If I ping the ip address it works.

---

<div class="post-metadata">

**Author:** ![afvwyk8109](https://talk.openmrs.org/letter_avatar/afvwyk8109/32/5_5575768a8748004e209b776fc1b2916d.png) [@afvwyk8109](https://talk.openmrs.org/u/afvwyk8109)\
**Post date:** [March 16, 2022, 9:35am UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/13 "2022-03-16T09:35:20Z")

</div>

root@docker-openmrs:~# docker pull mysql Using default tag: latest latest: Pulling from library/mysql 15115158dd02: Pull complete d733f6778b18: Pull complete 1cc7a6c74a04: Pull complete c4364028a805: Pull complete 82887163f0f6: Pull complete 28abcb7f57e0: Pull complete 46d27a431703: Pull complete 8e745fe86aaf: Pull complete ab75add93486: Pull complete 09e3960383f3: Pull complete 59f780965951: Pull complete 8ead2303095c: Pull complete Digest: sha256:b17a66b49277a68066559416cf44a185cfee538d0e16b5624781019bc716c122 Status: Downloaded newer image for mysql:latest [docker.io/library/mysql:latest](http://docker.io/library/mysql:latest) root@docker-openmrs:~# docker rm -f openmrs openmrs root@docker-openmrs:~# docker run -d --name openmrs -p 80:8080 openmrs/openmrs-reference-application-distro 45de4e9bb556d9a1a9dde5d88285c8d27a4a9933cc388dce716d39663a8b3ed6 root@docker-openmrs:~# docker logs openmrs

- DB\_CREATE\_TABLES=false
- DB\_AUTO\_UPDATE=false
- MODULE\_WEB\_ADMIN=true
- DEBUG=false
- cat /usr/local/tomcat/startup.sh: line 8: DB\_HOST: unbound variable root@docker-openmrs:~#

---

<div class="post-metadata">

**Author:** ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)\
**Post date:** [March 16, 2022, 12:53pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/14 "2022-03-16T12:53:50Z")

</div>

So a few notes here:

1. You also need to start the MYSQL Docker image.
2. In your command to start the openmrs-reference-application-distro, you specify `-p 80:8080` that says “bind the server port 80 to port 8080 from the container”. Since you’re apparently already running Apache which is likely using port 80, that’s unlikely to work.
3. For a better method of installing this via Docker, please see Option 3 on [this Wiki page](https://wiki.openmrs.org/display/docs/Installing+OpenMRS+on+Docker).

---

<div class="post-metadata">

**Author:** ![afvwyk8109](https://talk.openmrs.org/letter_avatar/afvwyk8109/32/5_5575768a8748004e209b776fc1b2916d.png) [@afvwyk8109](https://talk.openmrs.org/u/afvwyk8109)\
**Post date:** [March 16, 2022, 2:49pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/15 "2022-03-16T14:49:43Z")

</div>

Hello, I eventually managed with the SDK. And used Docker for the database. Now it seems to be working. Thank you

---

<div class="post-metadata">

**Author:** ![afvwyk8109](https://talk.openmrs.org/letter_avatar/afvwyk8109/32/5_5575768a8748004e209b776fc1b2916d.png) [@afvwyk8109](https://talk.openmrs.org/u/afvwyk8109)\
**Post date:** [March 16, 2022, 3:47pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/16 "2022-03-16T15:47:22Z")

</div>

Now I have a new problem. Tomcat fails to run. Why would this be?

```auto
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:57 min
[INFO] Finished at: 2022-03-16T15:45:36Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:4.4.0:run (default-cli) on project standalone-pom: Failed running Tomcat -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:4.4.0:run (default-cli) on project standalone-pom: Failed running Tomcat
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed running Tomcat
    at org.openmrs.maven.plugins.Run.runInFork (Run.java:230)
    at org.openmrs.maven.plugins.Run.executeTask (Run.java:112)
    at org.openmrs.maven.plugins.AbstractTask.execute (AbstractTask.java:201)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
root@openmrs2:~#

```

---

<div class="post-metadata">

**Author:** ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)\
**Post date:** [March 16, 2022, 5:12pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/17 "2022-03-16T17:12:52Z")

</div>

Could you try running the command with the `-X` flag to get the actual error?

---

<div class="post-metadata">

**Author:** ![afvwyk8109](https://talk.openmrs.org/letter_avatar/afvwyk8109/32/5_5575768a8748004e209b776fc1b2916d.png) [@afvwyk8109](https://talk.openmrs.org/u/afvwyk8109)\
**Post date:** [March 16, 2022, 5:40pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/18 "2022-03-16T17:40:23Z")

</div>

> [@afvwyk8109](#):
>
> `Caused by: org.apache.maven.plugin.MojoExecutionException: Failed running Tomcat`

This was the error code flagged

Only thing I can gather is maybe the virtual machine does not have enough memory. How much is advised? This one has 2gb

---

<div class="post-metadata">

**Author:** ![afvwyk8109](https://talk.openmrs.org/letter_avatar/afvwyk8109/32/5_5575768a8748004e209b776fc1b2916d.png) [@afvwyk8109](https://talk.openmrs.org/u/afvwyk8109)\
**Post date:** [March 16, 2022, 6:52pm UTC](https://talk.openmrs.org/t/cannot-connect-to-digital-ocean-web-server/36143/19 "2022-03-16T18:52:51Z")

</div>

changed it to 4gb and now it is working.

Is it possible to run it as a service so that it does not stop when I exit the terminal?
