Page 1 of 1

ERROR: bad HTTP response while trying to update

Posted: Mon Feb 11, 2019 4:32 pm
by 52516
Hi,
I have the following Configuration:
VMware ESXi v6.7
installed version: CHR 6.43.8

update in winbox : system-packages-check for updates

then,ERROR message will display: “bad HTTP response”
what i have checked:
1,DNS,is ok!
2,firewall: disabled all firewall rules, NAT rules only left "srcnat-masquerade"

can anyone advise how to solve this issue_
Thanks!
bad.jpg
bad2.jpg

Re: ERROR: bad HTTP response while trying to update

Posted: Wed Feb 13, 2019 11:10 pm
by algisr
If you're after update only then why not download update manually and add downloaded package to files via Winbox and reboot MikroTik?

Re: ERROR: bad HTTP response while trying to update

Posted: Thu Feb 14, 2019 4:33 am
by vecernik87
"Bad http response" sounds weird. It is like ROS received unexpected reply.
Fortunately, this can be debugged very easily with packet sniffer. If you don't want to dig into that, you can just download the package manually:
http://upgrade.mikrotik.com/routeros/6. ... .43.12.npk
or straight in ROS:
[admin@mikrotik] > /tool fetch url="http://upgrade.mikrotik.com/routeros/6.43.11/routeros-x86-6.43.11.npk"       
      status: finished
  downloaded: 19978KiB
       total: 19978KiB
    duration: 22s
If you see same size, you know it is right. However if you see different size (I assume there will be something really small) then it most likely means your HTTP transmission was altered by some middleman... Since it is just HTTP, there is no protection of transmission. Personally, I am really curious how long will it take till someone finds a way to hack RouterOS by spoofing downloaded packages with something else...
Anyway, if you download your file and it is not correct size, download it to your computer and have a look inside. Maybe it is some captive-portal http page or something else...

Re: ERROR: bad HTTP response while trying to update

Posted: Thu Feb 28, 2019 5:37 am
by 52516
"Bad http response" sounds weird. It is like ROS received unexpected reply.
Fortunately, this can be debugged very easily with packet sniffer. If you don't want to dig into that, you can just download the package manually:
http://upgrade.mikrotik.com/routeros/6. ... .43.12.npk
or straight in ROS:
[admin@mikrotik] > /tool fetch url="http://upgrade.mikrotik.com/routeros/6.43.11/routeros-x86-6.43.11.npk"       
      status: finished
  downloaded: 19978KiB
       total: 19978KiB
    duration: 22s
If you see same size, you know it is right. However if you see different size (I assume there will be something really small) then it most likely means your HTTP transmission was altered by some middleman... Since it is just HTTP, there is no protection of transmission. Personally, I am really curious how long will it take till someone finds a way to hack RouterOS by spoofing downloaded packages with something else...
Anyway, if you download your file and it is not correct size, download it to your computer and have a look inside. Maybe it is some captive-portal http page or something else...


have try it , not work
message.jpg
reinstalled the new version of ROS in ESXI,by manually.(Eliminate the reason of hacker attack)
issue still there...
:shock: :shock: :shock:

Re: ERROR: bad HTTP response while trying to update

Posted: Thu Feb 28, 2019 8:02 am
by vecernik87
"302 redirected" says everything - the request is redirected, exactly as I suspected.. I am not surprised that automatic download in RouterOS didn't work and I don't think it is caused by your device. More like something upstream.
this probably brings more questions than answers:
- why is it redirected?
- where does it go?

I can't answer why it is happening but if you find out where it goes, it might point you in right direction.
If you are curious what is happening, you can set a sniffer, record those packets, save it in file, download to computer and open it in wireshark:
/tool sniffer start port=80 ip-address=[:resolve upgrade.mikrotik.com] operator-between-entries=and
/tool fetch url="http://upgrade.mikrotik.com/routeros/6.42.12/routeros-x86-6.42.12.npk"
/tool sniffer stop                                                          
/tool sniffer save file-name=redirected.pcap
(enter those commands one by one, not together please)

http302.png
If you don't have wireshark (and you don't want to install it), you can either view packets straight in RouterOS (but its complicated to find the right packet) or you can simply open the pcap file in notepad and look for line saying "Location: ...." there should be only one in the whole file.

Re: ERROR: bad HTTP response while trying to update

Posted: Mon Mar 04, 2019 6:53 pm
by 52516
"302 redirected" says everything - the request is redirected, exactly as I suspected.. I am not surprised that automatic download in RouterOS didn't work and I don't think it is caused by your device. More like something upstream.
this probably brings more questions than answers:
- why is it redirected?
- where does it go?

I can't answer why it is happening but if you find out where it goes, it might point you in right direction.
If you are curious what is happening, you can set a sniffer, record those packets, save it in file, download to computer and open it in wireshark:
/tool sniffer start port=80 ip-address=[:resolve upgrade.mikrotik.com] operator-between-entries=and
/tool fetch url="http://upgrade.mikrotik.com/routeros/6.42.12/routeros-x86-6.42.12.npk"
/tool sniffer stop                                                          
/tool sniffer save file-name=redirected.pcap
(enter those commands one by one, not together please)


http302.png
If you don't have wireshark (and you don't want to install it), you can either view packets straight in RouterOS (but its complicated to find the right packet) or you can simply open the pcap file in notepad and look for line saying "Location: ...." there should be only one in the whole file.

Thanks!!!

ISP blocked the Http GET request…(may be)
:? :? :?
2222222.jpg
Does Mikrotik have plans to use https?