Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to attach jaxl daemon with jaxlctl tool #46

Open
jacksun1203 opened this issue Apr 23, 2014 · 5 comments
Open

How to attach jaxl daemon with jaxlctl tool #46

jacksun1203 opened this issue Apr 23, 2014 · 5 comments

Comments

@jacksun1203
Copy link

I created a jaxl instance by running echo_bot.php
> php echo_bot.php myjid@xxxx pass PLAIN

it seems working well and I got below message

jaxl:188 - 2014-04-23 10:00:11 - created pid file /Volumes/Central/Users/jsun/Sites/JAXL/.jaxl/run/jaxl_74164.pid
jaxl:200 - 2014-04-23 10:00:11 - dns srv lookup for myserver.com
jaxl_socket_client:95 - 2014-04-23 10:00:11 - trying tcp://myserver.com:5222
jaxl 1> jaxl_socket_server:63 - 2014-04-23 10:00:11 - socket ready to accept on path unix:///path/JAXL/.jaxl/sock/jaxl_74164.sock

Next, I start jaxlctl

./jaxlctl debug unix:///Volumes/Central/Users/jsun/Sites/JAXL/.jaxl/sock/jaxl_74164.sock

But response I got is :

jaxl_socket_client:95 - 2014-04-23 10:48:23 - trying unix://unix:///Volumes/Central/Users/jsun/Sites/JAXL/.jaxl/sock/jaxl_74164.sock
jaxl_socket_client:115 - 2014-04-23 10:48:23 - unable to connect unix://unix:///Volumes/Central/Users/jsun/Sites/JAXL/.jaxl/sock/jaxl_74164.sock with error no: 2, error str: No such file or directory

Did I use the wrong command?

@jacksun1203
Copy link
Author

Actually, JAXL told me the socket file was created but I can not find it under .jaxl/sock/ directory. What's the possible issue to cause this?

@abhinavsingh
Copy link
Member

Sock file is created when client/component starts, deleted as they exit.

For jaxlctl debug/attach/shell functionality consult http://jaxl.readthedocs.org/en/latest/users/jaxlctl.html

@jacksun1203
Copy link
Author

But there is no "attach" option when I type "./jaxlctl help". I am using jaxl v3.0.1.

ogin2:JAXL jsun$ ./jaxlctl help
Usage: ./jaxlctl command [options...]

Commands:
help This help text
debug Attach a debug console to a running JAXL daemon
shell Open up Jaxl shell emulator

And the strange thing is the echo_bot is still running well. Why the socket file is deleted?

echo_bot:127 - 2014-04-24 01:29:06 - [email protected]/jaxl#85c196d77d8f40cf0d7a004ae5572e1d is now available (dnd)

@jacksun1203
Copy link
Author

Hi,
Now I can get the sock file. But I get below error message when trying jaxlctl debug. It complains undefined variable, client. Could you point me where I am wrong? Thanks!

$ ./jaxlctl debug .jaxl/sock/jaxl_3961
jaxl_socket_client:95 - 2014-04-30 10:39:55 - trying unix://.jaxl/sock/jaxl_3961
jaxl 2> global $client;
jaxl 3> $client->send_chat_msg('[email protected]', 'Hello JAXL');
jaxl_socket_client:175 - 2014-04-30 10:40:43 - socket eof, disconnecting

jaxl 1> jaxl_exception:48 - 2014-04-30 10:40:43 - got jaxl exception construct with Undefined variable: client, 8, /to_my_path/JAXL-3.x/jaxl.php(458) : eval()'d code, 1

@ghoulich
Copy link

ghoulich commented Oct 8, 2014

I encountered this problem too, but no one can give a solution or any useful suggestions ...

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

No branches or pull requests

4 participants