https issue - mender server

517 views
Skip to first unread message

Naveen N

unread,
Nov 9, 2017, 12:48:02 PM11/9/17
to Mender List mender.io
Hello all,


I have problem visting mender server through https.

my mender.conf

{
"InventoryPollIntervalSeconds": 1800,
 "RootfsPartA": "/dev/mmcblk1p2",
  "RootfsPartB": "/dev/mmcblk1p3",
  "UpdatePollIntervalSeconds": 1800,
  "TenantToken" : "dummy" ,
  "ServerURL": "https://mender.mydomain.com",
  "ServerCertificate": "/etc/mender/server.crt"
}


added following in local.conf

FILESEXTRAPATHS_prepend_pn-mender := "/var/sslcert:"
SRC_URI_append_pn-mender = " file://server.crt"

Any other thing I have to do to make it work.

Thanks in advance,
Naveen

Kristian Amlie

unread,
Nov 10, 2017, 4:56:14 AM11/10/17
to men...@lists.mender.io, Naveen N
On 09/11/17 18:48, Naveen N wrote:
> Hello all,
>
>
> I have problem visting mender server through https.

When you say problem, do you mean using the browser? Or the Mender client?

> my mender.conf
>
> {
> "InventoryPollIntervalSeconds": 1800,
>  "RootfsPartA": "/dev/mmcblk1p2",
>   "RootfsPartB": "/dev/mmcblk1p3",
>   "UpdatePollIntervalSeconds": 1800,
>   "TenantToken" : "dummy" ,
>   "ServerURL": "https://mender.mydomain.com",
>   "ServerCertificate": "/etc/mender/server.crt"
> }
>
>
> added following in local.conf
>
> FILESEXTRAPATHS_prepend_pn-mender := "/var/sslcert:"
> SRC_URI_append_pn-mender = " file://server.crt"

All this looks good to me. If it's the client you have problems with,
can you post the logs you get by running "journalctl -u mender" there?

--
Kristian

navi

unread,
Nov 13, 2017, 12:22:34 PM11/13/17
to Mender List mender.io
Thanks for the response!

Attached image explains the issue.

The error message from the device logs looks like "failed to execute authorization request connection refused "
1.png

navi

unread,
Nov 13, 2017, 12:44:29 PM11/13/17
to Mender List mender.io
Adding to that while following the steps from 


I get this error while running " git log --oneline 1.2.x..HEAD"

Naveen

fatal: ambiguous argument '1.2.x..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

On Thursday, November 9, 2017 at 12:48:02 PM UTC-5, navi wrote:

Drew Moseley

unread,
Nov 13, 2017, 1:03:58 PM11/13/17
to men...@lists.mender.io

Hi Naveen,

I am guessing your concern is regarding the "Not secure" designation in the browser URL bar.  That's normal for systems using self-signed certificates since there is no means to verify that they are who they claim to be.  That is normal for testing environments and is how our demo layer is setup by default.  The transport is encrypted but the browser cannot validate your certificate with a CA. There are options such as https://letsencrypt.org/ for getting signed/authenticated certificates if you need that.

Drew

--
You received this message because you are subscribed to the Google Groups "Mender List mender.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mender+un...@lists.mender.io.
To post to this group, send email to men...@lists.mender.io.
Visit this group at https://groups.google.com/a/lists.mender.io/group/mender/.

Drew Moseley

unread,
Nov 13, 2017, 1:54:29 PM11/13/17
to men...@lists.mender.io

Naveen,

Thanks for this report.  The correct command on the 1.2 release is "git log --oneline 1.2.1..HEAD" and for 1.1 it is "git log --oneline 1.1.3..HEAD"

I've submitted documentation updates for these.

Drew

--

Rod Milton

unread,
Jul 13, 2018, 10:09:22 PM7/13/18
to Mender List mender.io
Having same problem. Went to letsencrypt. followed instructions and (in /etc/letsencrypt) ended up with:
./csr/0000_csr-certbot.pem
./keys/0000_key-certbot.pem
./archive/MyHostName.net:
total 16
-rw-r--r-- 1 root root 2163 Jul 14 00:47 cert1.pem
-rw-r--r-- 1 root root 1647 Jul 14 00:47 chain1.pem
-rw-r--r-- 1 root root 3810 Jul 14 00:47 fullchain1.pem
-rw-r--r-- 1 root root 1704 Jul 14 00:47 privkey1.pem

Having trouble trying to integrate these files w/ mender (was using self-signed cert without issues).
Where do these files go on the server? Do any files need to go on the target (ie replacing server.crt)?

  -rod

Kristian Amlie

unread,
Jul 16, 2018, 3:43:56 AM7/16/18
to men...@lists.mender.io, Rod Milton
On 14/07/18 04:09, Rod Milton wrote:
> Having same problem. Went to letsencrypt. followed instructions and (in
> /etc/letsencrypt) ended up with:
> ./csr/0000_csr-certbot.pem
> ./keys/0000_key-certbot.pem
> ./archive/MyHostName.net:
> total 16
> -rw-r--r-- 1 root root 2163 Jul 14 00:47 cert1.pem
> -rw-r--r-- 1 root root 1647 Jul 14 00:47 chain1.pem
> -rw-r--r-- 1 root root 3810 Jul 14 00:47 fullchain1.pem
> -rw-r--r-- 1 root root 1704 Jul 14 00:47 privkey1.pem
>
> Having trouble trying to integrate these files w/ mender (was using
> self-signed cert without issues).
> Where do these files go on the server? Do any files need to go on the
> target (ie replacing server.crt)?

There is currently a known issue where LetsEncrypt certificates are not
accepted by the client out of the box. Until that's fixed however, you
can work around the issue as you describe, by replacing server.crt and
making sure it's listed in the mender.conf file.

With meta-mender, the easiest approach is simply to include the file
server.crt in SRC_URI.

--
Kristian

signature.asc

Matthijs ter Woord

unread,
Jul 16, 2018, 3:57:19 AM7/16/18
to mender, Rod Milton
Just my 2 cents here..
I'm using LetsEncrypt certificates and it works fine...


--
You received this message because you are subscribed to the Google Groups "Mender List mender.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mender+unsubscribe@lists.mender.io.

Kristian Amlie

unread,
Jul 16, 2018, 4:04:01 AM7/16/18
to men...@lists.mender.io, Matthijs ter Woord, Rod Milton
On 16/07/18 09:56, Matthijs ter Woord wrote:
> Just my 2 cents here..
> I'm using LetsEncrypt certificates and it works fine...

Interesting... We are having internal issues with LetsEncrypt as well,
so Rod is not the only one. But I guess the issue is more complex than
first assumed.

--
Kristian



> 2018-07-16 9:43 GMT+02:00 Kristian Amlie <kristia...@northern.tech
> <mailto:kristia...@northern.tech>>:
> Groups "Mender List mender.io <http://mender.io>" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to mender+un...@lists.mender.io
> <mailto:mender%2Bunsu...@lists.mender.io>.
> To post to this group, send email to men...@lists.mender.io
> <mailto:men...@lists.mender.io>.
> <https://groups.google.com/a/lists.mender.io/group/mender/>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Mender List mender.io" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to mender+un...@lists.mender.io
> <mailto:mender+un...@lists.mender.io>.
> To post to this group, send email to men...@lists.mender.io
> <mailto:men...@lists.mender.io>.
signature.asc

Matthijs ter Woord

unread,
Jul 16, 2018, 4:05:14 AM7/16/18
to Kristian Amlie, mender, Rod Milton
I had to use the same certificates on both the api gateway and the storage service. I can look tonight, if you want...


2018-07-16 10:03 GMT+02:00 Kristian Amlie <kristia...@northern.tech>:
On 16/07/18 09:56, Matthijs ter Woord wrote:
> Just my 2 cents here..
> I'm using LetsEncrypt certificates and it works fine...

Interesting... We are having internal issues with LetsEncrypt as well,
so Rod is not the only one. But I guess the issue is more complex than
first assumed.

--
Kristian



> 2018-07-16 9:43 GMT+02:00 Kristian Amlie <kristia...@northern.tech
>     send an email to mender+unsubscribe@lists.mender.io
>     <mailto:mender%2Bunsubscribe@lists.mender.io>.

>     To post to this group, send email to men...@lists.mender.io
>     <mailto:men...@lists.mender.io>.
>     Visit this group at
>     https://groups.google.com/a/lists.mender.io/group/mender/
>     <https://groups.google.com/a/lists.mender.io/group/mender/>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Mender List mender.io" group.
> To unsubscribe from this group and stop receiving emails from it, send

Kristian Amlie

unread,
Jul 16, 2018, 4:12:53 AM7/16/18
to Matthijs ter Woord, mender, Rod Milton
On 16/07/18 10:04, Matthijs ter Woord wrote:
> I had to use the same certificates on both the api gateway and the
> storage service. I can look tonight, if you want...

Yes, if you can, find out if you have this certificate listed in
ServerCertificate in mender.conf or not. It may be that it works because
it is specified there.

--
Kristian


> 2018-07-16 10:03 GMT+02:00 Kristian Amlie <kristia...@northern.tech
> <mailto:kristia...@northern.tech>>:
>
> On 16/07/18 09:56, Matthijs ter Woord wrote:
> > Just my 2 cents here..
> > I'm using LetsEncrypt certificates and it works fine...
>
> Interesting... We are having internal issues with LetsEncrypt as well,
> so Rod is not the only one. But I guess the issue is more complex than
> first assumed.
>
> --
> Kristian
>
>
>
> > 2018-07-16 9:43 GMT+02:00 Kristian Amlie <kristia...@northern.tech
> > <mailto:kristia...@northern.tech
> <mailto:kristia...@northern.tech>>>:
> >     send an email to mender+un...@lists.mender.io
> <mailto:mender%2Bunsu...@lists.mender.io>
> >     <mailto:mender%2Bunsu...@lists.mender.io
> <mailto:mender%252Buns...@lists.mender.io>>.
> >     To post to this group, send email to men...@lists.mender.io <mailto:men...@lists.mender.io>
> >     <mailto:men...@lists.mender.io <mailto:men...@lists.mender.io>>.
> >     Visit this group at
> >     https://groups.google.com/a/lists.mender.io/group/mender/
> <https://groups.google.com/a/lists.mender.io/group/mender/>
> >     <https://groups.google.com/a/lists.mender.io/group/mender/
> <https://groups.google.com/a/lists.mender.io/group/mender/>>.
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Mender List mender.io <http://mender.io>" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to mender+un...@lists.mender.io
> <mailto:mender%2Bunsu...@lists.mender.io>
> > <mailto:mender+un...@lists.mender.io
> <mailto:mender%2Bunsu...@lists.mender.io>>.
> > To post to this group, send email to men...@lists.mender.io <mailto:men...@lists.mender.io>
> > <mailto:men...@lists.mender.io <mailto:men...@lists.mender.io>>.
signature.asc

Will Moffat

unread,
Jul 16, 2018, 7:12:23 AM7/16/18
to men...@lists.mender.io
Hi Rod,

I've been using Mender + LetsEncrypt without problems.
I use the following config:

mender-api-gateway:
volumes:
- /etc/letsencrypt/live/mender.muuselabs.com/fullchain.pem:/var/www/mendersoftware/cert/cert.crt:ro
- /etc/letsencrypt/live/mender.muuselabs.com/privkey.pem:/var/www/mendersoftware/cert/private.key:ro

storage-proxy:
volumes:
- /etc/letsencrypt/live/s3.muuselabs.com/fullchain.pem:/var/www/storage-proxy/cert/cert.crt:ro
- /etc/letsencrypt/live/s3.muuselabs.com/privkey.pem:/var/www/storage-proxy/cert/private.key:ro

mender-deployments:
volumes:
- /etc/letsencrypt/live/s3.muuselabs.com/fullchain.pem:/etc/ssl/certs/storage-proxy.crt:ro


On the device, my server.crt is just a dummy:
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
I'm not sure if this is still required.

regards,
--Will
--
regards,
--Will

Matthijs ter Woord

unread,
Jul 16, 2018, 8:24:26 AM7/16/18
to mender
If I recall correctly, I do the docker config like Will has, but have no thing on my device..



> To post to this group, send email to men...@lists.mender.io.
> Visit this group at
> https://groups.google.com/a/lists.mender.io/group/mender/.



--
regards,
--Will

--
You received this message because you are subscribed to the Google Groups "Mender List mender.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mender+unsubscribe@lists.mender.io.

Kristian Amlie

unread,
Jul 16, 2018, 8:54:05 AM7/16/18
to men...@lists.mender.io, Will Moffat
On 16/07/18 13:12, Will Moffat wrote:
> Hi Rod,
>
> I've been using Mender + LetsEncrypt without problems.
> I use the following config:
>
> mender-api-gateway:
> volumes:
> - /etc/letsencrypt/live/mender.muuselabs.com/fullchain.pem:/var/www/mendersoftware/cert/cert.crt:ro
> - /etc/letsencrypt/live/mender.muuselabs.com/privkey.pem:/var/www/mendersoftware/cert/private.key:ro
>
> storage-proxy:
> volumes:
> - /etc/letsencrypt/live/s3.muuselabs.com/fullchain.pem:/var/www/storage-proxy/cert/cert.crt:ro
> - /etc/letsencrypt/live/s3.muuselabs.com/privkey.pem:/var/www/storage-proxy/cert/private.key:ro
>
> mender-deployments:
> volumes:
> - /etc/letsencrypt/live/s3.muuselabs.com/fullchain.pem:/etc/ssl/certs/storage-proxy.crt:ro
>
>
> On the device, my server.crt is just a dummy:
> -----BEGIN CERTIFICATE-----
> -----END CERTIFICATE-----
> -----BEGIN CERTIFICATE-----
> -----END CERTIFICATE-----
> I'm not sure if this is still required.

Is this using Yocto to build the client image?

--
Kristian

signature.asc

Will Moffat

unread,
Jul 16, 2018, 10:59:47 AM7/16/18
to Kristian Amlie, men...@lists.mender.io
Hi Kristian,

>> On the device, my server.crt is just a dummy:
>> -----BEGIN CERTIFICATE-----
>> -----END CERTIFICATE-----
>> -----BEGIN CERTIFICATE-----
>> -----END CERTIFICATE-----
>> I'm not sure if this is still required.
>
> Is this using Yocto to build the client image?

Yes and it ends up in /etc/mender/server.crt

regards,
--Will

Rod Milton

unread,
Jul 16, 2018, 5:08:29 PM7/16/18
to Mender List mender.io, rmilt...@gmail.com
Thanks for getting back to me, sorry about being so thick, but certs are new to me, I'm a low level kernel guy....

I currently have a self-signed cert (created on my mender server using keygen). I copied server.crt to to by build system, created a mender_%.bbappend file, and the cert is created in /etc/mender/server.crt.

File server.crt is concatenation of api-gateway/cert.crt and storage-proxy/cert.crt
I'm assuming some (which ones?) of the files created by letsencrypt are appended to server.crt? Do I need to delete current cert for api-gateway or storage-proxy?

You mentioned LetEncrypt certs seems to have a problem. I'm not tied to letsencrypt, just the first one which showed up in google search, is there a better (free) alternative?

thanks

Rod Milton

unread,
Jul 16, 2018, 5:13:40 PM7/16/18
to Mender List mender.io, kristia...@northern.tech
Thanks Will, didn't see this when posting previous message, I'll try this.

Rod Milton

unread,
Jul 17, 2018, 8:29:51 PM7/17/18
to Mender List mender.io, kristia...@northern.tech
Thanks Will, this did the trick.

-rod
Reply all
Reply to author
Forward
0 new messages