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

incompatible version of amqpuri #90

Closed
puttpotsawee opened this issue May 2, 2017 · 5 comments
Closed

incompatible version of amqpuri #90

puttpotsawee opened this issue May 2, 2017 · 5 comments
Assignees
Labels

Comments

@puttpotsawee
Copy link

puttpotsawee commented May 2, 2017

Recently I had an absurd error on seneca-amqp-transport on the service that had been run on production for a while, the error says:

Seneca Fatal Error
==================

Message: seneca: use-plugin: Could not load plugin seneca-amqp-transport defined in seneca-amqp-transport due to syntax error: Unexpected token {. See STDERR for details.

Code: plugin_syntax_error

Details: { 'orig$':
   { [Error: use-plugin: Could not load plugin seneca-amqp-transport defined in seneca-amqp-transport due to syntax error: Unexpected token {. See STDERR for details.]
     eraro: true,
     orig: null,
     code: 'syntax_error',
     'use-plugin': true,
     package: 'use-plugin',
     msg: 'use-plugin: Could not load plugin seneca-amqp-transport defined in seneca-amqp-transport due to syntax error: Unexpected token {. See STDERR for details.',
     details:
      { options: {},
        callback: undefined,
        history:
         [ { module: '/build-tmp/node_modules/seneca/seneca.js',
             path: 'seneca-amqp-transport' } ],
        name: 'seneca-amqp-transport',
        search:
         [ { type: 'normal', name: 'seneca-amqp-transport' },
           { type: 'normal', name: 'seneca-seneca-amqp-transport' },
           { type: 'normal', name: './seneca-amqp-transport' },
           { type: 'normal', name: './seneca-seneca-amqp-transport' } ],
        err: [SyntaxError: Unexpected token {],
        found: { type: 'normal', name: 'seneca-amqp-transport' },
        found_name: 'seneca-amqp-transport',
        err_msg: 'Unexpected token {' },
     callpoint: 'at Seneca.api_use [as use] (/build-tmp/node_modules/seneca/seneca.js:967:29)' },
  'message$': 'use-plugin: Could not load plugin seneca-amqp-transport defined in seneca-amqp-transport due to syntax error: Unexpected token {. See STDERR for details.' }

Stack:
    at errormaker (/build-tmp/node_modules/eraro/eraro.js:94:15)
    at handle_load_error (/build-tmp/node_modules/use-plugin/use.js:248:12)
    at loadplugin (/build-tmp/node_modules/use-plugin/use.js:205:13)
    at Object.use (/build-tmp/node_modules/use-plugin/use.js:87:7)
    at Seneca.api_use [as use] (/build-tmp/node_modules/seneca/seneca.js:967:29)
    at Object.<anonymous> (/build-tmp/src/index.js:185:8)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:148:18)
    at node.js:405:3

Instance: Seneca/s8u6l5litvid/1493724375490/18/3.3.0/-
    at Seneca.api_use [as use] (/build-tmp/node_modules/seneca/seneca.js:970:12)

When: 2017-05-02T11:26:17.863Z

Log: {kind:null,plugin:seneca,tag:3.3.0,id:s8u6l5litvid/1493724375490/18/3.3.0/-,code:plugin_syntax_error,notice:sen

Node:
  { http_parser: '2.7.0', node: '5.12.0', v8: '4.6.85.32', uv: '1.8.0', zlib: '1.2.8', ares: '1.10.1-DEV', modules: '47', openssl: '1.0.2h' },
  { debug: false, uv: true, ipv6: true, tls_npn: true, tls_alpn: true, tls_sni: true, tls_ocsp: true, tls: true },
  [ 'Binding contextify', 'Binding natives', 'NativeModule events', 'NativeModule buffer', 'Binding buffer', 'NativeModule internal/util', 'Binding util', 'NativeModule timers', 'Binding timer_wrap', 'NativeModule internal/linkedlist', 'NativeModule assert', 'NativeModule util', 'Binding uv', 'NativeModule internal/process', 'NativeModule internal/process/next_tick', 'NativeModule internal/process/promises', 'NativeModule internal/process/stdio', 'NativeModule path', 'NativeModule module', 'NativeModule internal/module', 'NativeModule vm', 'NativeModule fs', 'Binding fs', 'NativeModule constants', 'Binding constants', 'NativeModule stream', 'NativeModule _stream_readable', 'NativeModule _stream_writable', 'NativeModule _stream_duplex', 'NativeModule _stream_transform', 'NativeModule _stream_passthrough', 'Binding fs_event_wrap', 'NativeModule console', 'Binding tty_wrap', 'NativeModule tty', 'NativeModule net', 'NativeModule internal/net', 'Binding cares_wrap', 'Binding tcp_wrap', 'Binding pipe_wrap', 'Binding stream_wrap', 'Binding signal_wrap', 'NativeModule os', 'Binding os', 'NativeModule http', 'NativeModule _http_incoming', 'NativeModule _http_common', 'NativeModule internal/freelist', 'Binding http_parser', 'NativeModule _http_outgoing', 'NativeModule _http_server', 'NativeModule _http_agent', 'NativeModule _http_client', 'NativeModule url', 'NativeModule punycode', 'NativeModule querystring', 'NativeModule https', 'NativeModule tls', 'Binding crypto', 'NativeModule _tls_common', 'NativeModule _tls_wrap', 'NativeModule crypto', 'NativeModule internal/streams/lazy_transform', 'NativeModule string_decoder', 'NativeModule _stream_wrap', 'Binding js_stream', 'Binding tls_wrap', 'NativeModule _tls_legacy', 'NativeModule zlib', 'Binding zlib', 'NativeModule dns' ]

Process:
  pid=18, arch=x64, platform=linux,
  path=/usr/bin/node,
  argv=[ '/usr/bin/node', '/build-tmp/build/index.js' ],
  env={ npm_config_cache_lock_stale: '60000',  npm_package_devDependencies_babel_plugin_transform_object_rest_spread: '^6.8.0',  npm_package_dependencies_mongoose_validator: '^1.2.5',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_PORT_9300_TCP_PORT: '9300',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_PORT_9200_TCP_PROTO: 'tcp',  ES_PORT_9300_TCP: 'tcp://es:9300',  ESB_RABBITMQ_1_PORT_5671_TCP_PORT: '5671',  ESB_RABBITMQ_1_PORT_4369_TCP_ADDR: 'rabbitmq',  ES_ENV_CA_CERTIFICATES_JAVA_VERSION: '20161107~bpo8+1',  ESB_RABBITMQ_1_ENV_RABBITMQ_SASL_LOGS: '-',  npm_config_sign_git_tag: '',  npm_config_legacy_bundling: '',  npm_package_devDependencies_babel_core: '^6.14.0',  npm_package_dependencies_mongodb_migrate: '^2.0.1',  npm_package_dependencies_bluebird: '^3.4.6',  ESB_RABBITMQ_1_PORT_5672_TCP_PORT: '5672',  ESB_RABBITMQ_1_PORT: 'tcp://rabbitmq:15672',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_PORT_9300_TCP_PROTO: 'tcp',  ESB_RABBITMQ_1_PORT_5671_TCP_PROTO: 'tcp',  ES_ENV_JAVA_VERSION: '8u121',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_ENV_JAVA_DEBIAN_VERSION: '8u121-b13-1~bpo8+1',  npm_config_always_auth: '',  npm_config_user_agent: 'npm/3.10.3 node/v5.12.0 linux x64',  npm_package_dependencies_xml2js: '^0.4.17',  ESB_RABBITMQ_1_PORT_5672_TCP_PROTO: 'tcp',  ES_NAME: '/cattle/es',  ESB_RABBITMQ_1_ENV_RABBITMQ_DEBIAN_VERSION: '3.6.6-1',  npm_config_key: '',  npm_config_bin_links: 'true',  npm_package_dependencies_extend: '^3.0.0',  ES_ENV_ELASTICSEARCH_VERSION: '2.4.4',  ESB_RABBITMQ_1_PORT_4369_TCP_PORT: '4369',  npm_node_execpath: '/usr/bin/node',  npm_config_user: '',  npm_config_init_version: '1.0.0',  npm_config_if_present: '',  npm_config_heading: 'npm',  npm_config_fetch_retries: '2',  npm_config_description: 'true',  npm_package_devDependencies_nodemon: '^1.10.2',  npm_package_dependencies_node_fetch: '^1.6.3',  RABBITMQ_PORT_15671_TCP: 'tcp://rabbitmq:15671',  ESB_RABBITMQ_1_PORT_4369_TCP_PROTO: 'tcp',  ESB_RABBITMQ_1_NAME: '/cattle/esb-rabbitmq-1',  AMQP_URL: 'amqp://guest:guest@rabbitmq:5672',  HOSTNAME: 'b08968a69097',  SHLVL: '1',  npm_package_devDependencies_babel_preset_es2015: '^6.14.0',  npm_package_devDependencies_babel_cli: '^6.14.0',  npm_package_dependencies_seneca_amqp_transport: '^1.0.1',  RABBITMQ_PORT_15672_TCP: 'tcp://rabbitmq:15672',  npm_config_force: '',  npm_package_devDependencies_mocha: '^3.0.2',  npm_package_dependencies_moment_timezone: '^0.5.11',  npm_package_scripts_test_api_win: 'mocha --grep REST --require source-map-support/register --compilers js:babel-core/register --recursive',  npm_package_scripts_test_api: 'NODE_ENV=test node_modules/.bin/mocha --grep /RenterApi/v1/Exam/Retrieve --require source-map-support/register --compilers js:babel-core/register --recursive',  HOME: '/root',  RABBITMQ_PORT_25672_TCP: 'tcp://rabbitmq:25672',  IS_MAIL_AGENT_APPLICATION: 'false',  npm_config_only: '',  npm_package_dependencies_ls: '^0.2.1',  ESB_RABBITMQ_1_PORT_15671_TCP_ADDR: 'rabbitmq',  DB_NAME: '/cattle/db',  npm_config_init_license: 'ISC',  npm_config_cache_min: '10',  npm_package_devDependencies_chai: '^3.5.0',  npm_package_devDependencies_babel_preset_latest: '^6.14.0',  ES_ENV_JAVA_DEBIAN_VERSION: '8u121-b13-1~bpo8+1',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_PORT_9200_TCP: 'tcp://es:9200',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_PORT: 'tcp://es:9200',  ESB_RABBITMQ_1_PORT_15672_TCP_ADDR: 'rabbitmq',  npm_config_tag_version_prefix: 'v',  npm_config_rollback: 'true',  npm_config_editor: 'vi',  npm_package_dependencies_validator: '^6.2.0',  ESB_RABBITMQ_1_PORT_5671_TCP: 'tcp://rabbitmq:5671',  ESB_RABBITMQ_1_PORT_25672_TCP_ADDR: 'rabbitmq',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_ENV_CA_CERTIFICATES_JAVA_VERSION: '20161107~bpo8+1',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_PORT_9300_TCP: 'tcp://es:9300',  npm_config_userconfig: '/root/.npmrc',  npm_config_cache_max: 'Infinity',  npm_package_scripts_serve: 'NODE_ENV=production node ./build/index.js',  ESB_RABBITMQ_1_PORT_5672_TCP: 'tcp://rabbitmq:5672',  ESB_RABBITMQ_1_PORT_15671_TCP_PORT: '15671',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_ENV_JAVA_VERSION: '8u121',  APPLICATION_SERVICE_APPLICATION_MONGODB_APPLICATION_MONGODB_DATA_1_NAME: '/cattle/application-service-application-mongodb-application-mongodb-data-1',  TRANSUNION_PRIVATE_KEY: 'dSCDfCXrgeXqNn9/7VUKzGqiN6smu/1rEwi9zTkNOqj1hbwTk5L73wIlESYuy6y4px6/iV2gkGEcR2lB11B1jQ==',  npm_config_tmp: '/tmp',  npm_config_init_author_url: '',  npm_config_init_author_name: '',  npm_config_engine_strict: '',  npm_package_dependencies_moment: '^2.15.1',  ESB_RABBITMQ_1_PORT_15672_TCP_PORT: '15672',  ESB_RABBITMQ_1_PORT_15671_TCP_PROTO: 'tcp',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_NAME: '/cattle/rancher-elastic-mongo-elasticsearch-1',  npm_config_usage: '',  npm_config_save_dev: '',  npm_config_depth: 'Infinity',  npm_package_devDependencies_eslint_plugin_async_await: '0.0.0',  npm_package_description: '',  ESB_RABBITMQ_1_PORT_15672_TCP_PROTO: 'tcp',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_ENV_LANG: 'C.UTF-8',  ESB_RABBITMQ_1_PORT_25672_TCP_PORT: '25672',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_ENV_ELASTICSEARCH_VERSION: '2.4.4',  ESB_RABBITMQ_1_PORT_4369_TCP: 'tcp://rabbitmq:4369',  RABBITMQ_ENV_RABBITMQ_LOGS: '-',  'TRANSUNION_BASE_URL-prod': 'https://www.mysmgateway.com',  MONGO_DB: 'db',  npm_config_https_proxy: '',  npm_config_progress: 'true',  npm_config_cafile: '',  npm_package_devDependencies_babel_plugin_transform_decorators_legacy: '^1.3.4',  npm_package_devDependencies_babel_istanbul: '^0.11.0',  ESB_RABBITMQ_1_PORT_25672_TCP_PROTO: 'tcp',  TMPDIR: '/build-tmp',  npm_config_onload_script: '',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_ENV_JAVA_HOME: '/usr/lib/jvm/java-8-openjdk-amd64/jre',  npm_config_shell: 'bash',  npm_config_save_bundle: '',  npm_config_rebuild_bundle: 'true',  VERSION: 'v5.12.0',  npm_config_prefix: '/usr',  npm_config_dry_run: '',  npm_package_dependencies_stately_js: '^1.3.0',  npm_package_dependencies_express: '^4.14.0',  APPLICATION_SERVICE_APPLICATION_MONGODB_1_NAME: '/cattle/application-service-application-mongodb-1',  RABBITMQ_ENV_GOSU_VERSION: '1.7',  IS_SEND_REQUEST_REMINDER: 'true',  npm_config_versions: '',  npm_config_searchopts: '',  npm_config_scope: '',  npm_config_save_optional: '',  npm_config_registry: 'https://registry.npmjs.org/',  npm_config_cache_lock_wait: '10000',  npm_config_browser: '',  npm_package_devDependencies_babel_plugin_transform_regenerator: '^6.14.0',  npm_package_dependencies_seneca: '^3.0.0',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_ENV_JAVA_DEBIAN_VERSION: '8u121-b13-1~bpo8+1',  PROD_ELASTIC: 'http://es:9200',  npm_config_proxy: '',  npm_config_cache: '/root/.npm',  npm_package_devDependencies_expect: '^1.20.2',  npm_package_dependencies_inflect: '^0.3.0',  TERM: 'xterm',  npm_config_version: '',  npm_config_searchsort: 'name',  npm_config_ignore_scripts: '',  npm_config_global_style: '',  npm_package_devDependencies_babel_plugin_transform_class_properties: '^6.16.0',  npm_package_dependencies_mongodb: '^2.2.11',  npm_package_scripts_start_win: 'nodemon src/index.js --watch src --exec babel-node',  npm_package_scripts_start: 'nodemon src/index.js --watch src --exec \'node_modules/.bin/eslint src && node_modules/.bin/babel-node\'',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_PORT_9200_TCP_ADDR: 'es',  ESB_RABBITMQ_1_PORT_15671_TCP: 'tcp://rabbitmq:15671',  RABBITMQ_ENV_RABBITMQ_VERSION: '3.6.6',  ES_ENV_LANG: 'C.UTF-8',  npm_config_viewer: 'man',  npm_config_local_address: '',  npm_package_devDependencies_mongoose_mock: '^0.4.0',  npm_package_devDependencies_babel_plugin_transform_async_to_generator: '^6.8.0',  npm_package_dependencies_axios: '^0.14.0',  ESB_RABBITMQ_1_PORT_15672_TCP: 'tcp://rabbitmq:15672',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_PORT_9300_TCP_ADDR: 'es',  NODE: '/usr/bin/node',  npm_package_name: 'application-service',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_ENV_ELASTICSEARCH_DEB_VERSION: '2.4.4',  RABBITMQ_PORT_5671_TCP_ADDR: 'rabbitmq',  ESB_RABBITMQ_1_PORT_25672_TCP: 'tcp://rabbitmq:25672',  ES_ENV_JAVA_HOME: '/usr/lib/jvm/java-8-openjdk-amd64/jre',  PATH: '/usr/lib/node_modules/npm/bin/node-gyp-bin:/build-tmp/node_modules/.bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',  npm_config_color: 'true',  npm_package_devDependencies_babel_polyfill: '^6.20.0',  npm_package_dependencies_babel_runtime: '^6.11.6',  NPM_VERSION: '3',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_ENV_GOSU_VERSION: '1.7',  RABBITMQ_PORT_5672_TCP_ADDR: 'rabbitmq',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_PORT_9200_TCP_PORT: '9200',  npm_config_maxsockets: '50',  npm_config_fetch_retry_mintimeout: '10000',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_PORT_9300_TCP_PORT: '9300',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_PORT_9200_TCP_PROTO: 'tcp',  npm_config_umask: '0022',  npm_package_devDependencies_pow_mongoose_fixtures: '^0.3.0',  npm_package_devDependencies_eslint: '^3.4.0',  npm_package_dependencies_elasticsearch: '^11.0.1',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_PORT_9300_TCP_PROTO: 'tcp',  RABBITMQ_PORT_4369_TCP_ADDR: 'rabbitmq',  RABBITMQ_ENV_RABBITMQ_SASL_LOGS: '-',  RABBITMQ_PORT_5671_TCP_PORT: '5671',  npm_lifecycle_script: 'NODE_ENV=production node ./build/index.js',  npm_config_message: '%s',  npm_config_loglevel: 'warn',  npm_config_fetch_retry_maxtimeout: '60000',  npm_package_devDependencies_babel_plugin_transform_builtin_extend: '^1.1.0',  npm_package_main: 'index.js',  RABBITMQ_PORT_5671_TCP_PROTO: 'tcp',  RABBITMQ_PORT: 'tcp://rabbitmq:15672',  RABBITMQ_PORT_5672_TCP_PORT: '5672',  npm_config_link: '',  npm_config_global: '',  npm_config_cert: '',  npm_config_ca: '',  npm_package_scripts_test_win: 'mocha --require source-map-support/register --compilers js:babel-core/register --recursive',  npm_package_scripts_test: 'NODE_ENV=test node_modules/.bin/mocha --require source-map-support/register --compilers js:babel-core/register --recursive',  ES_PORT_9200_TCP_ADDR: 'es',  RABBITMQ_ENV_RABBITMQ_DEBIAN_VERSION: '3.6.6-1',  RABBITMQ_PORT_5672_TCP_PROTO: 'tcp',  npm_lifecycle_event: 'serve',  npm_config_unicode: '',  npm_config_save: '',  npm_config_also: '',  npm_config_access: '',  npm_package_devDependencies_assert: '^1.4.1',  npm_package_version: '1.0.0',  RABBITMQ_PORT_4369_TCP_PORT: '4369',  ESB_RABBITMQ_1_ENV_RABBITMQ_LOGS: '-',  ES_PORT_9300_TCP_ADDR: 'es',  npm_config_unsafe_perm: '',  npm_config_production: '',  npm_config_long: '',  npm_config_argv: '{"remain":[],"cooked":["run","serve"],"original":["run","serve"]}',  npm_package_scripts_build: 'rm -rf build/** && node_modules/.bin/babel src/ -d build -s',  ES_ENV_ELASTICSEARCH_DEB_VERSION: '2.4.4',  RABBITMQ_NAME: '/cattle/rabbitmq',  RABBITMQ_PORT_4369_TCP_PROTO: 'tcp',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_ENV_LANG: 'C.UTF-8',  npm_config_tag: 'latest',  npm_config_node_version: '5.12.0',  npm_package_devDependencies_proxyquire: '^1.7.10',  npm_package_devDependencies_chai_as_promised: '^5.3.0',  npm_package_dependencies_lodash: '^4.15.0',  npm_package_author: '',  ES_ENV_GOSU_VERSION: '1.7',  ES_PORT_9200_TCP_PORT: '9200',  npm_config_shrinkwrap: 'true',  npm_config_git_tag_version: 'true',  npm_package_devDependencies_events: '^1.1.1',  npm_package_devDependencies_babel_preset_stage_0: '^6.5.0',  npm_package_dependencies_source_map_support: '^0.4.11',  ES_PORT_9200_TCP_PROTO: 'tcp',  ES_PORT_9300_TCP_PORT: '9300',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_ENV_JAVA_HOME: '/usr/lib/jvm/java-8-openjdk-amd64/jre',  npm_config_strict_ssl: 'true',  npm_config_save_exact: '',  npm_config_proprietary_attribs: 'true',  npm_config_npat: '',  npm_config_fetch_retry_factor: '10',  npm_package_dependencies_mongoose: '^4.6.0',  npm_package_license: 'ISC',  ES_PORT_9300_TCP_PROTO: 'tcp',  RABBITMQ_PORT_15671_TCP_ADDR: 'rabbitmq',  ESB_RABBITMQ_1_ENV_GOSU_VERSION: '1.7',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_PORT_9200_TCP: 'tcp://es:9200',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_PORT: 'tcp://es:9200',  npm_config_parseable: '',  npm_config_init_module: '/root/.npm-init.js',  npm_config_globalconfig: '/usr/etc/npmrc',  npm_config_dev: '',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_PORT_9300_TCP: 'tcp://es:9300',  RABBITMQ_PORT_15672_TCP_ADDR: 'rabbitmq',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_ENV_CA_CERTIFICATES_JAVA_VERSION: '20161107~bpo8+1',  PWD: '/build-tmp',  npm_execpath: '/usr/lib/node_modules/npm/bin/npm-cli.js',  npm_config_globalignorefile: '/usr/etc/npmignore',  npm_package_dependencies_base64_url: '^1.3.3',  RABBITMQ_PORT_5671_TCP: 'tcp://rabbitmq:5671',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_ENV_JAVA_VERSION: '8u121',  RABBITMQ_PORT_25672_TCP_ADDR: 'rabbitmq',  npm_config_cache_lock_retries: '10',  RABBITMQ_PORT_5672_TCP: 'tcp://rabbitmq:5672',  RABBITMQ_PORT_15671_TCP_PORT: '15671',  ESB_RABBITMQ_1_ENV_RABBITMQ_VERSION: '3.6.6',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_NAME: '/cattle/rancher-elastic-mongo-elasticsearch-elasticsearch-data-1',  UAT: 'true',  npm_config_save_prefix: '^',  npm_package_scripts_test_scope: 'NODE_ENV=test node_modules/.bin/mocha --grep RequestedSubmission_Service --require source-map-support/register --compilers js:babel-core/register --recursive',  RABBITMQ_PORT_15672_TCP_PORT: '15672',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_PORT_9200_TCP_ADDR: 'es',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_ELASTICSEARCH_DATA_1_ENV_ELASTICSEARCH_VERSION: '2.4.4',  RABBITMQ_PORT_15671_TCP_PROTO: 'tcp',  npm_config_searchexclude: '',  npm_config_init_author_email: '',  npm_config_group: '',  npm_package_devDependencies_babel_plugin_transform_runtime: '^6.15.0',  npm_package_devDependencies_babel_eslint: '^6.1.2',  RABBITMQ_PORT_15672_TCP_PROTO: 'tcp',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_PORT_9300_TCP_ADDR: 'es',  RABBITMQ_PORT_4369_TCP: 'tcp://rabbitmq:4369',  RABBITMQ_PORT_25672_TCP_PORT: '25672',  ESB_RABBITMQ_1_PORT_5671_TCP_ADDR: 'rabbitmq',  TRANSUNION_PARTNER_ID: '151',  NODE_ENV: 'production',  npm_config_optional: 'true',  npm_config_git: 'git',  npm_package_devDependencies_sinon: '^1.17.6',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_ENV_ELASTICSEARCH_DEB_VERSION: '2.4.4',  ESB_RABBITMQ_1_PORT_5672_TCP_ADDR: 'rabbitmq',  RABBITMQ_PORT_25672_TCP_PROTO: 'tcp',  npm_config_json: '',  npm_package_devDependencies_babel_plugin_module_resolver: '^2.2.0',  npm_package_dependencies_morgan: '^1.7.0',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_ENV_GOSU_VERSION: '1.7',  ES_PORT_9200_TCP: 'tcp://es:9200',  RANCHER_ELASTIC_MONGO_ELASTICSEARCH_1_PORT_9200_TCP_PORT: '9200',  ES_PORT: 'tcp://es:9200' }




SENECA TERMINATED (on timeout) at 2017-05-02T11:26:28.984Z.



npm ERR! Linux 4.4.0-72-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "serve"
npm ERR! node v5.12.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! application-service@1.0.0 serve: `NODE_ENV=production node ./build/index.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the application-service@1.0.0 serve script 'NODE_ENV=production node ./build/index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the application-service package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     NODE_ENV=production node ./build/index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs application-service
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls application-service
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /build-tmp/npm-debug.log

Because I dockertized all my services and there're only newly build containers show this error, I assume it must be the incompatible version of dependencies, this is the dependencies on the working container:

+-- seneca-amqp-transport@1.1.1
| +-- amqplib@0.4.2
| | +-- bitsyntax@0.0.4
| | +-- buffer-more-ints@0.0.2
| | +-- readable-stream@1.1.14
| | | `-- isarray@0.0.1
| | `-- when@3.6.4
| +-- amqpuri@1.0.3
| | +-- lodash.last@3.0.0
| | `-- lodash.pick@4.4.0
| +-- shortid@2.2.8
| `-- uuid@2.0.3

and this is, for the not-working-version;

+-- seneca-amqp-transport@1.1.1
| +-- amqplib@0.4.2
| | +-- bitsyntax@0.0.4
| | +-- buffer-more-ints@0.0.2
| | +-- readable-stream@1.1.14
| | | +-- isarray@0.0.1
| | | `-- string_decoder@0.10.31
| | `-- when@3.6.4
| +-- amqpuri@1.1.0
| | +-- lodash.curry@4.1.1
| | +-- lodash.flowright@3.5.0
| | `-- lodash.pick@4.4.0
| +-- shortid@2.2.8
| `-- uuid@2.0.3

notice the version of amqpuri dependency,

I think there should be the dependency lock or some kind??

right now, my fix was that I need to use npm shrinkwrap to create a dependency lock file

npm-shrinkwrap.json in your project directory,

{
  "name": "you-app-name",
  "version": "1.0.0",
  "dependencies": {
    "seneca-amqp-transport": {
      "version": "1.1.1",
      "from": "seneca-amqp-transport@>=1.0.1 <2.0.0",
      "resolved": "https://registry.npmjs.org/seneca-amqp-transport/-/seneca-amqp-transport-1.1.1.tgz",
      "dependencies": {
        "amqpuri": {
          "from": "amqpuri@1.0.3",
          "version": "1.0.3"
        }
      }
    }
  }
}

after a clean npm install the amqp transport will continue to work

@nfantone nfantone added the bug label May 2, 2017
@nfantone nfantone self-assigned this May 2, 2017
@nfantone
Copy link
Collaborator

nfantone commented May 2, 2017

@puttpotsawee Thanks for letting me know of this. amqpuri was updated recently, yes. It was meant to be a no-breaking-changes version bump. Clearly, it wasn't.

I apologize for the inconveniences.

Could you please share a snippet showing how you are declaring/creating your AMQP connection URI (hide/change any sensible information on it)? Even if it is just a string on .client or .listener.

@puttpotsawee
Copy link
Author

I mostly use JSON declarations for all seneca function

I use this configs

 listenings:[
        {
          type: 'amqp',
          pins: [
            { role: 'role-a', cmd: '*' },
            { role: 'role-b', cmd: '*'},
            { role: 'role-c', cmd: '*'},
            { role: 'role-d', cmd: '*'}
          ],
          url: 'amqp://myqmap.com'
        }
      ],
      clients: [
        {
          type: 'amqp',
          timeout: 5000,
          pins: [
            { role: 'role-e', cmd: '*' },
            { role: 'role-f', cmd: 'task-a' },
            { role: 'role-g', cmd: '*' },
            { role: 'role-h', cmd: '*' },
            { role: 'role-i', cmd: '*' }
          ],
          url: 'amqp://myqmap.com'
        }
      ]

thise configs will be push to seneca.listen() and seneca.client()

and when in my act I use something like this

act({role: 'payment', cmd: 'send', paymentData: 'data-a', payload: 'stuff..' })

notice the payload data which is included in a single object along with role and cmd
and

add({role:'payment', cmd:'send'}, function(args){
  //..some function
});

though, i have my own wrapper wrap the seneca.act and seneca.add but that should not be any differents in term of the sending options.

I hope this helps

@nfantone
Copy link
Collaborator

nfantone commented May 3, 2017

@puttpotsawee I believe I've found what the issue is here. You are running the plugin on node 5.12.0. We dropped support for node older than LTS a while back. Things may work, but sudden breaking changes may very well occur since we are not testing against those platforms, unfortunately. This is in consonance with the syntax error you are seeing.

Shrinkwrapping (or yarn) might be your safest bet. My apologies for the inconvenience.

@puttpotsawee
Copy link
Author

@nfantone Thanks for your help! It really works on node 6.3.1. I hope u add the fact that even version 1.1.1 will not be supported by node version lower than 6

@nfantone
Copy link
Collaborator

@puttpotsawee You're welcome. It's on the package.json "engines" definition now.

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

No branches or pull requests

2 participants