Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Cannot start Mosquitto 1.6.2 in Kubernetes

I might be wrong, but it seems to me that the Dockerfile has a problem
here. In the build configuration of the lws library it says:


 LWS_WITH_STATIC = ON
 LWS_WITH_SHARED = OFF

And in the build for mosquitto is says:

cc -L/build/lws/lib -Wl,--dynamic-list=linker.syms mosquitto.o
alias_mosq.o bridge.o conf.o conf_includedir.o context.o database.o
handle_auth.o handle_connack.o handle_connect.o handle_disconnect.o
handle_ping.o handle_pubackcomp.o handle_publish.o handle_pubrec.o
handle_pubrel.o handle_suback.o handle_subscribe.o handle_unsuback.o
handle_unsubscribe.o logging.o loop.o memory_mosq.o net.o net_mosq.o
net_mosq_ocsp.o packet_datatypes.o packet_mosq.o property_broker.o
property_mosq.o persist_read.o persist_read_v234.o persist_read_v5.o
persist_write.o persist_write_v5.o plugin.o read_handle.o security.o
security_default.o send_auth.o send_connack.o send_connect.o
send_disconnect.o send_mosq.o send_publish.o send_suback.o
send_subscribe.o send_unsuback.o send_unsubscribe.o service.o
session_expiry.o signals.o subs.o sys_tree.o time_mosq.o tls_mosq.o
utf8_mosq.o util_mosq.o util_topic.o websockets.o will_delay.o
will_mosq.o -o mosquitto  -ldl -lm -lrt -lssl -lcrypto -lwebsockets

Note the '-lwebsockets' at the end. As far as I know, this includes a
dynamic link to that particular library.

But, ugh! I must be wrong. I freshly built the image, stepped into it,
install binutils and:

/mosquitto/config # ldd /usr/sbin/mosquitto 
	/lib/ld-musl-x86_64.so.1 (0x7f27377d4000)
	libssl.so.45 => /lib/libssl.so.45 (0x7f2737337000)
	libcrypto.so.43 => /lib/libcrypto.so.43 (0x7f2736f8c000)
	libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1
(0x7f27377d4000)
/mosquitto/config # 


And:

/mosquitto/config # /usr/sbin/mosquitto -c mosquitto.conf 
1560534967: mosquitto version 1.6.2 starting
1560534967: Config loaded from mosquitto.conf.
1560534967: Opening websockets listen socket on port 9001.

Strange. Sorry, no solution for your problem from my side, my first
thought about a problem in the Dockerfile was wrong.


Cheers,
Wolfgang










On Fri, 14 Jun 2019 17:44:12 +0200 (CEST)
peyrton.david@xxxxxxx wrote:

> I'm using the dockerfile
> https://github.com/eclipse/mosquitto/blob/master/docker/1.6/Dockerfile 
> 
> The dowload and build of the websocket library is part of it, from
> what I can see. 
> 
> Thank you for your prompt answer. 
> Regards. 
> David 
> 
> ----- Mail original -----
> 
> > De: "Wolfgang Hottgenroth" <wolfgang.hottgenroth@xxxxxxxxxx>
> > À: "General development discussions for the mosquitto project"
> > <mosquitto-dev@xxxxxxxxxxx>
> > Envoyé: Vendredi 14 Juin 2019 17:30:39
> > Objet: Re: [mosquitto-dev] Cannot start Mosquitto 1.6.2 in
> > Kubernetes  
> 
> > I would assume that the websockets library is not installed in your
> > image. Have you created it on your own? Is it a Debian based one?
> > Then you would just need to install the libwebsockets8 package in
> > your Dockerfile.  
> 
> > Cheers, Wolfgang  
> 
> > Am 14.06.2019 um 17:13 schrieb peyrton.david@xxxxxxx :  
> 
> > > Hello,  
> >   
> > > I'm very new to Mosquitto. So, forgive me if the answer to my
> > > question is obvious...  
> >   
> 
> > > I'm running Mosquitto 1.6.2 on Kubernetes.  
> >   
> > > It fails to start with the log :  
> >   
> > > Error loading shared library libwebsockets.so.12: No such file or
> > > directory (needed by /usr/sbin/mosquitto)  
> >   
> > > Error relocating /usr/sbin/mosquitto: lws_get_context: symbol not
> > > found  
> >   
> > > Error relocating /usr/sbin/mosquitto: lws_hdr_total_length: symbol
> > > not found  
> >   
> > > ...  
> >   
> 
> > > It used to work, but it is failing since I built and ran it
> > > locally on my Linux.  
> >   
> 
> > > I cleared all images in my docker repository. But the issue is
> > > still
> > > here.  
> >   
> 
> > > I don't understand why a local build can impact a build in a
> > > docker image.  
> >   
> 
> > > Do you have any idea ?  
> >   
> 
> > > Regards.  
> >   
> > > David  
> >   
> 
> > > _______________________________________________  
> >   
> > > mosquitto-dev mailing list  
> >   
> > > mosquitto-dev@xxxxxxxxxxx  
> >   
> > > To change your delivery options, retrieve your password, or
> > > unsubscribe from this list, visit  
> >   
> > > https://www.eclipse.org/mailman/listinfo/mosquitto-dev  
> > 
> > _______________________________________________
> > mosquitto-dev mailing list
> > mosquitto-dev@xxxxxxxxxxx
> > To change your delivery options, retrieve your password, or
> > unsubscribe from this list, visit
> > https://www.eclipse.org/mailman/listinfo/mosquitto-dev  



Back to the top