Error starting botpress SQLITE ERROR

Hi

I’m getting this error when botpress starting and the all time its logging the same(loop)

         Botpress Server            
                                          Version 12.6.0             
                                      OS linux ubuntu_18_04         
                             ========================================' as `message`, '' as `metadata`, 'Launcher' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:41:12.960Z') as `timestamp` union all select NULL as `botId`, '444d4c73fe1c' as `hostname`, 'info' as `level`, 'App Data Dir: "/root/botpress"' as `message`, '' as `metadata`, 'Launcher' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:41:12.963Z') as `timestamp` union all select NULL as `botId`, '444d4c73fe1c' as `hostname`, 'info' as `level`, 'Using 11 modules
                    ⦿ analytics
                    ⦿ basic-skills
                    ⦿ builtin
                    ⦿ channel-slack
                    ⦿ channel-web
                    ⦿ code-editor
                    ⦿ examples
                    ⦿ extensions
                    ⦿ nlu
                    ⦿ qna
                    ⦿ testing
                    ⊝ channel-messenger (disabled)
                    ⊝ channel-smooch (disabled)
                    ⊝ channel-teams (disabled)
                    ⊝ channel-telegram (disabled)
                    ⊝ hitl (disabled)
                    ⊝ misunderstood (disabled)
                    ⊝ nlu-extras (disabled)
                    ⊝ nlu-testing (disabled)
                    ⊝ uipath (disabled)' as `message`, '' as `metadata`, 'Launcher' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:41:14.295Z') as `timestamp` union all select NULL as `botId`, '444d4c73fe1c' as `hostname`, 'info' as `level`, 'Running in DEVELOPMENT MODE' as `message`, '' as `metadata`, 'Server' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:41:14.296Z') as `timestamp` union all select NULL as `botId`, '444d4c73fe1c' as `hostname`, 'info' as `level`, 'Loaded 11 modules' as `message`, '' as `metadata`, 'Server' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:41:14.858Z') as `timestamp` union all select NULL as `botId`, '444d4c73fe1c' as `hostname`, 'info' as `level`, 'Loaded 7 content types' as `message`, '' as `metadata`, 'CMS' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:41:14.925Z') as `timestamp` union all select NULL as `botId`, '444d4c73fe1c' as `hostname`, 'info' as `level`, 'Discovered 1 bots, mounting them...' as `message`, '' as `metadata`, 'Server' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:41:15.173Z') as `timestamp` union all select 'iwaybot' as `botId`, '444d4c73fe1c' as `hostname`, 'info' as `level`, '[iwaybot] Interactive Endpoint URL: http://ec2-18-208-206-37.compute-1.amazonaws.com:3001/api/v1/bots/iwaybot/mod/channel-slack/bots/iwaybot/callback' as `message`, '' as `metadata`, 'Mod[channel-slack]' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:41:15.226Z') as `timestamp` union all select NULL as `botId`, '444d4c73fe1c' as `hostname`, 'info' as `level`, 'Started in 1092ms' as `message`, '' as `metadata`, 'Server' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:41:15.389Z') as `timestamp` union all select NULL as `botId`, '444d4c73fe1c' as `hostname`, 'info' as `level`, 'Botpress is listening at: http://localhost:3000' as `message`, '' as `metadata`, 'Launcher' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:41:15.390Z') as `timestamp` union all select NULL as `botId`, '444d4c73fe1c' as `hostname`, 'info' as `level`, 'Botpress is exposed at: http://ec2-18-208-206-37.compute-1.amazonaws.com:3001' as `message`, '' as `metadata`, 'Launcher' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:41:15.390Z') as `timestamp` union all select NULL as `botId`, '444d4c73fe1c' as `hostname`, 'error' as `level`, 'Error: ECONNREFUSED while calling resource "http://0.0.0.0:8090/k8s/getPodsByContextAndNamespace?context=prod-admin-access&namespace=staging"' as `message`, '' as `metadata`, 'Actions' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:41:47.227Z') as `timestamp` union all select NULL as `botId`, '444d4c73fe1c' as `hostname`, 'error' as `level`, 'Error: ECONNREFUSED while calling resource "http://localhost:8090/k8s/getPodsByContextAndNamespace?context=prod-admin-access&namespace=staging"' as `message`, '' as `metadata`, 'Actions' as `scope`, strftime('%Y-%m-%dT%H:%M:%fZ', '2020-03-11T20:44:35.246Z') as `timestamp` - SQLITE_ERROR: table srv_logs has no column named hostname]

STACK TRACE
Error: SQLITE_ERROR: table srv_logs has no column named hostname

I can use de bot normally and it’s work fine but when y I try to see de logs I see all the time the same error.
The error ECONNREFUSED is because I did a a test with an API but not is the problem(discard this part)

thanks in advance.
LB

Hey @luisbattle !

Looks like you have not migrated your database when you have upgraded to version 12.6.0.
Make sure to start you Botpress server with the AUTO_MIGRATE=true environment variable.

This will add the hostname column to the srv_logs table.

Hope this helps!

Hi @spgin, I hope you are well!

How to activate the AUTO_MIGRATE ? I have a Docker file running version 12.6 and I want to update to the last version 12.7.1. . I opened an [issue] with the description(Upgrade 12.5 to 12.7.1 -- Auto migrate - Dockerfile)

If you can help me I would appreciate it.
Thanks in advance.
Luis

You can start Botpress with AUTO_MIGRATE=true like this:

AUTO_MIGRATE=true ./bp