ejabberd icon indicating copy to clipboard operation
ejabberd copied to clipboard

Multiple Virtual Hosts for file upload

Open ismailmohammed opened this issue 7 years ago • 5 comments

Hi, As I was discussing in some other issue tracker(with reference to 2772) so creating issue please help me.

Problem starting the module append_host_config for host abc.com

Remove all but the first occurrence of append_host_config from your configuration snippet above.

I have removed all except one but still getting same error. here is the error log.

2019-05-07 09:50:13.771 [critical] <0.334.0>@gen_mod:start_module:212 Problem starting the module append_host_config for host konnectz.com options: [{<<"domain1.com">>, [{modules, [{mod_http_upload, [{max_size,infinity}, {service_url, <<"https://api.domain11.net/api/UserProfiles/JabberUpload">>}, {thumbnail,false}, {custom_headers, [{<<"Access-Control-Allow-Origin">>,<<"">>}, {<<"Access-Control-Allow-Methods">>, <<"GET, POST, PUT, OPTIONS">>}, {<<"Access-Control-Allow-Headers">>, <<"Authorization">>}, {<<"Access-Control-Allow-Credentials">>, <<"true">>}]}]}, {mod_http_upload_quota,[{max_days,30}]}]}]}, {<<"domain11.net">>, [{modules, [{mod_http_upload, [{max_size,infinity}, {service_url, <<"https://api.domain11.net/api/UserProfiles/JabberUpload">>}, {thumbnail,false}, {custom_headers, [{<<"Access-Control-Allow-Origin">>,<<"">>}, {<<"Access-Control-Allow-Methods">>, <<"GET, POST, PUT, OPTIONS">>}, {<<"Access-Control-Allow-Headers">>, <<"Authorization">>}, {<<"Access-Control-Allow-Credentials">>, <<"true">>}]}]}, {mod_http_upload_quota,[{max_days,30}]}]}]}, {<<"northwestern.com">>, [{modules, [{mod_http_upload, [{max_size,infinity}, {service_url, <<"https://api.domain11.net/api/UserProfiles/JabberUpload">>}, {thumbnail,false}, {custom_headers, [{<<"Access-Control-Allow-Origin">>,<<"">>}, {<<"Access-Control-Allow-Methods">>, <<"GET, POST, PUT, OPTIONS">>}, {<<"Access-Control-Allow-Headers">>, <<"Authorization">>}, {<<"Access-Control-Allow-Credentials">>, <<"true">>}]}]}, {mod_http_upload_quota,[{max_days,30}]}]}]}, {<<"domain2.biz">>, [{modules, [{mod_http_upload, [{max_size,infinity}, {service_url, <<"https://api.domain2.biz/api/UserProfile/JabberUpload">>}, {thumbnail,false}, {custom_headers, [{<<"Access-Control-Allow-Origin">>,<<"">>}, {<<"Access-Control-Allow-Methods">>, <<"GET, POST, PUT, OPTIONS">>}, {<<"Access-Control-Allow-Headers">>, <<"Authorization">>}, {<<"Access-Control-Allow-Credentials">>, <<"true">>}]}]}, {mod_http_upload_quota,[{max_days,30}]}]}]}] error: undef [{append_host_config,start, [<<"domain1.com">>, [{<<"domain1.com">>, [{modules, [{mod_http_upload, [{max_size,infinity}, {service_url, <<"https://api.domain11.net/api/UserProfiles/JabberUpload">>}, {thumbnail,false}, {custom_headers, [{<<"Access-Control-Allow-Origin">>,<<"">>}, {<<"Access-Control-Allow-Methods">>, <<"GET, POST, PUT, OPTIONS">>}, {<<"Access-Control-Allow-Headers">>, <<"Authorization">>}, {<<"Access-Control-Allow-Credentials">>, <<"true">>}]}]}, {mod_http_upload_quota,[{max_days,30}]}]}]}, {<<"domain11.net">>, [{modules, [{mod_http_upload, [{max_size,infinity}, {service_url, <<"https://api.domain11.net/api/UserProfiles/JabberUpload">>}, {thumbnail,false}, {custom_headers, [{<<"Access-Control-Allow-Origin">>,<<"">>}, {<<"Access-Control-Allow-Methods">>, <<"GET, POST, PUT, OPTIONS">>}, {<<"Access-Control-Allow-Headers">>, <<"Authorization">>}, {<<"Access-Control-Allow-Credentials">>, <<"true">>}]}]}, {mod_http_upload_quota,[{max_days,30}]}]}]}, {<<"northwestern.com">>, [{modules, [{mod_http_upload, [{max_size,infinity}, {service_url, <<"https://api.domain11.net/api/UserProfiles/JabberUpload">>}, {thumbnail,false}, {custom_headers, [{<<"Access-Control-Allow-Origin">>,<<"">>}, {<<"Access-Control-Allow-Methods">>, <<"GET, POST, PUT, OPTIONS">>}, {<<"Access-Control-Allow-Headers">>, <<"Authorization">>}, {<<"Access-Control-Allow-Credentials">>, <<"true">>}]}]}, {mod_http_upload_quota,[{max_days,30}]}]}]}, {<<"domain2.biz">>, [{modules, [{mod_http_upload, [{max_size,infinity}, {service_url, <<"https://api.domain2.biz/api/UserProfile/JabberUpload">>}, {thumbnail,false}, {custom_headers, [{<<"Access-Control-Allow-Origin">>,<<"">>}, {<<"Access-Control-Allow-Methods">>, <<"GET, POST, PUT, OPTIONS">>}, {<<"Access-Control-Allow-Headers">>, <<"Authorization">>}, {<<"Access-Control-Allow-Credentials">>, <<"true">>}]}]}, {mod_http_upload_quota,[{max_days,30}]}]}]}]], []}, {gen_mod,start_module,4,[{file,"src/gen_mod.erl"},{line,200}]}, {lists,foreach,2,[{file,"lists.erl"},{line,1338}]}, {gen_mod,start_link,0,[{file,"src/gen_mod.erl"},{line,79}]}, {supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,365}]}, {supervisor,start_children,3,[{file,"supervisor.erl"},{line,348}]}, {supervisor,init_children,2,[{file,"supervisor.erl"},{line,314}]}, {gen_server,init_it,2,[{file,"gen_server.erl"},{line,365}]}] 2019-05-07 09:50:13.771 [critical] <0.334.0>@gen_mod:maybe_halt_ejabberd:294 ejabberd initialization was aborted because a module start failed.

ismailmohammed avatar May 07 '19 10:05 ismailmohammed

You're not even showing your configuration, but it's incorrect. According to the error message, you're still doing something like this:

append_host_config:
    "one.example.com":
      modules:
        mod_foo: {}
  append_host_config:
    "two.example.com":
      modules:
        mod_foo: {}

That would wrong. Keep only the top-level append_host_config directive, without any indentation.

This is not an ejabberd bug, and this bug tracker is not an appropriate place to ask for support. I'm closing this issue.

weiss avatar May 07 '19 10:05 weiss

Hi,

find the attached config file. please look into and help me with this.

I am new to it so don't have much knowledge where and how to search for a solution.

Thanks. ejab.txt

ismailmohammed avatar May 07 '19 11:05 ismailmohammed

As I said above:

Keep only the top-level append_host_config directive, without any indentation.

Seems you ignored the "without any indentation" part (despite me emphasizing it).

weiss avatar May 07 '19 11:05 weiss

Many thanks @weiss

ismailmohammed avatar May 08 '19 05:05 ismailmohammed

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar May 20 '20 21:05 lock[bot]