Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

UDS (Unix Socket Domain) issue #32

Open
santharamselva opened this issue Sep 3, 2019 · 3 comments
Open

UDS (Unix Socket Domain) issue #32

santharamselva opened this issue Sep 3, 2019 · 3 comments

Comments

@santharamselva
Copy link

santharamselva commented Sep 3, 2019

Hi,

I am new to C++. I have tried this API. It works good and code is maintained very well. I have tried both HTTP and UDP, it works fine. But I am getting error with UDS. I am not sure, can you please help me to understand and how to fix?

My URL is
std::string url = "unix:///tmp/influxdb.sock";

And the error is

terminate called after throwing an instance of boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >
what(): send_to: Protocol wrong type for socket

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

Thanks in advance.

@awegrzyn
Copy link
Owner

awegrzyn commented Sep 3, 2019

Hi,
There are 2 types of Unix sockets: stream (as TCP) and datagram (as UDP). As written in the README I'm using Unix datagram socket you are probably trying to connect to stream socket.

@santharamselva
Copy link
Author

Hi,
I am trying run the beachmark test file. But I am not getting succeed with Unix socket. Could you please share me the sample code to write data via UDS? I couldn't find one.

Thanks

@santharamselva
Copy link
Author

Hi,

I have tried with CURL like curl -XPOST --unix-socket /tmp/influxdb.sock http:/localhost/write?db=test instead of boost.

Is it good practice?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants