Problem with installing WebApp on Webserver

Hello,

I am new in programming with Xojo and I am originally from VB.NET.

I would like to install my first little WebApp on my web server. After I was able to solve a number of problems with my hoster I stand before following problem and hope you can help:

I have downloaded the files via FTP (ASCII) on my web server. When calling, the app is basically assumed but then it breaks off and the following error message appears:

[quote]Gateway Time-out
The gateway did not receive a timely response from the upstream server or application.
Apache Server at www.c-doit.de Port 80[/quote]

My hoster says the following about this:

[quote]The script is terminated after a timeout.
The log appears to the error:
“Script timed out before returning headers: collectboard.cgi”[/quote]

So the script just breaks down - what can I do? The WebApp itself is not rocket science, some button labels and rectangles, barely code.

Here is the path to the WebApp: http://www.c-doit.de/cgi-bin/collectboard/collectboard.cgi

I hope you can help me fast!

Christian already made a good howto Document for Jiffybox Servers ,but it should also work on another Ubuntu Linux Webservers:

http://www.monkeybreadsoftware.de/realbasic/webapps-jiffybox.shtml

Hi Tomas,

thanks for the fast reply. The described steps I have already done. The permissions are correct, also the htaccess and the CGI executes on call.

The App is also launching, but it stops on Time out. Surely it’s a problem of the server but I have really no idea where I have to search.

I am not a server admin guy, but after looking into some google search results I would check your DNS or Reverse DNS settings. Thats what I’ve tried:

I’ve pinged your Host getting 109.237.140.24 as IP Adress. But when I try to open http://109.237.140.24/cgi-bin/collectboard/collectboard.cgi I get a Redirection to your Servers’ Admin Console…

I assume you could have an DNS or IP misconfiguration.

No, I don’t think so. It’s normal that the IP of the Server do link to the adminpanel and not to one of the hostet webpages.

The app, library and resources files should be transferred in binary mode.

Hey Jay,

thanks for the reply.

I uploaded the files again - same problem :frowning:

What were the problems? Is this a private VPS or shared hosting?

It sounds like this is a Linux based server, correct? 32 or 64 bit? Did you compile the wep app as a Linux app (versus an OS X app)?

Did you upload the hidden .htaccess file, and is Apache configured to honor the .htaccess file? Alternatively, is Apache configured to allow cgi execution in the subfolder?

Hi!

It’s definetely NOT the WebServer!

I have set up a absolutly new Webserver (Apache2) with all cgi permissions and other. Now I have the case, that the page is loading, and loading, and loading…

I do not allow to abort after time out, so the page is loading untill it’s ready.

Here is the Link to the new server:
http://j63774.servers.jiffybox.net/collectboard.cgi

so it’s in the WebApp?
[i]
this is the whole code I’ve got in the App in the resize-event:
[/i]

[quote]
if self.Width < 922 then
cblabel.Text = “CB”
m1.left = 49
m2.left = 119
m3.left = 213
m4.left = 296
m5.left = 380
m6.left = 445
CBLabel.left = 10
else
cblabel.Text = “COLLECTBOARD”
m1.left = 189
m2.left = 259
m3.left = 353
m4.left = 436
m5.left = 520
m6.left = 585
CBLabel.left = 20
end if

if self.Width < 782 then
SearchField1.Visible=False
else
SearchField1.Visible = True
end if[/quote]

With all due respect, if you’ve never successfully deployed a Xojo web app, how do you know it’s not the server? Just because the server can successfully host a normal web page, or even a non-Xojo web app, it doesn’t necessarily mean that it can host a Xojo app. Now, you may be correct that it’s not the server, but without a lot more details (like what I asked for), we can’t just take your word. Successfully deploying a Xojo web app can be very complicated. That’s one of the driving reasons that Xojo is rolling out their own hosting service - they know that deploying web apps is complicated and that many developers will struggle with it. I struggled for a couple of weeks before getting my first one working.

To isolate the problem, try creating a new web project that has nothing but a weblabel on a page. That is guaranteed to work on any properly configured server with a proper deployment. If that doesn’t work, then we know the problem is either the configuration of the server components, or the deployment method. Then we can work from there.

Yes Jay, you are right. I am a newby. I thought if I follow all the instructions I get (from xojo and from here, it is going to work.

I also thought, that it’s not so tricky as it is.

So here some answers, I hope you’ll help me.

I’ve got both. One shared at c-doit.de and a private server (also at a hosting-service, but I can do all basic things by my self).

First error was due on missing permissions (755). Second was, that I compiled the with a wrong port (right is 80, first I had 8080).
An the third Error is the time-out, where I am hanging yet.

Yop, Ubuntu 10.04 with an Apache 2 on 32 bit.

Yop!

Yes to all. there is one .htaccess file in the directory. Apache should be configured to honor (on other pages it works correctly).

I asked my hoster, an he say “yes”. On my “own” server I changed the cgi permissions manually.

I don’t think that port 80 is the one you should use. It’s used by apache.
Set the port to something higher and try again. The port is used for communication between the CGI script and your app if I’m not mistaken so if your app uses port 80 it will crash right into apache.

Hi Albin,
my hoster say:

Is this true? Which Port do you user?

Edit:
I asked my hoster, how other Ports are available: only port 443 for SSL. Other ports, the Webserver do not listen.

[quote=36327:@Lars Lehmann]Hi Albin,
my hoster say:
Is this true? Which Port do you user?

Edit:
I asked my hoster, how other Ports are available: only port 443 for SSL. Other ports, the Webserver do not listen.[/quote]
That true, Apache should run on port 80 but your web app should not. The port used by your web app does not need to be open in the firewall as it’s only used for local communication on the server itself between the cgi script(run by apache) and the app. If your FW complains that would be strange.

To access your app you would still go to http://j63774.servers.jiffybox.net/collectboard.cgi as Apache runs on port 80.

Pick a port for your web app that’s not used by anything else on the server.
For example, I use 6920 for one of my CGI apps.

I believe the web app port is not used by app. built for CGI, only for stand-alone builds.
Not sure if you mentioned if you have set this earlier, but deployment type under build settings should be CGI.

It is used in CGI builds.

Did you set the application identifier?
It can be anything but a common way is a reverse dns. (com.examle.appname)

OK: I stand corrected. … I had read the bit of docs that says…

“Because a CGI deployment uses your existing web server software, you do not have to specify a port when accessing your web application.”

I’ve looked at the .cgi script now and I see it is using the port for communicating between the cgi based web.app and the web server.

Yea that might need some improvement :wink:
“specify a port when accessing” means that in a CGI build you don’t need to specify the port in the url like example.com:8080 like you would in a stand alone build :slight_smile:

now, I am totaly confused!

I tried the Port 8080 and 9000 - followinf error occures:
[quote]Unable to launch application ‘CollectBoard’ on port 9000[/quote]

On port 80 it seems, that App is launching, but do not any datas to the browser.

hier the link again. LINK