How to deploy a web app on Digital Ocean ubuntu server

Hi Paul,

Great to hear this and thank you for the info.
I am developing in Mac OS and I compile CGIs same like you. 64 bit Linux. I use FileZilla to transfer the files and change the permissions.

Take care.

Yes, I have an account there as well.
Let us know if you need more help.
As you can see, several of us are trying to help. Don’t lose hope, we’ll get you to a solution.

I just signed up for his service, and will be loading my SaaS application there over the next couple of weeks.

[quote=405133:@NIKOS ZACHARAKIS]Hi Dirk,

I just purchased a service (Linux) from ServerWarp in order to try out my luck there. Is it the norm that the service initially gets a status of “Pending”? Furthermore, I tried to find out more documentation on how to use Serverwarp services and how to manage my uploads etc., but I have not found anything yet. Even the knowledgeable/FAQs has a 0(zero) number! Do you have any experience in using this service? I have already opened a ticket with them and I am on stand-by.

Thank you.[/quote]

Hi Nikos,

Thanks for your order.

Our staff is in South Carolina and impacted by the hurricane coming in. Your server was auto-deployed (all orders are) but we do manual tests to verify Xojo applications run smoothly and everything is operating correctly. I will make sure you get sent your server details today.

Be safe.

Hi Paul, Dirk, Robert and Phillip,

Thank you all for your valuable efforts and feedback. Sure thing Dirk, I will not lose hope, thanks to your willingness to help me :slight_smile: I will wait for any updated info and proceed accordingly. Take care all of you and thank you once more.

Nikos

Hi to all again,

I purchased yesterday a XOJO Cloud account and I deployed my web app. Finally, I can see some light!!! Using my XOJO cloud web server IP address, I can see my web app in any browser. Now my new issue is that I cannot seem to connect to MySQL using SSH. I received MySQL, SSH and Tunnel credentials from the XOJO Cloud account. I have transferred my MySQL database under the folder “/Shared_Documents” using FileZilla. What is the right process to connect it to XOJO MySQL in order for my web app to run the db connection that I have developed?

Thank you.
Nikos

MySQL is not a file-based database. You’d need to import your DB into the server on Xojo Cloud. You can connect to MySQL on Xojo Cloud using the tunnel and your favorite MySQL client of choice.

Instructions are here:

http://developer.xojo.com/xojo-cloud-control-panel$postgresql-and-mysql-usage

Hi Paul,

Thank you for your reply.
I have already tried a number of times to use SSH Tunnel with Mac OS Terminal and after I enter the command
ssh -L 3306:localhost:3306 dbadmin@178.128.226.123 -N
I get the below error msg:

bind: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 3306
Could not request local forwarding.

I also tried to connect with MySQL Workbench again using Mysql and SSH connection and I get another error msg:

Failed to Connect to MySQL at localhost:3306 through SSH tunnel at dbadmin@178.128.226.123 with user dbadmin
Can’t connect to MySQL server on ‘127.0.0.1’

The reason why I placed mysql database under “/Shared_Documents” was in case XOJO Cloud MySQL server can locate it better when I can manage to Terminal SSH.

[quote=405918:@NIKOS ZACHARAKIS]bind: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 3306
Could not request local forwarding.[/quote]
This error means that you already have an app using port 3306 locally.

Hi Greg,

I have managed to free my 3306 port, because, as you correctly mentioned, it was used by my local MySQL service.
Now I am using port 3307, so port 3306 is available.
However when I execute the “ssh…” command the terminal just stays idle! I also cannot connect with MySQL Workbench.

Thank you.

Hi Nikos - It sounds like you need instructions on how to connect with MySQL Workbench. I will send those to you.

Hi Jason,

The info I enter in MySQL Workbench is:

SSH Hostname: 178.128.226.123
SSH Username: dbadmin
some SSH password (given by XOJO Cloud)
MySQL Hostname: localhost
MySQL Server Port: 3306
Username: dbadmin
some MySQL password (given by XOJO Cloud)

If you can tell me where my mistake is I will try it a.s.a.p.
Thank you for your reply Jason.

Take care.

[quote=406289:@NIKOS ZACHARAKIS]However when I execute the “ssh…” command the terminal just stays idle! I also cannot connect with MySQL Workbench.

[/quote]
A tunnel is just a pipeline between the two computers, that forwards a local connection securely to the remote computer.
It won’t do anything visible.

The -L option is local_port:remote_address:remote_port
So this command:

ssh -L 3306:localhost:3306 dbadmin@178.128.226.123 -N

creates a tunnel to ‘localhost’, looping back to yourself.

Try this one:

ssh -L 3306:178.128.226.123:3306 dbadmin@178.128.226.123 -N

Then your workbench connection should work.

Hi John,

WOW!!! My Workbench finally works.
Thank you very much for the enlightening info.

I would like to thank all of you guys for the informative replies and your time spent to help me.
Take care to you all.

Nikos

Today I tested digital ocean ubuntu server and a simple Xojo web app. This is what I did:

After I tested that cgi-bin “Hello World” sample was working, I created a simple Xojo web app, build it as cgi, uploaded to /usr/lib/cgi-bin and it didn’t work. I got a message saying: “Cannot write to config at path /usr/lib/cgi-bin/config.cfg. Permission denied”, so I had to change the owner of the file from root to www-data with:

sudo chown www-data config.cfg

It looks like after the first run it changed:

PORT=0

to

PORT=37688

I guess I may need to change the owner:group for that file and others and still several things to configure.

I will say that is better to stick with Xojo Cloud or other provider with support, specially for those without Linux server experience.

Hi Alberto,

Thank you for your post. I will try it out this week and let you know.

I am having a slight problem, after I managed to connect and deploy my web apps.
Today when I try to debug my modifications I get the following connection error:

Error connecting: Host ‘178.128.226.123’ is not allowed to connect to this MariaDB server

I checked MySQL port and it is 3306. Also I executed John’s suggestion
ssh -L 3306:178.128.226.123:3306 dbadmin@178.128.226.123 -N
and it works fine. I also connect through WorkBench!

Any ideas why I cannot connect anymore?

Thank you

[quote=408884:@NIKOS ZACHARAKIS]
Any ideas why I cannot connect anymore?

Thank you[/quote]

Server’s firewall or MySQL does not accept external connections.

It may be that you have to setup remote access. My provider has a ’ cpanel’ item called Remote Mysql, it allows me to provide an IP address or range of addresses that can access my databases. Any connections from these addresses are then allowed. You may have something similar.

Nikos, if you are talking about Digital Ocean, I can tell you that the default configuration will not let you connect externally to the database server.

I don’t normally use Digital Ocean, just did this to learn. Maybe, in one of the linked documents, there is a way to change that, but my guess: this is done to have a more secure server.