Community discussions

 
52516
just joined
Topic Author
Posts: 5
Joined: Sun Feb 10, 2019 4:16 pm

ERROR: bad HTTP response while trying to update

Mon Feb 11, 2019 4:32 pm

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
You do not have the required permissions to view the files attached to this post.
 
algisr
just joined
Posts: 18
Joined: Sat Apr 28, 2018 11:30 am

Re: ERROR: bad HTTP response while trying to update

Wed Feb 13, 2019 11:10 pm

If you're after update only then why not download update manually and add downloaded package to files via Winbox and reboot MikroTik?
 
User avatar
vecernik87
Long time Member
Long time Member
Posts: 585
Joined: Fri Nov 10, 2017 8:19 am

Re: ERROR: bad HTTP response while trying to update

Thu Feb 14, 2019 4:33 am

"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...
 
52516
just joined
Topic Author
Posts: 5
Joined: Sun Feb 10, 2019 4:16 pm

Re: ERROR: bad HTTP response while trying to update

Thu Feb 28, 2019 5:37 am

"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:
You do not have the required permissions to view the files attached to this post.
 
User avatar
vecernik87
Long time Member
Long time Member
Posts: 585
Joined: Fri Nov 10, 2017 8:19 am

Re: ERROR: bad HTTP response while trying to update

Thu Feb 28, 2019 8:02 am

"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.
You do not have the required permissions to view the files attached to this post.
 
52516
just joined
Topic Author
Posts: 5
Joined: Sun Feb 10, 2019 4:16 pm

Re: ERROR: bad HTTP response while trying to update

Mon Mar 04, 2019 6:53 pm

"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?
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 8 guests