Given that you have an instance of ActiveMQ Artemis on the same machine as the STOMP client I recommend you do something like this:
> cd <ARTEMIS_INSTANCE_HOME>/bin > ./artemis producer --url tcp://remote-machine:61616 --user yourUser --password yourPassword Let me know if that works. Justin On Fri, Aug 7, 2020 at 1:49 PM Christopher Pisz <[email protected]> wrote: > I just followed the instructions on > > https://activemq.apache.org/components/artemis/documentation/2.0.0/using-server.html > The broker is the default. Nothing is edited. > > " > > cd /var/lib > ${ARTEMIS_HOME}/bin/artemis create mybroker > /var/lib/mybroker/bin/artemis run > > > On Fri, Aug 7, 2020 at 2:45 PM Timothy Bish <[email protected]> wrote: > > > On 8/7/20 2:40 PM, Christopher Pisz wrote: > > > What I need: > > > To determine if I can connect to activemq using stomp over websockets > > from > > > a remote machine, with a client I wrote. > > > > > > What I did: > > > I wrote my own stomp over websockets client in C++ and built it for > > > CentOS7, on my home computer. > > > I installed an ActiveMQ on a remote machine through ssh. > > > I created the ActiveMQ default broker according to the docs > > > I attempted to connect with my client > > > > Providing the broker configuration you used will help folks answer with > > insights into what might be wrong there. > > > > > > > What happened: > > > Connection refused > > > > > > What I need: > > > To figure out why connection is refused > > > > > > Ideas of my own: > > > Does the client work on the local machine with the same version and > > > configuration of ActiveMQ? Yes > > > Does someone else's client connect to the remote machine? I dunno, I > need > > > someone else's client > > > Maybe a client that uses something other than websockets will prove > that > > > the "same origin policy" in the beginning of the email, is indeed the > > > problem? I dunno. I need a client that uses another protocol. > > > > > > > > > On Fri, Aug 7, 2020 at 2:33 PM Justin Bertram <[email protected]> > > wrote: > > > > > >> You're not really explaining what you need. > > >> > > >> You say you need "a built client that connects with a different > > protocol." > > >> What exactly do you mean by "built"? Does it have to be a binary? If > so, > > >> what platform does the binary need to be built for? If it doesn't have > > to > > >> be a binary would a python or perl script work? Also, what exactly do > > you > > >> mean by "different protocol"? Do you mean a different protocol from > > STOMP? > > >> If so, I thought you were specifically trying to test STOMP > connections. > > >> How would testing another protocol tell you if STOMP connections are > > >> working? > > >> > > >> It's hard (if not impossible) to provide clear guidance to vague > > questions. > > >> > > >> If it helps, ActiveMQ Artemis ships with command-line clients you can > > use > > >> to quickly test a broker. Just type "./artemis help" from the broker > > >> instance's "bin" directory and look for details about the "producer" > and > > >> "consumer" commands. > > >> > > >> > > >> Justin > > >> > > >> On Fri, Aug 7, 2020 at 1:08 PM Christopher Pisz < > > [email protected] > > >> wrote: > > >> > > >>> Yes, I did a Google search. > > >>> It yields code examples or javascript libs. I need a built client > that > > >>> connects with a different protocol, so I can quickly test that the > > server > > >>> will allow clients to connect at all. > > >>> > > >>> > > >>> > > >>> On Fri, Aug 7, 2020 at 2:05 PM Justin Bertram <[email protected]> > > >> wrote: > > >>>> There are lots of STOMP clients for various platforms written in > > >> various > > >>>> programming languages many of which do not use websockets. What > > exactly > > >>> do > > >>>> you need? Did you try doing an Internet search? > > >>>> > > >>>> > > >>>> Justin > > >>>> > > >>>> On Fri, Aug 7, 2020 at 1:00 PM Christopher Pisz < > > >>> [email protected] > > >>>> wrote: > > >>>> > > >>>>> So I installed ActiveMQ on a remote machine this morning. > > >>>>> Created the default broker. > > >>>>> Attempted to connect with the client I wrote using websockets. > > >>>>> Connection is refused. > > >>>>> > > >>>>> I then tried running the examples/protocols/stomp/stomp-websockets > > >>>> example > > >>>>> Attempted to connect with the client I write using websockets > > >>>>> Connection is refused. > > >>>>> Attempted to connect using the index.html from my machine rather > than > > >>> the > > >>>>> remote(as localhost there) > > >>>>> Connection refused. > > >>>>> > > >>>>> I don't know what to do. > > >>>>> Is there another premade client I can connect with that doesn't use > > >>>>> websockets, so I can at least narrow it down and see if the server > > >>> works > > >>>> at > > >>>>> all? > > >>>>> Any other suggestions? > > >>>>> > > >>>>> > > >>>>> > > >>>>> On Wed, Jul 29, 2020 at 5:21 PM Wayne Robinson < > > >>> [email protected] > > >>>>> wrote: > > >>>>> > > >>>>>> Websockets don’t use the same-origin policies that other AJAX > > >>> requests > > >>>>> do. > > >>>>>> You will most likely need to serve them via TLS to prevent browser > > >>>>> errors, > > >>>>>> but there’s nothing special you need to do to setup CORS. > > >>>>>> > > >>>>>> On Thu, 30 Jul 2020 at 1:47 am, Christopher Pisz < > > >>>>>> [email protected]> > > >>>>>> wrote: > > >>>>>> > > >>>>>>> I have a process that runs in California that wants to talk to a > > >>>>> process > > >>>>>> in > > >>>>>>> New York, using Stomp over Websockets. > > >>>>>>> > > >>>>>>> Also note that my process is not a web app, but I implemented a > > >>> stomp > > >>>>>> over > > >>>>>>> websocket client in C++, in order to connect things up to my > > >>> backend. > > >>>>>> Maybe > > >>>>>>> this was or wasn't a good idea. So, I want my client to talk to > > >> the > > >>>>>> server > > >>>>>>> and subscribe, where their client pushed messages. > > >>>>>>> > > >>>>>>> I was implementing my own server when I saw that ApacheMQ > > >> supported > > >>>>> Stomp > > >>>>>>> over Websockets. So, I started reading the docs. > > >>>>>>> > > >>>>>>> It says: > > >>>>>>> > > >>>>>>> One thing worth noting is that web sockets (just as Ajax) > > >>> implements > > >>>> ? > > >>>>>>> the same origin policy, so you can access only brokers running on > > >>>> the > > > >>>>>>> same host as the web application running the client. > > >>>>>>> > > >>>>>>> Is this a limitation of the server or the web client? > > >>>>>>> > > >>>>>>> With that limitation, if I understand right, the server is not > > >>> going > > >>>> to > > >>>>>>> accept websocket connections from a client, of any kind, that is > > >>> not > > >>>> on > > >>>>>> the > > >>>>>>> same machine? > > >>>>>>> > > >>>>>>> I am not sure I see the point of that... > > >>>>>>> > > >>>>>>> If that is indeed its meaning, then how do I get around it in > > >> order > > >>>> to > > >>>>>>> implement my scenario? > > >>>>>>> > > > > -- > > Tim Bish > > > > >
