Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th February 2011, 12:57
RoboBunny RoboBunny is offline
Junior Member
 
Join Date: Feb 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Exclamation Ubuntu 10.10 SpamSnake .. 502 Bad Gateway

Hi

I followed Rocky's
http://www.howtoforge.com/the-perfec...ick-meerkat-p3

Now when I try to go to the webpage i get 502 Bad Gateway.

http://192.168.1.252:8080/accounts/login/?next=/

Not displaying BARUWA website I did check....
http://www.howtoforge.com/forums/showthread.php?t=50330
it did not help..

tail -f /var/log/nginx/error.log
**
2011/02/04 13:34:21 [error] 25272#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 192.168.1.252, server: mail.mysite.co.za, request: "GET /accounts/login/?next=/ HTTP/1.1", upstream: "uwsgi://unix:///var/run/uwsgi/uwsgi-python2.6/baruwa/baruwa.sock:", host: "mail.mysite.co.za:8080"

2011/02/04 13:46:26 [error] 25272#0: *4 upstream prematurely closed connection while reading response header from upstream, client: 192.168.1.252, server: mail.mysite.co.za, request: "GET /accounts/login/?next=/ HTTP/1.1", upstream: "uwsgi://unix:///var/run/uwsgi/uwsgi-python2.6/baruwa/baruwa.sock:", host: "192.168.1.252:8080"

2011/02/04 13:46:26 [error] 25272#0: *4 open() "/usr/share/pyshared/baruwa/favicon.ico" failed (2: No such file or directory), client: 192.168.1.252, server: mail.mysite.co.za, request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.252:8080"

2011/02/04 13:46:29 [error] 25272#0: *4 open() "/usr/share/pyshared/baruwa/favicon.ico" failed (2: No such file or directory), client: 192.168.1.252, server: mail.mysite.co.za, request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.252:8080"

2011/02/04 13:49:24 [error] 25272#0: *7 upstream prematurely closed connection while reading response header from upstream, client: 192.168.1.252, server: mail.mysite.co.za, request: "GET /accounts/login/?next=/ HTTP/1.1", upstream: "uwsgi://unix:///var/run/uwsgi/uwsgi-python2.6/baruwa/baruwa.sock:", host: "192.168.1.252:8080"
**

tail -f /var/log/nginx/access.log

**
92.168.1.252 - - [04/Feb/2011:13:46:26 +0200] "GET / HTTP/1.1" 302 5 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"
192.168.1.252 - - [04/Feb/2011:13:46:26 +0200] "GET /accounts/login/?next=/ HTTP/1.1" 502 172 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"
192.168.1.252 - - [04/Feb/2011:13:46:26 +0200] "GET /favicon.ico HTTP/1.1" 404 142 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"
192.168.1.252 - - [04/Feb/2011:13:46:29 +0200] "GET /favicon.ico HTTP/1.1" 404 142 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"
192.168.1.252 - - [04/Feb/2011:13:49:24 +0200] "GET / HTTP/1.1" 302 5 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"
192.168.1.252 - - [04/Feb/2011:13:49:24 +0200] "GET /accounts/login/?next=/ HTTP/1.1" 502 172 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"
**

tail -f /var/log/nginx/localhost.access.log

**
::1 - - [04/Feb/2011:10:06:20 +0200] "GET / HTTP/1.1" 403 143 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"
::1 - - [04/Feb/2011:10:08:23 +0200] "GET / HTTP/1.1" 403 143 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"
::1 - - [04/Feb/2011:13:22:59 +0200] "GET /accounts/login/?next=/ HTTP/1.1" 404 143 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"
::1 - - [04/Feb/2011:13:34:08 +0200] "GET /accounts/login/?next=/ HTTP/1.1" 404 143 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"
::1 - - [04/Feb/2011:13:34:12 +0200] "GET / HTTP/1.1" 403 143 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"
**

I got the following that is why I'm running on port 8080:
root@mail:/usr/src# /etc/init.d/uwsgi-python2.6 restart && /etc/init.d/nginx restart
* Restarting WSGI server(s) uwsgi-python2.6 [ OK ]
Restarting nginx: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
nginx.

I did double check for same problem form other people but no luck.

Please if anyone can help I would greatly appreciate it

RoboBunny
Reply With Quote
Sponsored Links
  #2  
Old 4th February 2011, 16:09
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Do you by chance have any other web servers running?
__________________
Home of the SpamSnake
Reply With Quote
The Following User Says Thank You to Rocky For This Useful Post:
RoboBunny (8th February 2011)
  #3  
Old 8th February 2011, 22:40
RoboBunny RoboBunny is offline
Junior Member
 
Join Date: Feb 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Ubuntu 10.10 SpamSnake .. 502 Bad Gateway

Thanks for the reply Rocky.

I managed to get it working but its not exactly what I was looking for.
Can I ask you a favor? Would you mind doing a "How to" for the setup of a
Ubuntu 10.10 or CentOS 5.5 with virtual users etc....:

Apache + Postfix + Mysql + Postfix Admin + Dovecot + MailScanner + Mailwatch + Sqlgrey + SpamAssassin + Clamav + Squirrelmail
------> http://www.example42.com/puppet/toaster-mailscanner.php

Or just a "How to" for a MailScanner setup (Ubuntu 10.10 or CentOS 5.5)
Apache + Postfix + Mysql + Dovecot + MailScanner + Mailwatch + SpamAssassin + Clamav

I need to pull mail from a external pop/imap server (like google, local ISP or pop.mailserver.com) for local or virtual users, the mail should be able to route internally and if not found relay to a external smtp server (like google, local ISP or smtp.mailserver.com)... but i want to use mailscanner with mail watch or baruwa for scanning mails and i need apache for another site configured for apache virtual host.

Please Rockey
I know I'm asking alot and hope you will consider this task if and when you have time.

Thanks RoboBunny.
Reply With Quote
  #4  
Old 24th February 2011, 19:28
chewbacca chewbacca is offline
Junior Member
 
Join Date: Feb 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

i am encountering error above, but restarting the webserver doesn´t give me an error
Code:
tail -f /var/log/nginx/error.log
2011/02/24 19:14:30 [error] 17889#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 192.168.200.206, server: mail.example.de, request: "GET /accounts/login/?next=/ HTTP/1.1", upstream: "uwsgi://unix:///var/run/uwsgi/uwsgi-python2.6/baruwa/baruwa.sock:", host: "192.168.xxx.xxx"
2011/02/24 19:14:30 [error] 17889#0: *1 open() "/usr/share/pyshared/baruwa/favicon.ico" failed (2: No such file or directory), client: 192.168.200.206, server: mail.example.de, request: "GET /favicon.ico HTTP/1.1", host: "192.168.200.19"
2011/02/24 19:14:30 [error] 17889#0: *1 open() "/usr/share/pyshared/baruwa/favicon.ico" failed (2: No such file or directory), client: 192.168.200.206, server: mail.example.de, request: "GET /favicon.ico HTTP/1.1", host: "192.168.200.19"
2011/02/24 19:14:33 [error] 17889#0: *1 open() "/usr/share/pyshared/baruwa/favicon.ico" failed (2: No such file or directory), client: 192.168.200.206, server: mail.example.de, request: "GET /favicon.ico HTTP/1.1", host: "192.168.200.19"
2011/02/24 19:19:25 [error] 17889#0: *4 upstream prematurely closed connection while reading response header from upstream, client: 192.168.200.206, server: mail.example.de, request: "GET /accounts/login/?next=/ HTTP/1.1", upstream: "uwsgi://unix:///var/run/uwsgi/uwsgi-python2.6/baruwa/baruwa.sock:", host: "server"
2011/02/24 19:19:25 [error] 17889#0: *4 open() "/usr/share/pyshared/baruwa/favicon.ico" failed (2: No such file or directory), client: 192.168.200.206, server: mail.example.de, request: "GET /favicon.ico HTTP/1.1", host: "server"
2011/02/24 19:19:25 [error] 17889#0: *4 open() "/usr/share/pyshared/baruwa/favicon.ico" failed (2: No such file or directory), client: 192.168.200.206, server: mail.example.de, request: "GET /favicon.ico HTTP/1.1", host: "server"
2011/02/24 19:19:28 [error] 17889#0: *4 open() "/usr/share/pyshared/baruwa/favicon.ico" failed (2: No such file or directory), client: 192.168.200.206, server: mail.example.de, request: "GET /favicon.ico HTTP/1.1", host: "server"
2011/02/24 19:20:32 [error] 17889#0: *4 upstream prematurely closed connection while reading response header from upstream, client: 192.168.200.206, server: example.de, request: "GET /accounts/login/?next=/ HTTP/1.1", upstream: "uwsgi://unix:///var/run/uwsgi/uwsgi-python2.6/baruwa/baruwa.sock:", host: "server"
Code:
/etc/init.d/uwsgi-python2.6 restart && /etc/init.d/nginx restart
 * Restarting WSGI server(s) uwsgi-python2.6                                                                                                          [ OK ]
Restarting nginx: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
nginx.

Last edited by chewbacca; 24th February 2011 at 19:36.
Reply With Quote
  #5  
Old 24th February 2011, 23:10
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Hi,

Is this a fresh install or upgrade? Make sure /usr/share/pyshared/baruwa/settings.py contains the correct db login infomation.
__________________
Home of the SpamSnake
Reply With Quote
  #6  
Old 25th February 2011, 10:22
chewbacca chewbacca is offline
Junior Member
 
Join Date: Feb 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

trhis is a fresh install i tested the baruwa mysql password with

Code:
mysql -u baruwa -p
and it matched the pw in the settings.py
Reply With Quote
  #7  
Old 25th February 2011, 11:17
chewbacca chewbacca is offline
Junior Member
 
Join Date: Feb 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

i got it working after i dropped the baruwa database and recreated it.
Reply With Quote
  #8  
Old 25th February 2011, 13:13
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
 
Default

Great! Must have been a screwy db install.
__________________
Home of the SpamSnake
Reply With Quote
Reply

Bookmarks

Tags
502 bad gateway, nginx baruwa, ubuntu 10.10 spamsnake

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Intel 82815 Video Card & Ubuntu 8.10 harvey527 Kernel Questions 8 5th November 2010 14:51
Connection timed out on intermail outgoing mails gouravgarg Server Operation 6 5th March 2010 20:31
MailScanner trouble with DBD-MYSQL sergio.arnaldo Server Operation 11 26th August 2009 18:08
Unbale to login to Postfix from webmail wasimriz HOWTO-Related Questions 5 6th April 2009 13:49
SpamSnake SpamAssassin not working? getrav HOWTO-Related Questions 5 23rd June 2008 23:02


All times are GMT +2. The time now is 00:38.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.