Discussion:
[rabbitmq-users] RabbitMq Client Integration With Google App Engine (PHP) (Codeigniter)
Sumeet Gohil
2015-02-22 02:14:03 UTC
Permalink
I am running a php application using Codeigniter and successfully uploaded
to Google App Engine & Running ..

I am facing issue while integrating RabbitMq client library, It's working
fine on local system after deploying it's not!

And after using try..catch i found..


PhpAmqpLib\Exception\AMQPRuntimeException Object ( [message:protected] =>
Error Connecting to server(0): [string:Exception:private] => [code:protected
] => 0 [file:protected] => /base/data/home/apps/s~pge-2015/
1.382317962180174380/website/application/third_party/PhpAmqpLib/vendor/
videlalvaro/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php [line:protected] =>
27 [trace:Exception:private] => Array ( [0] => Array ( [file] => /base/data/
home/apps/s~pge-2015/1.382317962180174380/website/application/third_party/
PhpAmqpLib/vendor/videlalvaro/php-amqplib/PhpAmqpLib/Connection/
AMQPStreamConnection.php [line] => 21 [function] => __construct [class] =>
PhpAmqpLib\Wire\IO\StreamIO [type] => -> [args] => Array ( [0] => 130.211.
180.255 [1] => 5672 [2] => 3 [3] => 3 [4] => ) ) [1] => Array ( [file] => /
base/data/home/apps/s~pge-2015/1.382317962180174380/website/application/
libraries/queue.php [line] => 45 [function] => __construct [class] =>
PhpAmqpLib\Connection\AMQPStreamConnection [type] => -> [args] => Array ( [0
] => 130.211.180.255 [1] => 5672 [2] => -------- [3] => *******) ) [2] =>
Array ( [file] => /base/data/home/apps/s~pge-2015/1.382317962180174380/
website/system/core/Loader.php [line] => 1095 [function] => __construct [
class] => Queue [type] => -> [args] => Array ( [0] => Array ( [host] =>
130.211.180.255 [port] => 5672 [user] => ---------[pass] => ****** ) ) ) [3]
=> Array ( [file] => /base/data/home/apps/s~pge-2015/1.382317962180174380/
website/system/core/Loader.php [line] => 975 [function] => _ci_init_class [
class] => CI_Loader [type] => -> [args] => Array ( [0] => queue [1] => [2]
=> [3] => ) ) [4] => Array ( [file] => /base/data/home/apps/s~pge-2015/
1.382317962180174380/website/system/core/Loader.php [line] => 216 [function]
=> _ci_load_class [class] => CI_Loader [type] => -> [args] => Array ( [0] =>
queue [1] => [2] => ) ) [5] => Array ( [file] => /base/data/home/apps/s~pge-
2015/1.382317962180174380/website/application/controllers/fibonx.php [line]
=> 191 [function] => library [class] => CI_Loader [type] => -> [args] =>
Array ( [0] => queue ) ) [6] => Array ( [function] => testRabbit [class] =>
Fibonx [type] => -> [args] => Array ( ) ) [7] => Array ( [file] => /base/
data/home/apps/s~pge-2015/1.382317962180174380/website/system/core/
CodeIgniter.php [line] => 359 [function] => call_user_func_array [args] =>
Array ( [0] => Array ( [0] => Fibonx Object ( [benchmark] => CI_Benchmark
Object ( [marker] => Array ( [total_execution_time_start] => 0.82522000
1424571051 [loading_time:_base_classes_start] => 0.82523000 1424571051 [
loading_time:_base_classes_end] => 0.82905000 1424571051 [
controller_execution_time_( fibonx / testRabbit )_start] => 0.82908000
1424571051 ) ) [hooks] => CI_Hooks Object ( [enabled] => [hooks] => Array (
) [in_progress] => ) [config] => CI_Config Object ( [config] => Array ( [
base_url] => http://pge-2015.appspot.com/ [index_page] => [uri_protocol] =>
AUTO [url_suffix] => [language] => english [charset] => UTF-8
[enable_hooks] => [subclass_prefix] => MY_ [permitted_uri_chars] => a-z
0-9~%.:_\- [allow_get_array] => 1 [enable_query_strings] =>
[controller_trigger] => c [function_trigger] => m [directory_trigger] => d
[log_threshold] => 2 [log_path] => [log_date_format] => Y-m-d H:i:s
[cache_path] => [encryption_key] => F#ib0nx$ [sess_cookie_name] => fibsess
[sess_expiration] => 604800 [sess_expire_on_close] => [sess_encrypt_cookie]
=> 1 [sess_use_database] => [sess_table_name] => sessions [sess_match_ip]
=> [sess_match_useragent] => 1 [sess_time_to_update] => 300 [cookie_prefix]
=> [cookie_domain] => [cookie_path] => / [cookie_secure] =>
[global_xss_filtering] => [csrf_protection] => [csrf_token_name] =>
csrf_test_name [csrf_cookie_name] => csrf_cookie_name [csrf_expire] => 7200
[compress_output] => [time_reference] => local [rewrite_short_tags] =>
[proxy_ips] => ) [is_loaded] => Array ( ) [_config_paths] => Array ( [0] =>
application/ ) ) [log] => CI_Log Object ( [_log_path:protected] =>
application/logs/ [_threshold:protected] => 2 [_date_fmt:protected] =>
Y-m-d H:i:s [_enabled:protected] => [_levels:protected] => Array ( [ERROR]
=> 1 [DEBUG] => 2 [INFO] => 3 [ALL] => 4 ) ) [utf8] => CI_Utf8 Object ( )
[uri] => CI_URI Object ( [keyval] => Array ( ) [uri_string] => testRabbit
[segments] => Array ( [1] => testRabbit ) [rsegments] => Array ( [1] =>
fibonx [2] => testRabbit ) [config] => CI_Config Object ( [config] => Array
( [base_url] => http://pge-2015.appspot.com/ [index_page] => [uri_protocol]
=> AUTO [url_suffix] => [language] => english [charset] => UTF-8
[enable_hooks] => [subclass_prefix] => MY_ [permitted_uri_chars] => a-z
0-9~%.:_\- [allow_get_array] => 1 [enable_query_strings] =>
[controller_trigger] => c [function_trigger] => m [directory_trigger] => d
[log_threshold] => 2 [log_path] => [log_date_format] => Y-m-d H:i:s
[cache_path] => [encryption_key] => F#ib0nx$ [sess_cookie_name] => fibsess
[sess_expiration] => 604800 [sess_expire_on_close] => [sess_encrypt_cookie]
=> 1 [sess_use_database] => [sess_table_name] => sessions [sess_match_ip]
=> [sess_match_useragent] => 1 [sess_time_to_update] => 300 [cookie_prefix]
=> [cookie_domain] => [cookie_path] => / [cookie_secure] =>
[global_xss_filtering] => [csrf_protection] => [csrf_token_name] =>
csrf_test_name [csrf_cookie_name] => csrf_cookie_name [csrf_expire] => 7200
[compress_output] => [time_reference] => local [rewrite_short_tags] =>
[proxy_ips] => ) [is_loaded] => Array ( ) [_config_paths] => Array ( [0] =>
application/ ) ) ) [router] => CI_Router Object ( [config] => CI_Config
Object ( [config] => Array ( [base_url] => http://pge-2015.appspot.com/
[index_page] => [uri_protocol] => AUTO [url_suffix] => [language] =>
english [charset] => UTF-8 [enable_hooks] => [subclass_prefix] => MY_
[permitted_uri_chars] => a-z 0-9~%.:_\- [allow_get_array] => 1
[enable_query_strings] => [controller_trigger] => c [function_trigger] => m
[directory_trigger] => d [log_threshold] => 2 [log_path] =>
[log_date_format] => Y-m-d H:i:s [cache_path] => [encryption_key] =>
F#ib0nx$ [sess_cookie_name] => fibsess [sess_expiration] => 604800
[sess_expire_on_close] => [sess_encrypt_cookie] => 1 [sess_use_database] =>
[sess_table_name] => sessions [sess_match_ip] => [sess_match_useragent] =>
1 [sess_time_to_update] => 300 [cookie_prefix] => [cookie_domain] =>
[cookie_path] => / [cookie_secure] => [global_xss_filtering] =>
[csrf_protection] => [csrf_token_name] => csrf_test_name [csrf_cookie_name]
=> csrf_cookie_name [csrf_expire] => 7200 [compress_output] =>
[time_reference] => local [rewrite_short_tags] => [proxy_ips] => )
[is_loaded] => Array ( ) [_config_paths] => Array ( [0] => application/ ) )
[routes] => Array ( [default_controller] => fibonx [welcome/login] =>
welcome/login [(:any)] => fibonx/$1 [404_override] => ) [error_routes] =>
Array ( ) [class] => fibonx [method] => testRabbit [directory] =>
[default_controller] => fibonx [uri] => CI_URI Object ( [keyval] => Array (
) [uri_string] => testRabbit [segments] => Array ( [1] => testRabbit )
[rsegments] => Array ( [1] => fibonx [2] => testRabbit ) [config] =>
CI_Config Object ( [config] => Array ( [base_url] =>
http://pge-2015.appspot.com/ [index_page] => [uri_protocol] => AUTO
[url_suffix] => [language] => english [charset] => UTF-8 [enable_hooks] =>
[subclass_prefix] => MY_ [permitted_uri_chars] => a-z 0-9~%.:_\-
[allow_get_array] => 1 [enable_query_strings] => [controller_trigger] => c
[function_trigger] => m [directory_trigger] => d [log_threshold] => 2
[log_path] => [log_date_format] => Y-m-d H:i:s [cache_path] =>
[encryption_key] => F#ib0nx$ [sess_cookie_name] => fibsess
[sess_expiration] => 604800 [sess_expire_on_close] => [sess_encrypt_cookie]
=> 1 [sess_use_database] => [sess_table_name] => sessions [sess_match_ip]
=> [sess_match_useragent] => 1 [sess_time_to_update] => 300 [cookie_prefix]
=> [cookie_domain] => [cookie_path] => / [cookie_secure] =>
[global_xss_filtering] => [csrf_protection] => [csrf_token_name] =>
csrf_test_name [csrf_cookie_name] => csrf_cookie_name [csrf_expire] => 7200
[compress_output] => [time_reference] => local [rewrite_short_tags] =>
[proxy_ips] => ) [is_loaded] => Array ( ) [_config_paths] => Array ( [0] =>
application/ ) ) ) ) [output] => CI_Output Object (
[final_output:protected] => [cache_expiration:protected] => 0
[headers:protected] => Array ( ) [mime_types:protected] => Array ( [hqx] =>
application/mac-binhex40 [cpt] => application/mac-compactpro [csv] => Array
( [0] => text/x-comma-separated-values [1] => text/comma-separated-values
[2] => application/octet-stream [3] => application/vnd.ms-excel [4] =>
application/x-csv [5] => text/x-csv [6] => text/csv [7] => application/csv
[8] => application/excel [9] => application/vnd.msexcel ) [bin] =>
application/macbinary [dms] => application/octet-stream [lha] =>
application/octet-stream [lzh] => application/octet-stream [exe] => Array (
[0] => application/octet-stream [1] => application/x-msdownload ) [class]
=> application/octet-stream [psd] => application/x-photoshop [so] =>
application/octet-stream [sea] => application/octet-stream [dll] =>
application/octet-stream [oda] => application/oda [pdf] => Array ( [0] =>
application/pdf [1] => application/x-download ) [ai] =>
application/postscript [eps] => application/postscript [ps] =>
application/postscript [smi] => application/smil [smil] => application/smil
[mif] => application/vnd.mif [xls] => Array ( [0] => application/excel [1]
=> application/vnd.ms-excel [2] => application/msexcel ) [ppt] => Array (
[0] => application/powerpoint [1] => application/vnd.ms-powerpoint )
[wbxml] => application/wbxml [wmlc] => application/wmlc [dcr] =>
application/x-director [dir] => application/x-director [dxr] =>
application/x-director [dvi] => application/x-dvi [gtar] =>
application/x-gtar [gz] => application/x-gzip [php] =>
application/x-httpd-php [php4] => application/x-httpd-php [php3] =>
application/x-httpd-php [phtml] => application/x-httpd-php [phps] =>
application/x-httpd-php-source [js] => application/x-javascript [swf] =>
application/x-shockwave-flash [sit] => application/x-stuffit [tar] =>
application/x-tar [tgz] => Array ( [0] => application/x-tar [1] =>
application/x-gzip-compressed ) [xhtml] => application/xhtml+xml [xht] =>
application/xhtml+xml [zip] => Array ( [0] => application/x-zip [1] =>
application/zip [2] => application/x-zip-compressed ) [mid] => audio/midi
[midi] => audio/midi [mpga] => audio/mpeg [mp2] => audio/mpeg [mp3] =>
Array ( [0] => audio/mpeg [1] => audio/mpg [2] => audio/mpeg3 [3] =>
audio/mp3 ) [aif] => audio/x-aiff [aiff] => audio/x-aiff [aifc] =>
audio/x-aiff [ram] => audio/x-pn-realaudio [rm] => audio/x-pn-realaudio
[rpm] => audio/x-pn-realaudio-plugin [ra] => audio/x-realaudio [rv] =>
video/vnd.rn-realvideo [wav] => Array ( [0] => audio/x-wav [1] =>
audio/wave [2] => audio/wav ) [bmp] => Array ( [0] => image/bmp [1] =>
image/x-windows-bmp ) [gif] => image/gif [jpeg] => Array ( [0] =>
image/jpeg [1] => image/pjpeg ) [jpg] => Array ( [0] => image/jpeg [1] =>
image/pjpeg ) [jpe] => Array ( [0] => image/jpeg [1] => image/pjpeg ) [png]
=> Array ( [0] => image/png [1] => image/x-png ) [tiff] => image/tiff [tif]
=> image/tiff [css] => text/css [html] => text/html [htm] => text/html
[shtml] => text/html [txt] => text/plain [text] => text/plain [log] =>
Array ( [0] => text/plain [1] => text/x-log ) [rtx] => text/richtext [rtf]
=> text/rtf [xml] => text/xml [xsl] => text/xml [mpeg] => video/mpeg [mpg]
=> video/mpeg [mpe] => video/mpeg [qt] => video/quicktime [mov] =>
video/quicktime [avi] => video/x-msvideo [movie] => video/x-sgi-movie [doc]
=> application/msword [docx] => Array ( [0] =>
application/vnd.openxmlformats-officedocument.wordprocessingml.document [1]
=> application/zip ) [xlsx] => Array ( [0] =>
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet [1] =>
application/zip ) [word] => Array ( [0] => application/msword [1] =>
application/octet-stream ) [xl] => application/excel [eml] =>
message/rfc822 [json] => Array ( [0] => application/json [1] => text/json )
) [enable_profiler:protected] => [_zlib_oc:protected] => 0
[_profiler_sections:protected] => Array ( ) [parse_exec_vars:protected] =>
1 ) [security] => CI_Security Object ( [_xss_hash:protected] =>
[_csrf_hash:protected] => [_csrf_expire:protected] => 7200
[_csrf_token_name:protected] => ci_csrf_token [_csrf_cookie_name:protected]
=> ci_csrf_token [_never_allowed_str:protected] => Array (
[document.cookie] => [removed] [document.write] => [removed] [.parentNode]
=> [removed] [.innerHTML] => [removed] [window.location] => [removed]
[-moz-binding] => [removed] [] => --> [ <![CDATA[ [] => <comment> )
[_never_allowed_regex:protected] => Array ( [0] => javascript\s*: [1] =>
expression\s*(\(|&\#40;) [2] => vbscript\s*: [3] => Redirect\s+302 [4] =>
(["'])?data\s*:[^\1]*?base64[^\1]*?,[^\1]*?\1? ) ) [input] => CI_Input
Object ( [ip_address] => [user_agent] => Mozilla/5.0 (Windows NT 6.3;
WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115
Safari/537.36 [_allow_get_array] => 1 [_standardize_newlines] => 1
[_enable_xss] => [_enable_csrf] => [headers:protected] => Array ( )
[security] => CI_Security Object ( [_xss_hash:protected] =>
[_csrf_hash:protected] => [_csrf_expire:protected] => 7200
[_csrf_token_name:protected] => ci_csrf_token [_csrf_cookie_name:protected]
=> ci_csrf_token [_never_allowed_str:protected] => Array (
[document.cookie] => [removed] [document.write] => [removed] [.parentNode]
=> [removed] [.innerHTML] => [removed] [window.location] => [removed]
[-moz-binding] => [removed] [] => --> [ <![CDATA[ [] => <comment> )
[_never_allowed_regex:protected] => Array ( [0] => javascript\s*: [1] =>
expression\s*(\(|&\#40;) [2] => vbscript\s*: [3] => Redirect\s+302 [4] =>
(["'])?data\s*:[^\1]*?base64[^\1]*?,[^\1]*?\1? ) ) [uni] => CI_Utf8 Object
( ) ) [lang] => CI_Lang Object ( [language] => Array ( ) [is_loaded] =>
Array ( ) ) [load] => CI_Loader Object ( [_ci_ob_level:protected] => 0
[_ci_view_paths:protected] => Array ( [application/views/] => 1 )
[_ci_library_paths:protected] => Array ( [0] => application/ [1] =>
/base/data/home/apps/s~pge-2015/1.382317962180174380/website/system/ )
[_ci_model_paths:protected] => Array ( [0] => application/ )
[_ci_helper_paths:protected] => Array ( [0] => application/ [1] =>
/base/data/home/apps/s~pge-2015/1.382317962180174380/website/system/ )
[_base_classes:protected] => Array ( [benchmark] => Benchmark [hooks] =>
Hooks [config] => Config [log] => Log [utf8] => Utf8 [uri] => URI [router]
=> Router [output] => Output [security] => Security [input] => Input [lang]
=> Lang [loader] => Loader [exceptions] => Exceptions )
[_ci_cached_vars:protected] => Array ( ) [_ci_classes:protected] => Array (
[layouts] => layouts [session] => session [encrypt] => encrypt [queue] =>
queue ) [_ci_loaded_files:protected] => Array ( [0] =>
application/libraries/layouts.php [1] =>
/base/data/home/apps/s~pge-2015/1.382317962180174380/website/system/libraries/Session.php
[2] =>
/base/data/home/apps/s~pge-2015/1.382317962180174380/website/system/libraries/Encrypt.php
[3] => application/libraries/queue.php ) [_ci_models:protected] => Array (
) [_ci_helpers:protected] => Array ( [url_helper] => 1 [form_helper] => 1
[string_helper] => 1 ) [_ci_varmap:protected] => Array ( [unit_test] =>
unit [user_agent] => agent ) ) [db] => CI_DB_mysqli_driver Object (
[dbdriver] => mysqli [_escape_char] => ` [_like_escape_str] =>
[_like_escape_chr] => [_count_string] => SELECT COUNT(*) AS
[_random_keyword] => RAND() [delete_hack] => 1 [use_set_names] =>
[ar_select] => Array ( ) [ar_distinct] => [ar_from] => Array ( ) [ar_join]
=> Array ( ) [ar_where] => Array ( ) [ar_like] => Array ( ) [ar_groupby] =>
Array ( ) [ar_having] => Array ( ) [ar_keys] => Array ( ) [ar_limit] =>
[ar_offset] => [ar_order] => [ar_orderby] => Array ( ) [ar_set] => Array (
) [ar_wherein] => Array ( ) [ar_aliased_tables] => Array ( )
[ar_store_array] => Array ( ) [ar_caching] => [ar_cache_exists] => Array (
) [ar_cache_select] => Array ( ) [ar_cache_from] => Array ( )
[ar_cache_join] => Array ( ) [ar_cache_where] => Array ( ) [ar_cache_like]
=> Array ( ) [ar_cache_groupby] => Array ( ) [ar_cache_having] => Array ( )
[ar_cache_orderby] => Array ( ) [ar_cache_set] => Array ( ) [ar_no_escape]
=> Array ( ) [ar_cache_no_escape] => Array ( ) [username] => ******
[password] =>******* [hostname] => [database] => ****** [dbprefix] =>
[char_set] => utf8 [dbcollat] => utf8_general_ci [autoinit] => 1 [swap_pre]
=> [port] => [pconnect] => [conn_id] => mysqli Object ( [affected_rows] =>
0 [client_info] => mysqlnd 5.0.10 - 20111026 - $Id:
c85105d7c6f7d70d609bb4c000257868a40840ab $ [client_version] => 50010
[connect_errno] => 0 [connect_error] => [errno] => 0 [error] =>
[error_list] => Array ( ) [field_count] => 0 [host_info] => Localhost via
UNIX socket [info] => [insert_id] => 0 [server_info] => 5.5.38
[server_version] => 50538 [stat] => Uptime: 263 Threads: 1 Questions: 40
Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 9 Queries per second
avg: 0.152 [sqlstate] => 00000 [protocol_version] => 10 [thread_id] => 8
[warning_count] => 0 ) [result_id] => [db_debug] => 1 [benchmark] => 0
[query_count] => 0 [bind_marker] => ? [save_queries] => 1 [queries] =>
Array ( ) [query_times] => Array ( ) [data_cache] => Array ( )
[trans_enabled] => 1 [trans_strict] => 1 [_trans_depth] => 0
[_trans_status] => 1 [cache_on] => [cachedir] => [cache_autodel] => [CACHE]
=> [_protect_identifiers] => 1 [_reserved_identifiers] => Array ( [0] => *
) [stmt_id] => [curs_id] => [limit_used] => [stricton] => [socket] =>
/cloudsql/awesome-tangent-754:exchangedb ) [layouts] => Layouts Object (
[CI:Layouts:private] => Fibonx Object *RECURSION* [title:Layouts:private]
=> [includes:Layouts:private] => Array ( ) ) [encrypt] => CI_Encrypt Object
( [CI] => Fibonx Object *RECURSION* [encryption_key] => [_hash_type] =>
sha1 [_mcrypt_exists] => 1 [_mcrypt_cipher] => rijndael-256 [_mcrypt_mode]
=> cbc ) [session] => CI_Session Object ( [sess_encrypt_cookie] => 1
[sess_use_database] => [sess_table_name] => sessions [sess_expiration] =>
604800 [sess_expire_on_close] => [sess_match_ip] => [sess_match_useragent]
=> 1 [sess_cookie_name] => fibsess [cookie_prefix] => [cookie_path] => /
[cookie_domain] => [cookie_secure] => [sess_time_to_update] => 300
[encryption_key] => F#ib0nx$ [flashdata_key] => flash [time_reference] =>
local [gc_probability] => 5 [userdata] => Array ( [session_id] =>
fcf3e17971475dee82f2d483f2ae1032 [ip_address] => 59.182.83.46 [user_agent]
=> Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/40.0.2214.115 Safari/537.36 [last_activity] => 1424570792
[user_data] => ) [CI] => Fibonx Object *RECURSION* [now] => 1424571051 ) )
[1] => testRabbit ) [1] => Array ( ) ) ) [8] => Array ( [file] =>
/base/data/home/apps/s~pge-2015/1.382317962180174380/website/index.php
[line] => 211 [args] => Array ( [0] =>
/base/data/home/apps/s~pge-2015/1.382317962180174380/website/system/core/CodeIgniter.php
) [function] => require_once ) ) [previous:Exception:private] => )
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Klishin
2015-02-22 10:23:43 UTC
Permalink
Post by Sumeet Gohil
I am running a php application using Codeigniter and successfully
uploaded to Google App Engine & Running ..
I am facing issue while integrating RabbitMq client library,
It's working fine on local system after deploying it's not!
You are not providing any code.

Most likely you are trying to connect using default credentials (guest/guest) which

 1. only can connect from localhost by default
 2. almost certainly doesn't exist in hosted environments

Make sure you use the correct credentials provided by GAE and post relevant sections of your code
next time.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sumeet Gohil
2015-02-24 09:31:21 UTC
Permalink
Post by Sumeet Gohil
I am running a php application using Codeigniter and successfully uploaded
to Google App Engine & Running ..
I am facing issue while integrating RabbitMq client library, It's working
fine on local system after deploying it's not!
And after using try..catch i found..
PhpAmqpLib\Exception\AMQPRuntimeException Object ( [message:protected] =>
protected] => 0 [file:protected] => /base/data/home/apps/s~pge-2015/
1.382317962180174380/website/application/third_party/PhpAmqpLib/vendor/
videlalvaro/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php [line:protected]
=> 27 [trace:Exception:private] => Array ( [0] => Array ( [file] => /base/
data/home/apps/s~pge-2015/1.382317962180174380/website/application/
third_party/PhpAmqpLib/vendor/videlalvaro/php-amqplib/PhpAmqpLib/
Connection/AMQPStreamConnection.php [line] => 21 [function] =>
__construct [class] => PhpAmqpLib\Wire\IO\StreamIO [type] => -> [args] =>
Array ( [0] => 130.211.180.255 [1] => 5672 [2] => 3 [3] => 3 [4] => ) ) [1
] => Array ( [file] => /base/data/home/apps/s~pge-2015/
1.382317962180174380/website/application/libraries/queue.php [line] => 45
[function] => __construct [class] => PhpAmqpLib\Connection\
AMQPStreamConnection [type] => -> [args] => Array ( [0] => 130.211.180.255
[1] => 5672 [2] => -------- [3] => *******) ) [2] => Array ( [file] => /
base/data/home/apps/s~pge-2015/1.382317962180174380/website/system/core/
Loader.php [line] => 1095 [function] => __construct [class] => Queue [type
] => -> [args] => Array ( [0] => Array ( [host] => 130.211.180.255 [port]
=> 5672 [user] => ---------[pass] => ****** ) ) ) [3] => Array ( [file] =>
/base/data/home/apps/s~pge-2015/1.382317962180174380/website/system/core/
Loader.php [line] => 975 [function] => _ci_init_class [class] =>
CI_Loader [type] => -> [args] => Array ( [0] => queue [1
...
*/
public function __construct($config=array()) {

// Configuration
try
{
if ( ! empty($config) ) {
$this->initialize($config);
}

// Connecting to message server
$this->connection = new AMQPConnection($this->host, $this->port, $this->user, $this->pass);
$this->channel = $this->connection->channel();

}
catch(Exception $e)
{
print_r($e); // here am catching error
}
}

-------------------------------------

public function push($job, $data=array(), $route=null) {

// AMQP Message in string, in this case we using JSON
if( is_array($data) ) {
$data = json_encode($data);
}
$message = new AMQPMessage($data);

$this->channel->exchange_declare($job, 'direct', false, false, false);
$this->channel->basic_publish($message, $job, $route);

}
-------------------------------------------------------------------

$this->load->library('queue');

$result = $this->queue->push('test', array("amount" =>15724000,
"price"=>12345,
" userID"=>"12345",
"orderID"=>""),null);
---------------------------
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Klishin
2015-02-24 09:39:04 UTC
Permalink
Post by Sumeet Gohil
Post by Sumeet Gohil
// Connecting to message server
$this->connection = new AMQPConnection($this->host, $this->port, $this->user, $this->pass);
What are the values of $this->user and $this->pass? 
--
MK

Staff Software Engineer, Pivotal/RabbitMQ
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Klishin
2015-02-24 09:46:30 UTC
Permalink
+rabbitmq-users — please CC the list. 
user = webui
pass = webui
Better.

Does that user have permissions to use vhost "/"?
Can you connect to RabbitMQ at $this->host:$this->port via telnet? 
--
MK

Staff Software Engineer, Pivotal/RabbitMQ
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Klishin
2015-02-24 09:51:00 UTC
Permalink
Sumeet, please CC the list. 
Yes
Yes to what question?
--
MK

Staff Software Engineer, Pivotal/RabbitMQ
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Klishin
2015-02-24 10:00:58 UTC
Permalink
Sumeet,

I'm asking you to CC rabbitmq-users by using Reply-All in your email client for the 3rd time. 
I am able to connect using same credentials
rabbitmqadmin.py uses HTTP API, though, not AMQP 0-9-1, and connects using a different port.

How about connecting to the host:port pair over telnet? (RabbitMQ will close connection shortly
but connection should succeed nonetheless).

You can also use Wireshark 1.99.2 to see what's going up and down the wire. 
--
MK

Staff Software Engineer, Pivotal/RabbitMQ
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sumeet Gohil
2015-02-24 10:05:50 UTC
Permalink
Ohkay

Let me try using telnet

Kindly , accept my apologies won't miss CC again ..

Thanks a ton for replying am stuck this from past week..
Post by Michael Klishin
Sumeet,
I'm asking you to CC rabbitmq-users by using Reply-All in your email client for the 3rd time.
I am able to connect using same credentials
rabbitmqadmin.py uses HTTP API, though, not AMQP 0-9-1, and connects using a different port.
How about connecting to the host:port pair over telnet? (RabbitMQ will close connection shortly
but connection should succeed nonetheless).
You can also use Wireshark 1.99.2 to see what's going up and down the wire.
--
MK
Staff Software Engineer, Pivotal/RabbitMQ
--
Regards Sumeet Gohil
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sumeet Gohil
2015-02-24 10:17:38 UTC
Permalink
Michael ,

when i use this command

telnet 130.211.180.255 5672

i get this


​
I don't know what to write here .

i wrote some keys and hit enter

got this .. .


​
Post by Sumeet Gohil
Ohkay
Let me try using telnet
Kindly , accept my apologies won't miss CC again ..
Thanks a ton for replying am stuck this from past week..
Post by Michael Klishin
Sumeet,
I'm asking you to CC rabbitmq-users by using Reply-All in your email
client for the 3rd time.
Post by Michael Klishin
I am able to connect using same credentials
rabbitmqadmin.py uses HTTP API, though, not AMQP 0-9-1, and connects
using a different port.
Post by Michael Klishin
How about connecting to the host:port pair over telnet? (RabbitMQ will
close connection shortly
Post by Michael Klishin
but connection should succeed nonetheless).
You can also use Wireshark 1.99.2 to see what's going up and down the
wire.
Post by Michael Klishin
--
MK
Staff Software Engineer, Pivotal/RabbitMQ
--
Regards Sumeet Gohil
--
Regards Sumeet Gohil
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Klishin
2015-02-24 10:26:17 UTC
Permalink
Post by Sumeet Gohil
I don't know what to write here .
i wrote some keys and hit enter
This is expected and means you can successfully connect.

If TCP connection succeeds and you can authenticate with rabbitmqadmin.py I suspect the issue is either in your code
(e.g. some connection parameters are not being set correctly) or your client (you haven't specified which one you use).
--
MK

Staff Software Engineer, Pivotal/RabbitMQ
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sumeet Gohil
2015-02-24 10:29:48 UTC
Permalink
Ohkay

i'll go through the code once again..
Post by Michael Klishin
Post by Sumeet Gohil
I don't know what to write here .
i wrote some keys and hit enter
This is expected and means you can successfully connect.
If TCP connection succeeds and you can authenticate with rabbitmqadmin.py I suspect the issue is either in your code
(e.g. some connection parameters are not being set correctly) or your client (you haven't specified which one you use).
--
MK
Staff Software Engineer, Pivotal/RabbitMQ
--
Regards Sumeet Gohil
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sumeet Gohil
2015-02-24 10:31:16 UTC
Permalink
But i don't understand , everything is working fine over local system
, when i deploy to GAE server .. it's giving error ..
Post by Sumeet Gohil
Ohkay
i'll go through the code once again..
Post by Michael Klishin
Post by Sumeet Gohil
I don't know what to write here .
i wrote some keys and hit enter
This is expected and means you can successfully connect.
If TCP connection succeeds and you can authenticate with rabbitmqadmin.py I suspect the issue is either in your code
(e.g. some connection parameters are not being set correctly) or your client (you haven't specified which one you use).
--
MK
Staff Software Engineer, Pivotal/RabbitMQ
--
Regards Sumeet Gohil
--
Regards Sumeet Gohil
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Klishin
2015-02-24 10:35:31 UTC
Permalink
Post by Sumeet Gohil
But i don't understand , everything is working fine over local
system
, when i deploy to GAE server .. it's giving error ..
If you specify exactly the same host, port and credentials locally as when deployed to GAE, this means
that either

 * The GAE VM your app runs in cannot access the IP you can access locally (if RabbitMQ runs on Google Cloud Engine, that should be extremely unlikely)
 * The host, port or credentials used on GAE are different for some reason

This is really basic stuff. We've eliminated a couple obvious issues. Please continue investigating
on your own, there is little people on this list can help further with this environment-specific problem.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sumeet Gohil
2015-02-24 10:41:26 UTC
Permalink
yes i agree this is very little issue but am unable to find specific
reason for this that's why posted to Stacks,Github,Groups

If any one knows the exact reason why it's functioning like this ...

Thank You Very Much Once Again..
Post by Michael Klishin
Post by Sumeet Gohil
But i don't understand , everything is working fine over local system
, when i deploy to GAE server .. it's giving error ..
If you specify exactly the same host, port and credentials locally as when deployed to GAE, this means
that either
* The GAE VM your app runs in cannot access the IP you can access locally (if RabbitMQ runs on Google Cloud Engine, that should be extremely unlikely)
* The host, port or credentials used on GAE are different for some reason
This is really basic stuff. We've eliminated a couple obvious issues. Please continue investigating
on your own, there is little people on this list can help further with this environment-specific problem.
--
MK
Staff Software Engineer, Pivotal/RabbitMQ
--
Regards Sumeet Gohil
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sumeet Gohil
2015-02-24 10:31:33 UTC
Permalink
But i don't understand , everything is working fine over local system
, when i deploy to GAE server .. it's giving error ..
Post by Sumeet Gohil
Ohkay
i'll go through the code once again..
Post by Michael Klishin
Post by Sumeet Gohil
I don't know what to write here .
i wrote some keys and hit enter
This is expected and means you can successfully connect.
If TCP connection succeeds and you can authenticate with rabbitmqadmin.py I suspect the issue is either in your code
(e.g. some connection parameters are not being set correctly) or your client (you haven't specified which one you use).
--
MK
Staff Software Engineer, Pivotal/RabbitMQ
--
Regards Sumeet Gohil
--
Regards Sumeet Gohil
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...