# Secure Connection Failed

**URL:** <https://discuss.dradis.com/t/secure-connection-failed/483>\
**Category:** Community Edition\
**Created:** [July 31, 2017, 6:50pm UTC](https://discuss.dradis.com/t/secure-connection-failed/483 "2017-07-31T18:50:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rocco920](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@rocco920](https://discuss.dradis.com/u/rocco920)\
**Post date:** [July 31, 2017, 6:50pm UTC](https://discuss.dradis.com/t/secure-connection-failed/483/1 "2017-07-31T18:50:08Z")

</div>

Just installed Dradis CE on my Kali Box. When I go to the web interface, I get:

**Secure Connection Failed**

An error occurred during a connection to localhost:3000. SSL received a record that exceeded the maximum permissible length. Error code: SSL\_ERROR\_RX\_RECORD\_TOO\_LONG

Anyone else experience this?

---

<div class="post-metadata">

**Author:** ![rachkor](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dradis.com/rachkor/32/51_2.png) [@rachkor](https://discuss.dradis.com/u/rachkor)\
**Post date:** [August 1, 2017, 8:01pm UTC](https://discuss.dradis.com/t/secure-connection-failed/483/2 "2017-08-01T20:01:56Z")

</div>

@rocco920 I’m Rachael with the Dradis support team. Let’s get this sorted out! What command are you running to get the start the Dradis server? (e.g. are you running in `production`?). Also, what version of Kali are you running?

---

<div class="post-metadata">

**Author:** ![DamienDaco](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@DamienDaco](https://discuss.dradis.com/u/DamienDaco)\
**Post date:** [August 16, 2017, 9:25am UTC](https://discuss.dradis.com/t/secure-connection-failed/483/3 "2017-08-16T09:25:22Z")

</div>

Hi, I’m having the same issue.  
An error occurred during a connection to localhost:3000. SSL received a record that exceeded the maximum permissible length. Error code: SSL\_ERROR\_RX\_RECORD\_TOO\_LONG

I found a temporary fix by using http instead of https. This isn’t ok in the long run however.

I followed the Kali instructions very carefully.  
I’m using the latest Kali, fully updated and everything.

This is the console output when I start the rails server:

```
root@kali:/usr/lib/dradis-ce/bin# bundle exec rails server
=> Booting Thin
=> Rails 5.1.3 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on localhost:3000, CTRL+C to stop

```

Notice that the server is using http, not https.  
By the way, during the dradis-ce setup, I didn’t notice any certificate creation.

N.B. I don’t know if it is related or not to the following problem, but it sounds similar.

> <https://stackoverflow.com/questions/13126781/rails-production-mode-ssl-received-a-record-that-exceeded-the-maximum-permissib>

Regards  
Damien

---

<div class="post-metadata">

**Author:** ![xavi](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dradis.com/xavi/32/102_2.png) [@xavi](https://discuss.dradis.com/u/xavi)\
**Post date:** [August 25, 2017, 9:17am UTC](https://discuss.dradis.com/t/secure-connection-failed/483/4 "2017-08-25T09:17:38Z")

</div>

The problem/solution is what @DamienDaco’s post says.

In production mode, Dradis/Rails forces to use https.  
But in production mode the idea is to have in front of the ruby server a web server (nginx?) with ssl enabled.

If you want to use production mode in your local environment, you can:

- disable ssl: edit `environment/production.rb` and set `config.force_ssl = false`
- enable ssl in your ruby web server. If you are running `thin` @DamienDaco it looks like  
it is as simple as running `bundle exec thin start --ssl`

Also, If you run once the app in production/https, and later want to rollback to development/http, you may notice that the browser (chrome) keeps redirecting you the the https version. This is due to the fact that `config.force_ssl = true` sets the HSTS header. This may be disabled by visiting `chrome://net-internals/#hsts` or by reloading with “Empty Cache and Hard Reload” (both solutions detailed here: [Google Chrome redirecting localhost to https - Stack Overflow](https://stackoverflow.com/questions/25277457/google-chrome-redirecting-localhost-to-https))

---

<div class="post-metadata">

**Author:** ![sboddepalli](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@sboddepalli](https://discuss.dradis.com/u/sboddepalli)\
**Post date:** [September 10, 2018, 12:07pm UTC](https://discuss.dradis.com/t/secure-connection-failed/483/5 "2018-09-10T12:07:08Z")

</div>

Hi xavi,

there was a typo in the solution. Requesting you to change it.

Actual: \* diable ssl: edit `environment/profuction.rb` and set `config.force_ssl = false`  
Expected: \* diable ssl: edit `environment/production.rb` and set `config.force_ssl = false`

Change: production instead profuction

---

<div class="post-metadata">

**Author:** ![rachkor](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dradis.com/rachkor/32/51_2.png) [@rachkor](https://discuss.dradis.com/u/rachkor)\
**Post date:** [September 12, 2018, 7:33pm UTC](https://discuss.dradis.com/t/secure-connection-failed/483/6 "2018-09-12T19:33:34Z")

</div>

@sboddepalli, thanks for catching that! I was able to fix the typo in @xavi’s response and I think all is well now. Anything else we can help with?

---

<div class="post-metadata">

**Author:** ![sboddepalli](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@sboddepalli](https://discuss.dradis.com/u/sboddepalli)\
**Post date:** [September 17, 2018, 8:23am UTC](https://discuss.dradis.com/t/secure-connection-failed/483/7 "2018-09-17T08:23:43Z")

</div>

@rachkor, Thank you for your ownership and prompt response.

Sincerely,  
Sasi
