MaxFX shutting down, but…

Best Binary Options Brokers 2020:
  • Binarium
    Binarium

    The Best Binary Options Broker 2020!
    Perfect Choice For Beginners!
    Free Demo Account!
    Free Trading Education!
    Get Your Sing-Up Bonus Now!

  • Binomo
    Binomo

    Only For Experienced Traders!

Народ, у всех Mikrotik уходит в ребут если пускать через него zmap?

Каждый раз при запуске zmap на адреса из wan сегмента (запускаю с хоста расположенного в lan сегменте) Микротик ребутается
Проверял на: RouterOS 6.30.4 и 6.31

Настройки топорные:
/interface ethernet set ether1 name=ether1-gateway
/interface ethernet set ether2 name=ether2-local

/interface bridge add name=bridge-local disabled=no auto-mac=no protocol-mode=rstp
/interface bridge set “bridge-local” admin-mac=[/interface ethernet get ether2-local mac-address]
/interface bridge port add bridge=bridge-local interface=ether2-local

/ip dhcp-client add interface=ether1-gateway disabled=no

/ip address add address=192.168.88.1/24 interface=bridge-local
/ip pool add name=”default-dhcp” ranges=192.168.88.10-192.168.88.254
/ip dhcp-server add name=default address-pool=”default-dhcp” interface=bridge-local lease-time=10m disabled=no
/ip dhcp-server network add address=192.168.88.0/24 gateway=192.168.88.1
/ip dns static add name=router address=192.168.88.1>

/ip firewall nat add chain=srcnat out-interface=ether1-gateway action=masquerade

zmap запускаю с хоста подключенного к ether2-local: zmap -B 10M -p 80 -o jus_test_22.csv x.x.0.0/16
x.x.0.0/16 – wan segment
Через 1-2 секунды роутер уходит в ребут.

После ребута в логах:
system,error,critical System rebooted because of kernel failure
system,error,critical router was rebooted without proper shutdown

  • Вопрос задан более трёх лет назад
  • 3154 просмотра

8Мб) и она попросту заканчивается на

18000 открытых сессиях. (srcnat выедает её)
zmap -B 10M . за пару секунд открывал >20к соединений.
А микротик не имея никакой защиты от подобного – просто валился “на лопатки”.

Провел пару тестов, заменив -B 10M на -r 2048 – среднее число открытых соединений стало в районе 13000-15000
Загрузка CPU 60-80% свободной памяти 1-0.5 Mb.
Падение “на лопатки” прекратилось.

Решено: Router was rebooted without proper shutdown

Router was rebooted without proper shutdown

На одном из моих Микротиков (951G-2HnD), возникла ошибка — Router was rebooted without proper shutdown, произошло это так:

  1. Микротик был сброшен и настроен из дефолтной конфигурации, изменения ее были минимальны несколько правил файервола и пара проброшенных портов (да, знаю стандартную конфигурацию рекомендуют удалять и настраивать с нуля, но между мной и Микротиком несколько сотен километров)
  2. Заодно я, помня о некоторых проблемах с уязвимостью в недавних версиях прошивки решил ее обновить, и обновил до 6.44.5, из ветки long term, хотя обычно я использую stable, выбрать ветку можно при обновлении:
  3. Примерно сутки все проработало нормально, а на следующий день настройки оказались опять сброшенными по дефолту, а лог начинался ошибкой «Router was rebooted without proper shutdown», без каких либо подробностей, далее в логе была куча обычных записей без ошибок.
  4. Еще через сутки ситуация повторилась, однако на этот раз роутер сохранил основные настройки, но забыл несколько правил файервола. Их я добавлял в безопасном режиме и точно помню что отключал его перед выходом, но 100% гарантии дать не могу.
  5. Еще через сутки правила сбросились снова, надо что-то решать подумал я.

Причины ошибки «Router was rebooted without proper shutdown»

При обнаружении этой ошибки я естественно сразу же пошел в Google наверняка я не первый и решение уже есть, но ситуация начала запутываться, причин у этой ошибки достаточно много и поиск конкретной может затянуться. Привести к ошибке Router was rebooted without proper shutdown может:

  1. Ошибки в прошивке (это оказался мой случай, так как остальные причины были исключены)
  2. Высокая нагрузка на роутер ( загрузка процессора, исчерпание свободной оперативной памяти)
  3. Повреждение встроенной флеш-памяти, появление на ней бед-блоков
  4. Повреждение вследствие п.3 прошивки роутера
  5. Умирающий блок питания
  6. Попытки подбора пароля к роутеру, они могут создавать высокую нагрузку на процессор и вызывать перезагрузку роутера
  7. Прочее

Способы исправления ошибки Router was rebooted without proper shutdown

  1. Пойдем по порядку, я стал думать в чем может быть причина, так как высокой нагрузки на роутер не было, блок питания и прочее было в порядке, и одно из первых что пришло мне в голову это прошивка, которую я обновил перед возникновением проблем, я решил вернуться обратно на stable ветку и поставил самую последнюю версию на тот момент — 6.45.2, после этого я проверил наличие всех нужных мне правил и вот уже неделю роутер работает стабильно и не забывает настройки, так же помимо обновления ROS, возможно понадобится обновить прошивку загрузчика, она находится тут:

Обратите внимание на три версии — первая это версия идущая с завода, вторая — текущая установленная и активная, третья — та до которой можно обновиться, я пока оставил старую, так как все нормально работает после обновления RouterOS.

  • Узнать основные параметры состояния роутера — загрузку процессора, объем свободной памяти, наличие бед-блоков в флеш-памяти можно на вкладке ресурсы:
    Если вы тут увидите высокую загрузку процессора для которой нет особых причин, то рекомендую посмотреть на интерфейсы — и если на каком-то есть высокие значения (десятки мегабит и выше), то стоит разобраться более детально, что за трафик и если не нужен — заблокировать его.
  • Наличие бед-блоков и соответственно состояние флеш-памяти можно узнать на вкладке с ресурсами, см скрин в п. 2, у моего 2 миллиона записей и 0% плохих блоков
  • Проверить целостность прошивки можно в меню обновлений:
  • Не поручусь за все партии, но с Микротиками обычно поставляются достаточно неплохие блоки питания и я не слышал о каких-то серьезных и массовых проблемах с ними в отличии от других производителей, если подозреваете блок питания — замените его временно на заведомо исправный, ну и крайне желательно использовать ИБП.
  • Если предыдущие пункты не ваш случай, обратите внимание на входящий трафик, попадающий на WAN интерфейс, при настройке Микротиков, я всегда запрещаю входящий трафик на этот интерфейс и отключаю ненужные порты 22, 21, 80 и так далее в настройках Микротика, если держать тот же 22-й порт открытым, на него всегда валится куча трафика от желающих подобрать пароль, так же бывают провайдеры в сетях которых гуляет много «паразитного» трафика, он тоже валится на входящий интерфейс и его обработка может требовать заметных ресурсов. Величина трафика при попытках подобрать пароль может быть небольшой, а вот нагрузка на обработку таких пакетов может быть весьма заметной.
  • Этот пункт я добавил специально, почему-то я уверен что список причин не является исчерпывающим, и если у вас не получилось исправить ошибку Router was rebooted without proper shutdown, пишите в комментарии попробуем разобраться.
  • Оставьте комментарий Отменить ответ

    Этот сайт использует Akismet для борьбы со спамом. Узнайте как обрабатываются ваши данные комментариев.

    Graceful Shutdown

    Camel supports a pluggable shutdown strategy using org.apache.camel.spi.ShutdownStrategy . Its responsible for shutting down routes in a graceful manner. The other resources will still be handled by CamelContext to shutdown. This leaves the problem at hand with properly shutting down all the routes in a reliable manner to the ShutdownStrategy .

    Camel provides a default strategy in the org.apache.camel.impl.engine.DefaultShutdownStrategy which is capable of doing that.

    DefaultShutdownStrategy

    The default strategy will gracefully shutdown routes:

    in the reverse order they was started. The option shutdownRoutesInReverseOrder can be used to use the old behavior.

    let pending and current in flight exchanges run to completion before shutting down

    using a timeout of 45 seconds which then forces a shutdown now

    You can configure the timeout, and whether it should shutdown now remaining routes when the timeout occurred or ignore. See the setters on the class.

    It will output to log the progress during graceful shutdown as shown in an example below

    Notice how it waits while there are inflight exchanges still being processed before it can shutdown.

    Suppressing logging due to timeout not allowing all inflight messages to complete

    If a graceful shutdown could not shutdown cleanly within the given timeout period, then Camel performs a more aggressive shutdown by forcing routes and thread pools etc to shutdown. And as well the routing engine will reject continue processing Exchanges. If this happens you may see WARN logs about Exchanges being rejected and other failures due the forced shutdown.

    If you do not want to see these logs, you can suppress this by setting the option SuppressLoggingOnTimeout to true.

    Best Binary Options Brokers 2020:
    • Binarium
      Binarium

      The Best Binary Options Broker 2020!
      Perfect Choice For Beginners!
      Free Demo Account!
      Free Trading Education!
      Get Your Sing-Up Bonus Now!

    • Binomo
      Binomo

      Only For Experienced Traders!

    Notice the suppress is a “best effort” though there may still be some logs coming from 3rd party libraries and whatnot, which Camel cannot control.

    Logging inflight exchange information on timeout

    If a graceful shutdown could not shutdown cleanly within the given timeout period, then Camel performs a more aggressive shutdown by forcing routes and thread pools etc to shutdown. When the timeout happens, then Camel logs information about the current inflight exchanges, which shows from which route the exchange origins, and where it currently is being routed. For example the logging below, shows that there is 1 inflight exchange, that origins from route1, and currently is still in route1 at the “delay1” node. The elapsed is time in millis how long at the current node (eg delay1) and duration is total time in mills.

    If you enable DEBUG logging level on org.apache.camel.impl.engine.DefaultShutdownStrategy then it logs the same inflight exchange information during graceful shutdown

    If you do not want to see these logs, you can turn this off by setting the option logInflightExchangesOnTimeout to false.

    Controlling ordering of routes

    You can configure the order in which routes should be started, and thus also the same order they are being shutdown. See more at Configuring route startup ordering and autostartup.

    Fine grained configuration

    You can control two areas that influence graceful shutdown in the Camel routing:

    These options can be configured on two scopes: context and route . Where a route will fallback to the context scoped option, if not explicit configured. (same principle as Error Handler, etc.).

    ShutdownRoute

    This option can control how a given route should act during graceful shutdown. It has two values Default and Defer . The Default is obviously the default option which lets Camel shutdown the route as early as possible. The Defer is used to defer shutting down this route to a later stage. This is useful when other routes are dependent upon it. For example an internal route which other routes reuse.

    For example in the route below we have two routes, where route 1 is dependent upon route 2. At shutdown we want route 1 to complete all its current messages and we also want the 2nd route to do this as well. So we can mark both routes to Defer but since route 1 is a SEDA based route its Defer by default (it uses ShutdownAware ).

    A Java DSL based example to defer shutting down the 2nd:

    Defer shutting down internal routes only

    Its best to only defer shutting down internal routes only. As public routes should shutdown as quickly as possible otherwise it will just keep intake new messages which will delay the shutdown processor. Or even have it timeout if a lot of new messages keep coming in.

    ShutdownRunningTask

    This option control how a given route consumer acts during shutdown. Most route consumer will only operate on a single task (message), however the Batch Consumer can operate on many messages (in a batch). This option is for those kind of consumers. By default it uses the option CompleteCurrentTaskOnly which mean that the current in progress task (message) will be completed and then the consumer will shutdown. The other option CompleteAllTasks allows the consumer to complete all the tasks (messages) before shutting down. For example a File consumer will process all the pending files it has picked up before shutting down.

    JMX managed

    The ShutdownStrategy is JMX aware as well so you can manage it from a JMX console. For example you can change the timeout value.

    Shutting down individual routes

    It is possible to gracefully shutdown an individual route using shutdownRoute(routeId) method on CamelContext . Its also possible to provide a specific timeout to use instead of the default timeout settings using shutdownRoute(routeId, timeout, timeUnit) .

    If you develop your own Camel component or want to implement your own shutdown strategy then read this section for details.

    ShutdownStrategy

    You can implement your own strategy to control the shutdown by implementing the org.apache.camel.spi.ShutdownStrategy and the set it on the CamelContext using the setShutdownStrategy method.

    When using Spring XML you then just define a spring bean which implements the org.apache.camel.spi.ShutdownStrategy and Camel will look it up at startup and use it instead of its default. See more at Advanced configuration of CamelContext using Spring.

    ShutdownAware

    The interface org.apache.camel.spi.ShutdownAware is an optional interface consumers can implement to have fine grained control during shutdown. The ShutdownStrategy must be able to deal with consumers which implement this interface. This interface was introduced to cater for in memory consumers such as SEDA which potentially have a number of pending messages on its internal in memory queues. What this allows is to let it control the shutdown process to let it complete its pending messages.

    The method getPendingExchangesSize should return the number of pending messages which reside on the in memory queues.
    The method deferShutdown should return true to defer the shutdown to a later stage, when there are no more pending and inflight messages.

    Batch Consumer should implement ShutdownAware so they properly support the ShutdownRunningTask option. See GenericFileConsumer for an example.

    © 2004-2020 The Apache Software Foundation.
    Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.

    On Shutting Down

    It makes sense that founders and investors spend so much time talking about things that go well. If we spent all of our time dwelling on the companies that failed, we wouldn’t have time for much else.

    When people do talk about company failure, they often do so in a way meant to make them seem wise by breaking down all the lessons they’d learned through failing. I did something like this when we shut Tutorspree down. I think that was a valuable exercise, and maybe it even helped some people. Mostly, though, it was cathartic.

    Founders lack a coherent way to think about when to shut down. 1 Founders do not always get to choose to shut down. 2 However, most of the time, it is the founder’s choice. It’s a personal decision. It’s a hard and painful decision. It’s an emotional, fraught decision. However, shutting down doesn’t have to be a blind decision.

    The unintuitive thing about figuring out if you should shut down your company is that it isn’t the path of least resistance. The “easiest” thing to do for a struggling company is to fall into zombie mode – neither growing nor truly dead. This is easy because it doesn’t require an active decision, it just involves continuing to do the bare minimum to keep the company alive. This involves a series of seemingly small compromises that lead to stasis or failure.

    Shutting down is hard because it means publicly admitting that you were wrong, unlucky, or incompetent. 3 Because of this difficulty, we’ve evolved a set of terms that often mean “shut down” without saying “shut down.” In no particular order these are: pivot, hard pivot, rebrand, strategic shift, change customer focus, and platform switch. 4

    Stakeholders

    Shutting down is hard because it generally means disappointing people who believed in you. Some of this disappointment is real, some of it is imagined. Founders who have raised money are usually most concerned about disappointing or upsetting their investors. Investors are often upset when a bet fails, generally in proportion to the amount of capital they’ve given you, and in the speed with which things went wrong since they invested. However, investors know that most bets are going to fail, and will usually get over their emotions. The thing that bothers investors more than shutting down is when founders either misrepresent the status of a business and suddenly shut down without warning, or slowly bleed out a business over years while taking up a lot of the investor’s time.

    Founders often worry that shutting down will disappoint their customers. This is true, but companies that aren’t doing well generally see their products degrade, which also upsets customers. Unless your product provides a critical, lifesaving purpose, shutting down cleanly and with transparency is much preferred to a slow fade into obsolescence. 5

    Founders should worry about the impact that shutting down has on their employees. The biggest burden a founder has is to meet payroll. The biggest emotional investment that founders make – especially early on – is convincing great people to take a leap of faith and accept an offer to work their butts off on a long shot. This dynamic is why transparency around the decision to shutdown and the timeline of it is so important.

    The worst thing a founder can do to an employee is to tell them that everything is amazing, and then to one day tell them that she a) no longer has a job and b) that the company cannot pay her what was promised and c) that you’ve known all this for a long time but didn’t want to tell her because you were worried about her feelings. It is much better to make a clean decision to shut down in full view of of your employees with enough time and money left to help employees find new jobs and move on.

    Framework for shutting down

    The decision to actually shut down an idea can be made through answering the following questions: 6

    1. Do you have any ideas left to grow your startup?
    2. Can you drive that growth profitably?
    3. Do you want to work on the startup that results from that growth?
    4. Do you want to work with your co-founders on the startup that results from that growth?

    The first two questions here are quantitative and driven by the experiments that founders are constantly running on their products and users. Unfortunately, while they are quantitative, there’s no deterministic way to know if you’ve actually tried everything in the right way. At some point, you have to make a call based on accumulated evidence. 7

    The second two are qualitative and introduce the largest challenges around making a decision comes when the answers to these questions are mixed between yes and no. For instance – if you enjoy working with your co-founders on a business that produces positive cash flows but is not growing, you probably shouldn’t shut down. However, if you hate the people you’re working with on a business that is growing rapidly, you should either shut it down, or find a way to keep going without the team. These are personal decisions that no one else can make for you, but it is important to separate the different threads of the decision so that you can actually evaluate them as objectively as possible.

    The other side

    I was terrified to shut my company down, even though all the evidence said it was the right decision. 8 The thing that scared me most was the that I had no idea what would happen afterwards. However, I realized that I had exactly one life to live, and that staying in a bad situation of my own making out of fear was a dumb thing to do.

    Having spoken with many founders who have gone through similar situations, I’ve found that most of them are incredibly depressed after shutting down their startups for a few months. Afterwards, things start to get better. This may be hard to believe but shutting down releases so much tension and clears away so many burdensome expectations that it allows for brand new creative ideas and approaches. It’s a necessary part of the startup cycle, and one that founders need to approach more openly and rigorously.

    Notes
    1. Throughout this essay, I use “shut down” interchangeably for ideas and companies. The two differ only slightly.↩
    2. Running out of money unexpectedly, often as a result of a failed fundraise, can force a founder to shut down.↩
    3. Incompetent seems harsh, but it would be strange to believe that you could be competent at all the new things required in building a company on the first or even tenth try.↩
    4. I am sure this is a non-exhaustive list.↩
    5. In this case, shutting down is still critical, but the decision should involve a long timeline, over communication, and a best effort to find alternatives.↩
    6. I could also state this as the inverse. Deciding to work on a startup should come down to these questions all being answered with “yes.”↩
    7. It’s important to make sure that you’ve actually tried a lot of things. Founders often quit far too early on an idea that needs more time.↩
    8. The answers to questions 2,3, and 4, were all “no,” though Ryan, Josh, and I all like each other as humans.↩

    Thanks to Sam Altman and Craig Cannon for your edits.

    Best Binary Options Brokers 2020:
    • Binarium
      Binarium

      The Best Binary Options Broker 2020!
      Perfect Choice For Beginners!
      Free Demo Account!
      Free Trading Education!
      Get Your Sing-Up Bonus Now!

    • Binomo
      Binomo

      Only For Experienced Traders!

    Like this post? Please share to your friends:
    Binary Options Trading For Beginners
    Leave a Reply

    ;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: