Multiple Virtual Hosts for file upload
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.
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.
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
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).
Many thanks @weiss
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.