/srv/irclogs.ubuntu.com/2016/04/02/#ubuntu-server.txt

Bluekingmorning00:17
FManTropyxshould I shut down httpd and mysqld before running dist-upgrade?06:55
=== ren0v0_ is now known as ren0v0
Bluekingtrying to fix router/ubuntu server  /etc/network/interfaces   auto eth0, iface eth0 inet static, address 109.247.165.99, gateway 109.247.160.1, dns-nameservers 92.220.228.70 109.247.114.4      second nic  eth1: auto eth1, iface eth0 inet static, address 10.25.0.1, netmask 255.255.255.008:37
Bluekingam I missing something ?08:37
Bluekingany wrong ?08:37
Bluekingset auto lo too08:37
TJ-Blueking: you're not setting a netmask on eth008:39
TJ-Blueking: but as I said last night, 99% of the time you should use DHCP on the WAN interface so the ISP can allocate the address, DNS, and gateway08:39
Bluekingforgot it  netmask 255.255.248.008:40
Bluekingfibermodem are set to bridgemode08:40
Bluekingpublic IP = static given by isp08:40
Bluekingthat I want to be on mine private router08:41
TJ-Blueking: right, you said. That doesn't make any difference to using DHCP to *get* that address though08:41
Bluekingnetwork failed that way too08:41
TJ-Blueking: did the PC get a DHCP lease ?08:41
Bluekingyes but at every lease renew  net dropped08:41
TJ-Blueking: if not, then you've something wrong with the bridge, is it transparent?08:41
Bluekingbridgemode on fibermodem ?08:42
TJ-So, your PC got the ISP's address and it could route to the Internet OK?08:42
Bluekinglaptop connected directly on fibermodem have none issues08:42
TJ-So, your PC got the ISP's address *via DHCP* and it could route to the Internet OK?08:43
Bluekingyes08:43
TJ-Blueking: and when you set the *same* address/netmask/gateway/dns statically it can't route?08:44
Bluekingu got it right08:44
TJ-Blueking: that tells you the ISP only opens the route when its DHCP server assigns a lease08:44
TJ-Blueking: so, instead of trying to statically define things, use DHCP and solve the lease renewal issue08:45
Bluekingok  what should I look into renewal issue ?08:45
TJ-Blueking: well, are you using NetworkManager to manage the connection?08:45
TJ-It makes more sense since it knows how to do everything, and it controls dhclient, dnsmasq, etc.08:46
TJ-All of those log quite verbosely into the syslog so you can generally diagnose issues too08:46
Bluekingnever used networkmanager08:46
BluekingI am using shorewall as firewall if that matters08:47
TJ-OK, so you're manually configuring it so dhclient, dnsmasq work independentally?08:47
Bluekingyes08:47
Bluekingdnsmasq I havn't looked at08:48
TJ-If the lease doesn't get renewed, the *first* thing to check is that the 'dhclient' processes (1 for IPv4, 1 for IPv6) continue running after the initial lease is obtained. If they've stopped then that would easily explain why the lease never gets renewed08:48
Bluekingchanged auto eth0, iface eth0 inet dhcp08:49
TJ-If you confirm both dhclient s are running and you see, in syslog, dhclient trying to renew a lease, you'll have some diagnostic information to work with08:49
Bluekingeth1 and lo remains unchanged08:49
TJ-which release of Ubuntu are you using?08:49
Bluekinghow it looks like when dhclient tries to renew in logs ?08:49
Blueking14.0408:50
BluekingLTS08:50
TJ-OK, quite an old version. Did you check whether both IPv4 *and* IPv6 leases expired?08:50
Bluekingipv6 given by isp are just local RD08:51
TJ-So you're not using prefix delegation and your own DHCP server issuing addresses08:53
Bluekingthat were greek language to me :P  (didn't understand)08:54
TJ-there are so many IPv6 addresses available the ISPs will usually delegate a complete /64 subnet to each customer account, so you can then delegate that on your local network08:55
Bluekingwill disconnect to test new setting in interfaces08:55
Bluekingit's /64 yes08:55
Bluekingbut not true ipv6 tho08:56
Bluekingstarts with fe8008:57
Bluekingand I see on windows that it got none ipv6 gateway or dns08:57
TJ-well, if you're operating your own gateway it would need an DHCPv6 client on the public interface to request that info from the ISPs DHCPv6 server. Then it would share that with its LAN-side DHCPv6 server08:59
BluekingTJ- dhcp-server on isp side comes up on windows net connection... that we don't need to put on ubuntu I'll guess08:59
Bluekinggateway on isp09:00
BluekingIP of router = 109.247.165.99   gateway  109.247.160.109:00
Bluekingbrb  check if net is back with dhcp09:01
BluekingTJ-  ok back  did ifdown eth0 && ifup eth0  and got an message    'suspect value in host_name option - discarded09:05
Bluekingon through ubuntu router now09:06
Bluekinglease time 4287 seconds09:06
Bluekingrenewal in 4287 seconds I mean09:06
TJ-Blueking: ok, check if the dhclient is continuing to run: "ps -efly | grep dhclient" and check its command-line arguments to see where its config and lease files are09:09
Bluekingok /var/lib/dhcp/dhclient.eth0/leases eth009:11
Bluekingand /run/dhclient.eth0.pid09:12
lordievaderGood morning.09:12
BluekingTJ- I see host-name in there09:13
TJ-Blueking: 'suspect value' indicates something wrong with it09:14
Bluekingbut it's from ISP09:14
TJ-so? ISPs can make mistakes too09:16
Bluekingok host-name "0004005c0426/hdl-lunn1ar2"09:18
TJ-definitely a bad name "/" is an illegal character in a hostname09:20
TJ-unless there's some special format for that option in the DHCP RFCs09:20
Bluekinghttp://paste.ubuntu.com/15586424/09:22
Bluekingwhy are there two inputs ?09:23
Bluekingok I'll ask my isp09:25
BluekingTJ-  check that pastebinit  why are there two leases on same interface ?09:25
TJ-Blueking: the lease file is append-only... expired lease records remain in the file. The latest lease (look at the expire timestamps) is the last one10:56
TJ-Blueking: regarding the host-name content you have, RFC1533 para 3.14 describes DHCP Option 12 "Host Name". RFC1035 describes the character set restrictions which are that names can only contains letters, numbers and the hyphen ("-") with "." as a separator11:03
Bluekingok11:04
BluekingI have to notify isp about it then ?11:04
TJ-Yes. Use what I told you (the RFCs) to ensure they take you seriously and pass it to their engineers11:05
TJ-and of course show them the lease that was acquired11:05
Bluekingok11:06
Bluekingnods11:07
TJ- "option host-name "0004005c0426/hdl-lunn1ar2";" stands out like a sore thumb to someone who knows DHCP/DNS11:07
Bluekinghehe  but still I had a disconnect right now after 2 hour uptime11:08
BluekingTJ-  are there ways to have longer lease time ?11:09
TJ-Blueking: no; that's a DHCP server configuration. It looks like the ISP is using the same short expiry time for static leases it uses for dynamic leases11:11
BluekingTJ-  but host-name can't be reason for unstable net ?11:15
BluekingTJ-  what if... I know net drops out like every 2h  I can force renew  of ip ?11:17
Bluekingbefore it happens ?11:17
TJ-Blueking: the order of actions on timestamps is renew, rebind, expire. Your DHCP client should do 'renew' before ever reaching 'rebind' and should never reach 'expire'11:22
lordievaderCould it be that his dhcp client does adhere to the RFC and thereforce doesn't do the renew/rebind because of the hostname option?11:23
=== Piper-Off is now known as Monthrect
TJ-well the client says it's ignoring the host-name11:28
TJ-I'd like to see the syslog before saying more, which we hanve't had yet. That'll show if the client requests a renew and possibly the server doesn't respond11:29
TJ-the client takes the lease with the suspicious host-name so I can't imagine it'd not then renew11:29
BluekingTJ-  hmm did just have an disconnect   and needed to manual get it back online11:57
TJ-Blueking: the order of actions on timestamps is renew, rebind, expire. Your DHCP client should do 'renew' before ever reaching 'rebind' and should never reach 'expire'11:58
TJ-Blueking: time to grab the /var/log/syslog and see what happened11:58
BluekingI am looking into it11:58
TJ-if you want to pastebin the last 1000 lines (which should cover it) I'll take a look " pastebinit <( tail -n 1000 /var/log/syslog ) "11:59
Bluekingsent pm12:01
TJ-Blueking: I have them disabled12:01
Bluekinghttp://paste.ubuntu.com/15587360/12:01
TJ-Blueking: what time did you lose the connection?12:03
Blueking13:42  11:0312:03
Bluekingand 13.2212:04
Bluekingcan't be munin ?12:05
Bluekingthose cron jobs ?12:06
TJ-I see lots of "bound to ..." but then nexxt message from dhclient always seems to be from it Starting Up again. That suggests the process isn't remaining running. How are you starting dhclient?12:06
Bluekingnot sure12:06
TJ-Well, have you for an /etc/network/interfaces with "iface em1 inet dhcp" ?12:07
Bluekingyes12:07
TJ-OK, so ifupdown should be the one starting dhclient12:07
Bluekingauto em1   iface em1 inet dhcp12:07
TJ-and it ought to remain running12:07
Bluekingyes12:08
Bluekinghow to check that ?12:08
TJ-well right now for example "ps -efly | grep dhclient" should show it still running12:08
Bluekingyes12:09
TJ-renewal in 4165 seconds... that's 69 minutes12:09
Bluekinghttp://paste.ubuntu.com/15587413/12:10
TJ-Blueking: did you edit anything out of that syslog pastebin from other services in between the dhclient messages?12:10
Bluekingnot in last 2 hours12:11
Bluekingbut maybe about 11.0012:11
TJ-OK, I just didn't want to be missing any important other clues that may have been there, if you had12:11
Bluekingfor a year net was dropping at every 24h  2-3 weeks ago it started dropping out every 18-20 minute12:12
TJ-"DHCPNAK from 81.167.184.1 (xid=0xf0827209)" ... I think its your ISP with a messed up DHCP configuration. That message is in response to your client asking to renew, so the server offers the address back then immediately refuses it, forcing the client to withdraw the lease and request a completely new one12:14
Bluekingok12:15
TJ-Yes, it is definitely your ISP. Looks like their DHCP server admin is clueless12:15
Bluekingso we have a conclusion now ?12:15
TJ-I think you may be able to script around it so dhclient doesn't withdraw the lease whilst regaining a new lease (as the IP is static it shouldn't lose connectivity)12:15
BluekingI could take it up with ISP first12:16
TJ-I was thinking for you it'd be quicker to set up a local script so you don't have to deal with the loss until they fix it. That could be ages from what you've told us12:16
TJ-dhclient can take the -sf option to a shell script that performs actions12:17
TJ-so you could add a script that keeps the ip address when the lease is NACKed12:17
Bluekingeasy task ?12:19
TJ-yes. why don't we start by adding a script that simply logs the timestamp and the reason the script is called. That way we cn confirm the script sees the effect of the NACK (expire or fail) and then add code to do something about it12:21
TJ-"man 8 dhclient-script" goes into detail about the script mechanisms12:21
TJ-Blueking: do you have the file "/etc/dhcp/dhclient-enter-hooks.d/debug" ?12:23
Bluekingyes12:24
TJ-Blueking: if so, as sudo/root edit it, change RUN="no" to RUN="yes" and then restart networking/ifupdown to restart dhclient. It'll then log to a file "/tmp/dhclient-script.debug" each time the script is invoked12:24
Bluekingok12:25
TJ-Then we can look at what is recorded in that file after the next time you lose the connection12:25
Bluekinglol had wrong order on ifup && ifdown :P12:32
Bluekingnow12:32
Bluekingreason why dropout now12:32
Bluekingmoved tmp dhclient log file so start with fresh new one12:34
Bluekingwhen it drops out12:34
TJ-good, you're making progress12:39
FManTropyxI do "/etc/init.d/mysql stop" and mysqld just keeps immediately spawning a new instance - how do I shut down MySQL completely?14:08
TJ-FManTropyx: what Ubuntu release? I'd guess the init system is respawning it. You should use the init system to control it14:11
FManTropyxOS is 14.04, but I'm a noob trying to administrate it...14:12
TJ-FManTropyx: then the init system is upstart. Do "sudo service <name> [start | stop | restart | status ]14:14
TJ-FManTropyx: so "sudo service mysql stop"14:14
=== King is now known as test134
=== test134 is now known as King
alechk0hey guys, my 12.04 machine running mysql server rebooted earlier, and now mysql fails to start with "mysql respawning too fast, stopped" messages, I've tried to dpkg-reconfigure mysql-server-5.5 and it failed, then I tried to apt-get remove mysql-server mysql-server-5.5 and it failed again at configuring the mysql-server-5.5 package18:22
alechk0so now every time I try to install/remove package, it tries to configure the failed installation18:23
alechk0and of course the mysql server is stopped18:23
alechk0how do I purge the failed installation?18:24
soeehi, can i upgrade 15.10 to 16.04 via command line ?20:15
ikoniayou can20:16
soeeis the do-release-upgrade -d the right option ?20:17
ikoniano20:17
ikoniaas that will upgrade to a development version20:17
ikonia(pre release 16.04)20:17
ikoniaI suggest you wait for the official upgrade process which is at 16.04 release20:17
soeeikonia: i do want to jump to 16.04 development version20:18
soeei want to setup vps already for 16.0420:18
ikoniaI advise against it20:18
ikonia#ubuntu+1 topic has documentation in it20:18
Bluekingcan someone have a look at dhclient debug file + log from sniffing on interface  when lease renews (logged with tshark) I get 2 x NAK when renew of ip fails and net drops out20:41
rowdypixeldoes anyone know of a way to further debug an upstart script when i get the message "job failed to start" and the log is totally empty? I am trying to run a web server as a service, and running the command to start the server works fine as the user the config file is set to run under21:26
rowdypixelconf file for reference: https://gist.github.com/anonymous/f4547f9f9c2f3827dbc671027f931d1321:28
Bluekinghow to pastebin result of ifdown && ifup ?23:09

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!