Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • 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
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise 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?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Debian, openproject configure, invalid state: same-state

Debian, openproject configure, invalid state: same-state

Added by _ KUL over 8 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 over 8 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...