Top Menu

Jump to content
Home
    • Projects
    • Work packages
    • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Professional support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?
      Create a new account

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • Calendars
  • Team planners
  • Boards
  • Forums
  • Wiki
    • Table of contents
      • Expanded. Click to collapseCollapsed. Click to showDeveloper
        • Hierarchy leafAccessibility Checklist
        • Hierarchy leafCode Review Guidelines
        • Expanded. Click to collapseCollapsed. Click to showContribution
          • Hierarchy leafGit Workflow
          • Hierarchy leafTranslations
        • Expanded. Click to collapseCollapsed. Click to showDeveloping Plugins
          • Hierarchy leafDeveloping an OmniAuth Authentication Plugin
        • Hierarchy leafRelease Process
        • Hierarchy leafReport a bug
        • Hierarchy leafSecurity
        • Hierarchy leafSetting up an OpenLDAP server for testing
        • Hierarchy leafTheme Features
      • Hierarchy leafDownload
      • Expanded. Click to collapseCollapsed. Click to showFeature tour
        • Hierarchy leafRelease Notes OpenProject 30
        • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 30 - Overview
          • Hierarchy leafGlossary
          • Hierarchy leafRelease Notes - Accessibility
          • Hierarchy leafRelease Notes - Accessibility changes
          • Hierarchy leafRelease Notes - Add work package queries as menu items to sidebar
          • Hierarchy leafRelease Notes - Copy projects based on Templates
          • Hierarchy leafRelease Notes - Design changes
          • Hierarchy leafRelease Notes - Fixed Bugs
          • Hierarchy leafRelease Notes - Keyboard Shortcuts
          • Hierarchy leafRelease Notes - Project settings
          • Hierarchy leafRelease Notes - Ruby&Rails Update
          • Hierarchy leafRelease Notes - Security
          • Hierarchy leafRelease Notes - Timelines
          • Hierarchy leafRelease Notes - Work packages
      • Hierarchy leafHowto create animated gifs
      • Hierarchy leafMigration Squashing
      • Hierarchy leafMod security
      • Hierarchy leafNew work package page
      • Hierarchy leafOP3 to OP4 Debian upgrade
      • Hierarchy leafOP4 Ubuntu1404 Stable with MySQL in production
      • Hierarchy leafOpenProject 40 Development Setup
      • Expanded. Click to collapseCollapsed. Click to showOpenProject Foundation
        • Hierarchy leafBoards
        • Hierarchy leafMembers
        • Hierarchy leafOPF-Meetings
        • Hierarchy leafStatutes
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes
        • Hierarchy leafOpenProject released on Bitnami
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 40 - Overview
        • Hierarchy leafRelease Notes OpenProject 40 - Accessibility improvements
        • Hierarchy leafRelease Notes OpenProject 40 - Column header functions in work package table
        • Hierarchy leafRelease Notes OpenProject 40 - Improved Design
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated query title on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated toolbar on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - OmniAuth integration for OpenProject
        • Hierarchy leafRelease Notes OpenProject 40 - Work package details pane
      • Expanded. Click to collapseCollapsed. Click to showSecurity and privacy
        • Hierarchy leafFAQ
      • Expanded. Click to collapseCollapsed. Click to showSupport
        • Expanded. Click to collapseCollapsed. Click to showDownload and Installation
          • Hierarchy leafInstallation MacOS
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 3 0
            • Hierarchy leafDebian Stable with MySQL in production
            • Hierarchy leafInstallation Ubuntu
            • Hierarchy leafInstallation Windows
            • Hierarchy leafInstallation on Centos 65 x64 with Apache and PostgreSQL 93
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 40
            • Hierarchy leafOP4 Debian Stable with MySQL in production
          • Expanded. Click to collapseCollapsed. Click to showMigration paths
            • Hierarchy leafFrom Chilliproject to OpenProject
            • Hierarchy leafMigration 15 to 30
            • Hierarchy leafMigration 24 to 30
            • Hierarchy leafMigration Redmine 2x › OpenProject 30
            • Hierarchy leafOpenProject 3 Migration
          • Hierarchy leafOpenProject 40
        • Expanded. Click to collapseCollapsed. Click to showNews
          • Hierarchy leafNew OpenProject Translations Plugin
          • Hierarchy leafNew Plugin on OpenProjectorg Local Avatars
          • Hierarchy leafNew design for OpenProject
          • Hierarchy leafNews Accessibility workshop for OpenProject
          • Hierarchy leafNews Glossary for OpenProject
          • Hierarchy leafNews Heartbleed fixed
          • Hierarchy leafNews Icon Fonts
          • Hierarchy leafNews OpenProject 30 Release
          • Hierarchy leafNews Release GitHub Integration Plugin
          • Hierarchy leafNews Success Story Deutsche Telekom
          • Hierarchy leafNews Timelines
          • Hierarchy leafOpenProject 3013 released
          • Hierarchy leafOpenProject 3017 released
          • Hierarchy leafOpenProject 40 released
          • Hierarchy leafOpenProject 40 will be coming soon
          • Hierarchy leafOpenProject 405 released
          • Hierarchy leafOpenProject and pkgrio
          • Hierarchy leafOpenProject news moved to a new blog
          • Hierarchy leafOpenProjectBitnami
          • Hierarchy leafPackager version with plugins released ("Community edition")
          • Hierarchy leafRegistration OpenProject-Foundation
          • Hierarchy leafRelease OpenProject AuthPlugins
          • Hierarchy leafUpdates on OpenProject
          • Hierarchy leafWe need your feedback for the the new fullscreen view for work packages
        • Hierarchy leafOpenProject Plug-Ins
      • Hierarchy leafWiki
You are here:
  • Forums
  • Support Installation & Updates

Content

Debian, openproject configure, invalid state: same-state

Added by _ KUL about 6 years ago

I install from the package
apt-get install openproject

After the installation the system reported that there are no errors
============== The openproject package provides an installer. Please run the following command to finish the installation: sudo openproject configure ==============

Following the instructions (https://www.openproject.org/open-source/download/packaged-installation-guide/), i must run the command openproject configure

But when i run the configuration, the system is in an infinite loop error
invalid state: same-state

Example:

root@mylinux:~# openproject configure
Launching installer for openproject...
Selected addons: legacy-installer mysql apache2 repositories smtp memcached openproject
[legacy-installer] ./bin/configure
/usr/share/openproject/installer/addons/legacy-installer/bin/configure: строка 119: break: имеет значение только для циклов «for», «while» или «until»
invalid state: same-state
/usr/share/openproject/installer/addons/legacy-installer/bin/configure: строка 123: break: имеет значение только для циклов «for», «while» или «until»
invalid state: same-state
/usr/share/openproject/installer/addons/legacy-installer/bin/configure: строка 123: break: имеет значение только для циклов «for», «while» или «until»
invalid state: same-state
/usr/share/openproject/installer/addons/legacy-installer/bin/configure: строка 123: break: имеет значение только для циклов «for», «while» или «until»
invalid state: same-state
/usr/share/openproject/installer/addons/legacy-installer/bin/configure: строка 123: break: имеет значение только для циклов «for», «while» или «until»
invalid state: same-state
/usr/share/openproject/installer/addons/legacy-installer/bin/configure: строка 123: break: имеет значение только для циклов «for», «while» или «until»
invalid state: same-state

I have all the necessary components:

root@mylinux:~# dpkg -l| egrep 'mysql-server-5.6|apache2-data|ruby2.3|unicorn|memcached|openproject'
ii  apache2-data                       2.4.25-1                        all          Apache HTTP Server (common files)
ii  libruby2.3:amd64                   2.3.3-1                         amd64        Libraries necessary to run Ruby 2.3
ii  memcached                          1.4.33-1                        amd64        high-performance memory object caching system
ii  mysql-server-5.6                   5.6.30-1                        amd64        MySQL database server binaries and system database setup
ii  openproject                        6.1.3-1482441763.d41287f.jessie amd64        Official OpenProject Community Edition
ii  ruby2.3                            2.3.3-1                         amd64        Interpreter of object-oriented scripting language Ruby
ii  unicorn                            5.2.0-1                         amd64        Rack HTTP server for fast clients

Please help me, why can’t I perform the final configuration?


Replies (1)

RE: Debian, openproject configure, invalid state: same-state - Added by Stefan Glatz almost 6 years ago

Hitting the exact same Problem here, _KUL.

Since the question did not raise a lot of attention here I wanted to share my workaround.

You can get this thing going by just replacing the function call of the “state_machine” which is made from within in the “wizard” function defined in
/usr/share/openproject/installer/wizard line 60

with the function definition of “state_machine” as defined in
/usr/share/openproject/installer/addons/legacy-installer/bin/configure line 113

That is replace line 60 here
/usr/share/openproject/installer/wizard:

54 wizard() {
 55         STATE="$1"
 56         while true; do
 57                 wiz_debug "STATE=$STATE OLDSTATE=$OLDSTATE"
 58                 OLDSTATE="$STATE"
 59                 _wiz_reset "$STATE"
 60                 state_machine "$STATE"
 61                 if [ "$OLDSTATE" = "$STATE" ]; then
 62                         STATE="same-state" 
 63                 fi
 64         done
 65 }       

with line 113 and following from here
/usr/share/openproject/installer/addons/legacy-installer/bin/configure

113 state_machine() {
114         case "$1" in
115                 "start")
116                         input_start 
117                         ;;
118                 "done")
119                         break
120                         ;;
121                 *)
122                         echo "invalid state: ${STATE}"
123                         break;
124                         ;;
125         esac 
126 }               

You should end up with a wizard function ( in /usr/share/openproject/installer/wizard ) that looks like this:

54 wizard() {
 55         STATE="$1"
 56 #       while true; do
 57 #               wiz_debug "STATE=$STATE OLDSTATE=$OLDSTATE"
 58 #               OLDSTATE="$STATE"
 59 #               _wiz_reset "$STATE"
 60 #               state_machine "$STATE"
 61 #               if [ "$OLDSTATE" = "$STATE" ]; then
 62 #                       STATE="same-state"
 63 #               fi
 64 #       done
 65         while true; do
 66         wiz_debug "STATE=$STATE OLDSTATE=$OLDSTATE"
 67                 OLDSTATE="$STATE"
 68         _wiz_reset "$STATE"
 69         case "$STATE" in
 70                 "start")
 71                         input_start
 72                         ;;
 73                 "done")
 74                         break
 75                         ;;
 76                 *)
 77                         echo "invalid state: ${STATE}"
 78                         break;
 79                         ;;
 80         esac
 81  
 82                 if [ "$OLDSTATE" = "$STATE" ]; then
 83                         STATE="same-state"
 84                 fi      
 85         done    
 86 
 87 }

54 wizard() {

55 STATE=“$1”
56 # while true; do
57 # wiz_debug “STATE=$STATE OLDSTATE=$OLDSTATE”
58 # OLDSTATE=“$STATE”
59 # _wiz_reset “$STATE”
60 # state_machine “$STATE”
61 # if [ “$OLDSTATE” = “$STATE” ]; then
62 # STATE=“same-state”
63 # fi
64 # done
65 while true; do
66 wiz_debug “STATE=$STATE OLDSTATE=$OLDSTATE”
67 OLDSTATE=“$STATE”
68 _wiz_reset “$STATE”
69 case “$STATE” in
70 “start”)
71 input_start
72 ;;
73 “done”)
74 break
75 ;;
76 *)
77 echo “invalid state: ${STATE}”
78 break;
79 ;;
80 esac
81
82 if [ “$OLDSTATE” = “$STATE” ]; then
83 STATE=“same-state”
84 fi
85 done
86
87 }

I am not much of a bash buy, so I don’t really understand why this resolves the issue or what the problem was in the first place. It looked perfectly fine to my eyes; My best guess is “something to do with variable scopes…”.
Maybe someone more versed in these things sheds some light onto this in the future.

For the moment however this does get the installer to work which is good enough for me

Cheers

Stefan

  • (1 - 1/1)
Loading...