Discourse Import Failed

An import to discourse failed with the message below. I’ve been successfully importing a two mbox files for weeks now. This was the first import attempt since updating to 2.2.0.beta9.

root@discourse-import:/var/www/discourse# import_mbox.sh 
The mbox import is starting...

Traceback (most recent call last):
	17: from script/import_scripts/mbox.rb:7:in `<main>'
	16: from script/import_scripts/mbox.rb:8:in `<module:ImportScripts>'
	15: from script/import_scripts/mbox.rb:13:in `<module:Mbox>'
	14: from script/import_scripts/mbox.rb:13:in `require_relative'
	13: from /var/www/discourse/script/import_scripts/mbox/importer.rb:1:in `<top (required)>'
	12: from /var/www/discourse/script/import_scripts/mbox/importer.rb:1:in `require_relative'
	11: from /var/www/discourse/script/import_scripts/base.rb:14:in `<top (required)>'
	10: from /var/www/discourse/script/import_scripts/base.rb:14:in `require_relative'
	 9: from /var/www/discourse/config/environment.rb:2:in `<top (required)>'
	 8: from /var/www/discourse/config/environment.rb:2:in `require'
	 7: from /var/www/discourse/config/application.rb:40:in `<top (required)>'
	 6: from /var/www/discourse/config/application.rb:41:in `<module:Discourse>'
	 5: from /var/www/discourse/config/application.rb:245:in `<class:Application>'
	 4: from lib/discourse.rb:162:in `activate_plugins!'
	 3: from lib/discourse.rb:162:in `each'
	 2: from lib/discourse.rb:165:in `block in activate_plugins!'
	 1: from /var/www/discourse/lib/plugin/instance.rb:505:in `activate!'
lib/discourse.rb:29:in `execute_command': /var/www/discourse/lib/plugin/instance.rb:505:in `activate!': ln: failed to create symbolic link '/var/www/discourse/public/plugins/discourse-narrative-bot/public': File exists (RuntimeError)

@gerhard might have advice

That’s strange. It fails to initialize the narrative-bot plugin, because the symlink /var/www/discourse/public/plugins/discourse-narrative-bot already exists. But it shouldn’t exist at that point. Also, the line numbers are a little bit off…

https://github.com/discourse/discourse/blob/1f8ff85ff90f5447e05336be935c7c0ac653001a/lib/plugin/instance.rb#L517-L518

Can you rebuild the container and try again?

2 Likes

That error occurred while running import_mbox.sh inside the import container. The app container is stopped before the import container is started and entered. Not sure if that was clear. Would that explain the line numbers being off?

No, it doesn’t. I suggest you rebuild both containers just to be safe before you retry the import.

3 Likes

That fixed it. Thank you!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.