Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Mar 15, 2012 5:00 pm 
Offline
Senior Member

Joined: Wed Dec 01, 2010 10:39 am
Posts: 71
Website: http://www.pannix.net
Location: Belgium
Just did an apt-get update and upgrade on my ubuntu LEMP:

First got messages that it wanted to overwrite default and nginx.conf files, which I refused. Which resulted in

Code:
2012/03/15 20:36:05 [emerg] 19842#0: unknown "https" variable


Got this error previous time as well. Then I had to add the following to the nginx.conf:

Code:
map $scheme $server_https {
    default off;
    https on;
}

After which my server run happily ever after, until now.
This time I had to comment the https variable in the fastcig_params file to get past this. But now my nginx refuses to restart because of this:

Code:
2012/03/15 21:09:58 [emerg] 9599#0: bind() to [::]:80 failed (98: Address already in use)
2012/03/15 21:09:58 [emerg] 9599#0: bind() to [::]:80 failed (98: Address already in use)
2012/03/15 21:09:58 [emerg] 9599#0: bind() to [::]:80 failed (98: Address already in use)
2012/03/15 21:09:58 [emerg] 9599#0: bind() to [::]:80 failed (98: Address already in use)
2012/03/15 21:09:58 [emerg] 9599#0: bind() to [::]:80 failed (98: Address already in use)
2012/03/15 21:09:58 [emerg] 9599#0: still could not bind()


I don't have apache running. There are no nginx processes running. This is really annoying, second time that nginx breaks during upgrade.

The command netstat -ltnp returned following output:

Code:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      2181/mysqld     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2053/sshd       
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      2458/master     
tcp6       0      0 :::4949                 :::*                    LISTEN      2186/munin-node
tcp6       0      0 :::22                   :::*                    LISTEN      2053/sshd     


What is going on?


Top
   
 Post subject:
PostPosted: Thu Mar 15, 2012 5:10 pm 
Offline
Senior Member

Joined: Wed Dec 01, 2010 10:39 am
Posts: 71
Website: http://www.pannix.net
Location: Belgium
In a final act of despair I removed all sites (sudo rm *) form the sites-enabled directory.
Then I made a link to my previous default vhost config. Problem persists.
Then I made a link to the new default vhost config (came with the upgrade). IT WORKZ!!!
Difference: in the new config file the line to listen for ipv6 on port 80 is commented out

Code:
#listen   [::]:80 default ipv6only=on; ## listen for ipv6


My server is ipv6 enabled, so is nginx, it worked before, now it doesn't. Anyway, I am bringing my sites online again by adding a # before the listen [::]:80 line in the vhost config files.. Very :D man. Problem solved, at least workaround. No clue as to why problem occurred, and how to make my sites ipv6 ready.


Top
   
PostPosted: Sun Oct 14, 2012 8:41 am 
Offline

Joined: Sun Oct 14, 2012 8:38 am
Posts: 1
All the gory details are listed in http://wiki.nginx.org/HttpCoreModule#listen

I didn't really read through all of it, but having this line for only one vhost:

Code:
listen [::]:80 ipv6only=on default;


and only this for the other vhosts:

Code:
listen [::]:80;


seems to solve the problem.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group