首页 > linux > openvpn进程异常退出

openvpn进程异常退出

2015年2月27日 eric 发表评论 阅读评论

最近的openvpn服务异常退出了多次,由于当初为了排查问题记录大量的debug日志,导致出现问题的时候想定位问题很难,瞬间日志就被刷没了,进程掉了,瞬间启动、瞬间又掉了,导致很多订单丢了!由于日子文件记录了太多无用信息,不敢通过查日志来定位问题,开始大胆猜测:
1. openvpn 服务器(虚拟机)的 内存不够了 因为只有 2G 内存
2. I/O过高,因为日志开启了 DEBUG 的原因,大量写日志操作,
3. 打开文件描述符不够,系统默认 1024
4. 有人恶意攻击openvpn 服务

根据猜测的4点,开始应对,
1. 首选把openpvn服务器(虚拟机)内存调整到了4G,重启后发现openvpn 服务在启动后的 几分钟还是异常掉,
2. 把日志调整为 error ,openvpn 在启动后 几分钟还是异常退出了。查看日志发现是

Feb 18 17:17:42 localhost openvpn[1219]: qn_anqiu/xxx.xxx.xxx.xx:27351 CRL: cannot read: /usr/local/cine/etc/keys/crl.pem: Too many open files (errno=24) 

3. 有上面的错误日志提示,说明猜想的 第三点是对的。 执行命令:

shell $> ulimit -SHn 65535 

在启动 openvpn 进程后,正常了没有再次退出了。
4. 查看日志 发现有一个 IP 每分钟都在非正常请求 openvpn 服务器,直接在 iptables 过滤掉此IP

Feb 16 13:06:16 localhost openvpn[1219]: 58.244.191.51:47374 WARNING: Bad encapsulated packet length from peer (18245), which must be > 0 and < = 1544 -- please ensure that --tun-mtu or --link-mtu is equal on both peers -- this condition could also indicate a possible active attack on the TCP link -- [Attemping restart...]
Feb 16 13:07:21 localhost openvpn[1219]: 58.244.191.51:6043 WARNING: Bad encapsulated packet length from peer (18245), which must be > 0 and < = 1544 -- please ensure that --tun-mtu or --link-mtu is equal on both peers -- this condition could also indicate a possible active attack on the TCP link -- [Attemping restart...] 

经过上面的修改,经过两天后 openvpn 还是异常掉了一次,经过查看日志还是老问题:

Feb 18 17:17:42 localhost openvpn[1219]: qn_anqiu/xxx.xxx.xxx.xx:27351 CRL: cannot read: /usr/local/cine/etc/keys/crl.pem: Too many open files (errno=24) 

就算打开文件描述符进程也不应该掉啊,这说明是openvpn 的 BUG, crl.pem 该文件里存的是注销的证书,如果是注销的证书验证是不能通过,openvpn服务就会拒绝连接,我目前有 800多个客户端来连接,难道是每个连接都要请求该文件没有释放吗?就算没有释放65535 个文件描述符还是不够么?
为了解决问题只好修改配置文件把这个验证注销证书的参数去掉,在重启 openvpn 进程,就正常了再也没有出现过问题。具体如何产生还需要进一步观察和研究。

转载请注明:文章转载自:Eric's linux and nginx! (http://www.nginxs.com)
本文地址:http://www.nginxs.com/linux/531.html

分类: linux 标签: ,
  1. 2015年11月26日09:08 | #1

    学习咯 感觉博主好久都木有更新咯

  2. 2016年6月1日16:09 | #2

    第一次过来看看

  3. 2016年12月28日13:46 | #3

    进来看看、支持一下

  4. 2017年3月31日16:10 | #4

    Get an expert academic writing assistance. We can write any paper on any subject within the tightest deadline.

  5. 2017年5月17日22:22 | #5

    Hi i am kavin, its my first occasion to commenting anywhere, when i read this paragraph i thought i
    could also make comment due to this good paragraph.

  6. 2017年5月20日07:02 | #6

    Wow that was strange. I just wrote an really long
    comment but after I clicked submit my comment didn’t
    show up. Grrrr… well I’m not writing all that over again. Anyway, just wanted to say wonderful
    blog!

  7. 2017年5月21日05:40 | #7

    Вы не правы. Давайте обсудим. Пишите мне в PM.

    порно литература а также эро рассказы дядя и девочка

  8. 2017年5月22日05:16 | #8

    Извиняюсь, но мне нужно совсем другое. Кто еще, что может подсказать?

    папа и дочь в бани рассказ о сексе или бабушкины инцестрассказы

  9. 2017年5月23日09:33 | #9

    Присоединяюсь. Это было и со мной. Давайте обсудим этот вопрос.

    ru incest porn или рассказ изнасилование племяницы

  10. 2017年5月28日13:39 | #10

    I absolutely love your blog.. Great colors & theme. Did you develop this amazing site
    yourself? Please reply back as I’m trying to create my very own site and
    would love to know where you got this from or exactly what the
    theme is named. Cheers!

  11. 2017年6月1日10:37 | #11

    EROFORCE купить
    EroForce — капсулы для потенции, которые оказывают комплексное воздействие
    на мужской организм. Это средство способно решить множество проблем,
    начиная с ослабления либидо и заканчивая
    полной импотенцией. Препарат снова вернёт радость от секса.

    Капсулы Eroforce практически не имеют аналогов по своему воздействию и обладают массой достоинств по сравнению
    с похожими средствами:
    быстрый длительный эффект;
    натуральный состав;
    усиление либидо;
    капсулы не просто маскируют, а излечивают и устраняют проблему
    полностью;
    продлевают половой акт;
    делают ощущения более яркими;
    не имеют противопоказаний;
    удобны в применении. http://intouch.com.ua/

  12. 2017年6月9日08:32 | #12

    How does titan gel for men workplace?
    Titan gel for men
    The $ttnglvn767 unparalleled matter delivered the potential burden even out if obtained with rude methods or put-upon on an irregular basis.
    Thanks to the Bodoni font methods of qualification the educe and its
    compounding with many cancel active substances, the creators of “Titan gel” managed to accomplish an impressive
    resultant! https://titan-gel-vietnam.pro/

  13. 2017年6月21日13:20 | #13

    Since the admin of this web page is working, no hesitation very soon it will be well-known, due to its quality contents.

  14. 2017年6月21日21:46 | #14

    Cialis Generique Forum [url=http://buylevi.com/map.php]Buy Vardenafil[/url] Cialis Durata Quiero Comprar Viagra Sin Receta [url=http://cheap-cialis-40mg.tadalaf.com]Cheap Cialis 40mg[/url] Priligy 30 O 60 Mg Cialis 5 Mg Generico [url=http://cost-of-generic-propecia.propecpills.com]Cost Of Generic Propecia[/url] Cephalexin To Treat Bronchitis Viagra Se Vende Con Receta Medica [url=http://cialcheap.com/cialis-online-usa.php]Cialis Online Usa[/url] Clomid Ne Marche Pas Amoxicillin For Sale [url=http://staminamen.com/cialis-5mg.php]Cialis 5mg[/url] Achat Cialis Suisse Allpharmacy [url=http://levicost.com]levitra online best price[/url] Vente Baclofen En France Cheapest Place To Buy Herpes Rx [url=http://levipills.com/price-of-levitra.php]Price Of Levitra[/url] Avodart Sale Original Viagra Kaufen [url=http://ordina-cialis-online.ordercial.com]Ordina Cialis Online[/url] Cialis Lilly 20mg 12 Fastest Cialis Delivery [url=http://get-levitra.buylevi.com]Get Levitra[/url] Amoxicillin On Empty Stomach Buy Viagra In Ho Chi Minh 11 [url=http://order-kamagra-onlines.kamagorder.com]Order Kamagra Onlines[/url] Tetracycline Vendors Cytotec Comprar [url=http://order-viagra.canadianvia.com]Order Viagra[/url] Cialis 200 Mg India Purchase Flagyl In Chula Vista [url=http://cheap-levitra.buylevi.com]Cheap Levitra[/url] Need Worldwide Amoxicilina Drugs Medicine Online Cash Delivery Buy Viagra From Egypt [url=http://cial40mg.com/where-to-buy-cialis.php]Where To Buy Cialis[/url] Levitra Generico Acquisto Farmacia Priligy When To Take [url=http://cialusa.com]cialis[/url] Where To Purchase Low Cost Levitra Amoxicillin Uses [url=http://staminamen.com/purchase-cialis.php]Purchase Cialis[/url] Cialis Im Ausland Preisvergleich Cialis Bestellen [url=http://cheapcial.com/mail-order-cialis.php]Mail Order Cialis[/url] Best Life Rx Pharmacy Cialis Coupon [url=http://sildenafil.canadianvia.com]Sildenafil[/url] Stendra Discount From Canada Delivered On Saturday Cleveland Cheap Levitra Online [url=http://tadalafil-tablets.cial5mg.com]Tadalafil Tablets[/url] Order Generic Viagra Usa Levitra Orodispersibile [url=http://priligy.ccrpdc.com/generic-priligy-60mg.php]Generic Priligy 60mg[/url] Priligy Venta Rhinocort Aquano Prescription [url=http://levitra-40mg-sale.buylevi.com]Levitra 40mg Sale[/url] Prevacid Buy One Get One Rebate Cheap Viagra From India [url=http://buy-dapoxetine-priligy.priliorder.com]Buy Dapoxetine Priligy[/url] Viagra Dosierung Cialis Priligy Suomi [url=http://costofvia.com/cheap-viagra-pill.php]Cheap Viagra Pill[/url] Viagra Duracion Herstellung Levitra [url=http://newisotretinoin.com/decutan.php]Decutan[/url] Can Amoxicillin Eliminate Tooth Infection Single Dose Of Amoxicillin For Gonorrhea [url=http://leviusa.com]generic levitra for sale[/url] Baclofene Diarrhee Levitra Tempi Di Azione [url=http://cialis-cost.cialorder.com]Cialis Cost[/url] Cialis 5 Mg Indications Kamagra Oral Jelly Canada [url=http://xenical.ccrpdc.com/best-xenical-online.php]Best Xenical Online[/url] Cheap Antabuse Buy Miodar [url=http://kamagra.kamagpills.com]Kamagra[/url] Order Now Cod Fedex Stendra Levitra Funziona Davvero [url=http://propecia-buy-online.propecorder.com]Propecia Buy Online[/url] Cialis Viagra Y Levitra compaydayloansparramatta httpwww. [url=http://nowfastmoney.com]payday loan[/url] paydayloansnow.Commande Viagra 25 [url=http://order-cialis-tablets.tadalaf.com]Order Cialis Tablets[/url] Propecia Treatment Hair Loss Viagra Hilft Nicht [url=http://levitra-tablet.leviorder.com]Levitra Tablet[/url] Levitra Quante Ore Dura Levitra And Grapefruit Juice [url=http://cialis-online-buy.cialorder.com]Cialis Online Buy[/url] Cialis Efectos Con Alcohol Viagra Kaufen Dusseldorf [url=http://bestlevi.com/levitra-online-forum.php]Levitra Online Forum[/url] Overnight Delivery Methotrexate Kamagra Tab [url=http://cheap-kamagra-pills.kamagpills.com]Cheap Kamagra Pills[/url] Generico Viagra Soft Get Levitra Online [url=http://viasamples.com/cheap-viagra-usa.php]Cheap Viagra Usa[/url] Kamagra Oral Jelly No Presc Acheter cialis generique 10 [url=http://cialis-professional.tadalaf.com]Cialis Professional[/url] Xenical Orlistat Online Priligy Uk Forum [url=http://buylevitraeufast.com/levitra-buy.php]Levitra Buy[/url] Buy 10 Pack Of Clomid Pills Propecia Vendita [url=http://need-to-order-cialis.BuyCial.com]Need To Order Cialis[/url] Cialis 10 Mg Preis Where to buy generic isotretinoin isotrex shop [url=http://viaprices.com]viagra online pharmacy[/url] Cialis Online Contrassegno Buy Provera And Clomid Online [url=http://cialis-to-buy.cial5mg.com]Cialis To Buy[/url] Viagra Online Men Health Viagra Paiement Paypal [url=http://viacheap.com]buy viagra online[/url] Cialis O Levitra Cual Es Mejor Levitra Precios [url=http://ordina-cialis-online.cialorder.com]Ordina Cialis Online[/url] Can Amoxicillin Treat Bacterial Vaginosis Novidat 500mg [url=http://sildenafil-citrate.viapill.com]Sildenafil Citrate[/url] What Is Keflex For Dogs Cialis On Line Sales [url=http://tadalafil.cialorder.com]Tadalafil[/url] Imitrex Buy U.S Canada

订阅评论
2+8= (必填)