Atmosphere failure with "Failure of Web Server bridge" - apache

Atmosphere requests to /push started getting the following response after some time(1min):
Session time out
<HTML>
<HEAD>
<TITLE>Weblogic Bridge Message</TITLE>
</HEAD>
<BODY>
<H2>Failure of Web Server bridge:</H2>
<P>
<hr>
<PRE>Internal Server Failure. Cannot Continue.</PRE>
<hr>
</BODY>
</HTML>
We are using:
atmosphere version=2.2.1
atmosphere client javascript version=2.2.6
atmosphere runtime version=2.2.4
weblogic version=12.1.1
Apache server

Fixed. Was caused by timeout not properly configured for atmosphere

Related

How do I run a cgi script on an apache web server

I'm not sure if this the correct place to be asking this question. But I am having trouble getting my cgi scripts to run on my XAMPP Server (using windows 8 and apache) here is my cgi script:
#!usr/bin/perl
use warnings;
use diagnostics;
use strict;
my $time = localtime;
my $remote_id = $ENV{REMOTE_HOST} || $ENV{REMOTE_ADDR};
my $admin_email = $ENV{SERVER_ADMIN};
print <<END_OF_PAGE;
<HTML>
<HEAD>
<TITLE>Welcome to Mike's Mechanics Database</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<IMG SRC="/images/mike.jpg" ALT="Mike's Mechanics">
<P>Welcome from $remote_host! What will you find here? You'll find a list of mechanics
from around the country and the type of service to expect -- based on user input and
suggestions.</P>
<P>What are you waiting for? Click here
to continue.</P> <HR> <P>The current time on this server is: $time.</P>
<P>If you find any problems with this site or have any suggestions,
please email $admin_email.</P>
</BODY>
</HTML>
END_OF_PAGE
and here is the full error I am getting:
**Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
couldn't create child process: 720002: welcome.cgi
If you think this is a server error, please contact the webmaster.
Error 500
localhost
Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
finally, here is the entries in the apache error log, corresponding to the problem
[Mon Aug 21 20:46:19.403512 2017] [cgi:error] [pid 1436:tid 1724] (OS 2)The system cannot find the file specified. : [client ::1:61381] couldn't create child process: 720002: welcome.cgi, referer: http://localhost/Perl/
[Mon Aug 21 20:46:19.404515 2017] [cgi:error] [pid 1436:tid 1724] (OS 2)The system cannot find the file specified. : [client ::1:61381] AH01223: couldn't spawn child process: C:/xampp/htdocs/Perl/welcome.cgi, referer: http://localhost/Perl/
I see two problems.
Your CGI script isn't actually CGI compliant -- it needs to output headers before the document body. Consider using the CGI module to handle some of this for you.
You're missing a leading slash in the shebang. It should be #!/usr/bin/perl. (And make sure that Perl is actually installed at that path.)
Please don't learn CGI programming in 2017. Take a look at CGI::Alternatives for a gentle introduction to some modern ways to write web programs in Perl.
Having said that, the solutions to your immediate problem are to:
Fix the shebang line in your code
Output the CGI header before your HTML.
I'm using the CGI module to produce the header. I've also updated your HTML to look like something that was written in the last ten years (lower-case tags, using CSS rather than presentation attributes, HTML5 doctype, indentation).
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics; # Remove before putting into production
use CGI 'header';
my $time = localtime;
my $remote_id = $ENV{REMOTE_HOST} || $ENV{REMOTE_ADDR};
my $admin_email = $ENV{SERVER_ADMIN};
print header;
print <<END_OF_PAGE;
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
body {
background-color: #ffffff;
}
</style>
<title>Welcome to Mike's Mechanics Database</title>
</head>
<body>
<img src="/images/mike.jpg" ALT="Mike's Mechanics">
<p>Welcome from $remote_host! What will you find here? You'll
find a list of mechanics from around the country and the type
of service to expect -- based on user input and suggestions.</p>
<p>What are you waiting for?
Click here to continue.</p>
<hr>
<p>The current time on this server is: $time.</p>
<p>If you find any problems with this site or have any
suggestions, please email
$admin_email.</p>
</body>
</html>
END_OF_PAGE

PHP/Apache TCP/IP sockets on AWS EC2 instances behind Application load balancer

I have deployed my PHP project on multi instance AWS setup. These instances are behind the Amazon's Application load balancer.
I have successfully setup security groups and allowed port e.g, 7000
Problem
This properly established connection with my server but when I try to write on this port I get 400 bad request response from load balancer.
Here is the response I am getting
HTTP/1.1 400 Bad Request
Server: awselb/2.0
Date: Mon, 05 Jun 2017 08:48:19 GMT
Content-Type: text/html
Content-Length: 138
Connection: close
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
</body>
</html>
But when I try to establish connection directly with an instance with its public IP it works.
I feel I am missing something at load balancer end.
Please guide.

Lets Encrypt does not sign my domains

I'm running plesk 17 on a debian machine. One certificate could be signed without problems. But then I got this error:
Error: Let's Encrypt SSL certificate installation failed: Failed letsencrypt execution: Saving debug log to /opt/psa/var/modules/letsencrypt/logs/letsencrypt.log
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for mindmailer.de
http-01 challenge for www.mindmailer.de
Starting new HTTPS connection (1): 127.0.0.1
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. mindmailer.de (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://mindmailer.de/.well-known/acme-challenge/Zg70UTECV4lP-E25ateUev3vsq5nCbX-4L-KUXwUU4I: "<!DOCTYPE html>
<html lang="de" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<!--
This website is powe", www.mindmailer.de (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.mindmailer.de/.well-known/acme-challenge/rreVCbEY8pX5eaWVMGiZsg2UxNennZfwkHC6WMAJV-Q: "<!DOCTYPE html>
<html lang="de" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<!--
This website is powe"
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: mindmailer.de
Type: unauthorized
Detail: Invalid response from
http://mindmailer.de/.well-known/acme-challenge/Zg70UTECV4lP-E25ateUev3vsq5nCbX-4L-KUXwUU4I:
"<!DOCTYPE html>
<html lang="de" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<!--
This website is powe"
Domain: www.mindmailer.de
Type: unauthorized
Detail: Invalid response from
http://www.mindmailer.de/.well-known/acme-challenge/rreVCbEY8pX5eaWVMGiZsg2UxNennZfwkHC6WMAJV-Q:
"<!DOCTYPE html>
<html lang="de" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<!--
This website is powe"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address.
What could be the problem in this case?
DNS A records are on the right ip adress .. Any ideas?
Thanks
You have redirects, which conflicts with the Let's Encrypt - challenge ( => "marketing.mindmailer.de" ) and as you can see in your error - log, Let's Encrypt tries to write to "mindmailer.de/.well-known/acme-challenge/", which is not possible this way.

The proxy server received an invalid response from an upstream server in odoo

While generating the Reports under payroll module in local odoo server - I am getting the following error:
Odoo
XmlHttpRequestError Proxy Error
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em>POST /web/dataset/call_button</em>.<p>
Reason: <strong>Error reading from remote server</strong></p></p>
<hr>
<address>Apache/2.4.7 (Ubuntu) Server at 192.168.111.188 Port 80</address>
</body></html>
I have the same problem when i try to create a new db
odoo 8.0.17 / bitnami stack
> XmlHttpRequestError Proxy Error <!DOCTYPE HTML PUBLIC "-//IETF//DTD
> HTML 2.0//EN"> <html><head> <title>502 Proxy Error</title>
> </head><body> <h1>Proxy Error</h1> <p>The proxy server received an
> invalid response from an upstream server.<br /> The proxy server could
> not handle the request <em><a
> href="/web/database/create">POST /web/database/create</a></em>.<p>
> Reason: <strong>Error reading from remote server</strong></p></p>
> </body></html>
Try these steps to solve the XmlHttpRequestError Proxy Error:
It is something related to browser end only so use Private Window
Clear Browser cookie because sometimes cookies are corrupted
Some times page actually loading but request time out
It Works For Me try this, you have to update your action module code(for example - model:employee.fine) with empty print statement or something else, now try that action again it works!

Do we need any additional setup for REST API Administration Services in MobileFirst?

We have logger adapter "WLClientLogReceiver". When we tried to hit the REST service using below link to get adapter details we got 404 error
https://example.com/worklightadmin/management-apis/1.0/runtimes/myruntimename/adapters/WLClientLogReceiver
Respnse:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /worklightadmin/management-apis/1.0/runtimes/myruntimename/adapters/WLClientLogReceiver was not found on this server.</p>
<hr>
<address>IBM_HTTP_Server at example.com Port 443</address>
</body></html>
The 404 seems to suggest the URL is wrong. If the URL were indeed proper , then a message such as - " The adapter \"WLClientLogReceiver\" of the runtime \"yourruntime\" does not exist in the MobileFirst administration database" is returned, in case you query for a missing adapter.
To test:
a)
The URL - "https://example.com/worklightadmin/management-apis/1.0/runtimes/myruntimename/adapters?" returns metadata of all deployed adapters.
Check if you get the list of all adapters and see if WLClientLogReceiver is in the list.
b) If that also gives you a 404 :
If you are deployed on a standalone server, your admin context might be different - for standalone servers ,it is by default "wladmin" as opposed to "worklightadmin" in the Development server. Verify your context root.